You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15-8Lines changed: 15 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -769,22 +769,29 @@ For the configuration guide, skill authoring instructions, and examples, see the
769
769
770
770
## Safety Shields
771
771
772
-
A single Llama Stack configuration file can include multiple safety shields, which are utilized in agent
773
-
configurations to monitor input and/or output streams. LCS uses the following naming convention to specify how each safety shield is
774
-
utilized:
772
+
Safety shields used by `/query`, `/streaming_query`, `/responses`, and `/rlsapi`
773
+
are **owned by Lightspeed Core Stack** and configured in `lightspeed-stack.yaml`
774
+
(not via the Llama Stack / OGX Safety or Moderations APIs).
775
775
776
-
1. If the `shield_id` starts with `input_`, it will be used for input only.
777
-
1. If the `shield_id` starts with `output_`, it will be used for output only.
778
-
1. If the `shield_id` starts with `inout_`, it will be used both for input and output.
779
-
1. Otherwise, it will be used for input only.
776
+
Supported shield types (`provider_id`):
780
777
781
-
Additionally, an optional list parameter `shield_ids` can be specified in `/query` and `/streaming_query` endpoints to override which shields are applied. You can use this config to disable shield overrides:
Copy file name to clipboardExpand all lines: docs/basic_info/overview.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,9 +6,11 @@
6
6
7
7
**Lightspeed Core Stack (LCore)** is an enterprise-grade middleware service that provides a robust layer between client applications and AI Large Language Model (LLM) backends. It adds essential enterprise features such as authentication, authorization, quota management, caching, and observability to LLM interactions.
8
8
9
-
Current version of LCore is built on **Llama Stack** - open-source framework that provides standardized APIs for building LLM applications. Llama Stack offers a unified interface for models, RAG (vector stores), tools, and safety (shields) across different providers. LCore communicates with Llama Stack to orchestrate all LLM operations.
9
+
Current version of LCore is built on **OGX (Llama Stack)** - open-source framework that provides standardized APIs for building LLM applications. OGX offers a unified interface for models, RAG (vector stores), and tools across different providers. LCore communicates with OGX to orchestrate all LLM operations.
10
10
11
-
To enhance LLM responses, LCore leverages **RAG (Retrieval-Augmented Generation)**, which retrieves relevant context from vector databases before generating answers. Llama Stack manages the vector stores, and LCore queries them to inject relevant documentation, knowledge bases, or previous conversations into the LLM prompt.
11
+
To enhance LLM responses, LCore leverages **RAG (Retrieval-Augmented Generation)**, which retrieves relevant context from vector databases before generating answers. OGX manages the vector stores, and LCore queries them to inject relevant documentation, knowledge bases, or previous conversations into the LLM prompt.
12
+
13
+
LCore also provides **safety shields** such as topic validation and PII redaction. These are configured in LCore and applied on request endpoints before or during agent processing.
Copy file name to clipboardExpand all lines: docs/devel_doc/ARCHITECTURE.md
+14-11Lines changed: 14 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,10 +24,12 @@
24
24
25
25
**Lightspeed Core Stack (LCORE)** is an enterprise-grade middleware service that provides a robust layer between client applications and AI Large Language Model (LLM) backends. It adds essential enterprise features such as authentication, authorization, quota management, caching, and observability to LLM interactions.
26
26
27
-
LCore is built on **Llama Stack** - Meta's open-source framework that provides standardized APIs for building LLM applications. Llama Stack offers a unified interface for models, RAG (vector stores), tools, and safety (shields) across different providers. LCore communicates with Llama Stack to orchestrate all LLM operations.
27
+
LCore is built on **Llama Stack / OGX** - an open-source framework that provides standardized APIs for building LLM applications. It offers a unified interface for models, RAG (vector stores), and tools across different providers. LCore communicates with the stack to orchestrate all LLM operations.
28
28
29
29
To enhance LLM responses, LCore leverages **RAG (Retrieval-Augmented Generation)**, which retrieves relevant context from vector databases before generating answers. Llama Stack manages the vector stores, and LCore queries them to inject relevant documentation, knowledge bases, or previous conversations into the LLM prompt.
30
30
31
+
To keep requests on-topic and protect sensitive data, LCore applies **safety shields**, which validate user questions and redact PII from model traffic. Shields are owned by LCore and configured in the service configuration.
32
+
31
33
### 1.2 Key Features
32
34
33
35
-**Multi-Provider Support**: Works with multiple LLM providers (Ollama, OpenAI, Watsonx, etc.)
@@ -342,7 +340,6 @@ make run CONFIG=examples/lightspeed-stack-azure-entraid-service.yaml
342
340
Some of APIs are associated with a set of **Resources**. Here is the mapping of APIs to resources:
343
341
344
342
- **Inference**, **Eval** and **Post Training** are associated with **Model** resources.
345
-
- **Safety** is associated with **Shield** resources.
346
343
- **Tool Runtime** is associated with **ToolGroup** resources.
347
344
- **DatasetIO** is associated with **Dataset** resources.
348
345
- **VectorIO** is associated with **VectorDB** resources.
@@ -359,9 +356,6 @@ make run CONFIG=examples/lightspeed-stack-azure-entraid-service.yaml
359
356
provider_id: openai
360
357
model_type: llm
361
358
provider_model_id: gpt-4-turbo # provider label
362
-
363
-
shields:
364
-
...
365
359
```
366
360
**Note** It is necessary for llama-stack to know which resources to use for a given provider. This means you need to explicitly register resources (including models) before you can use them with the associated APIs.
Copy file name to clipboardExpand all lines: docs/devel_doc/responses.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -107,7 +107,7 @@ The following fields are LCORE-specific request extensions and are not part of t
107
107
| Field | Type | Description | Required |
108
108
|-------|------|-------------|----------|
109
109
|`generate_topic_summary`| boolean | Generate topic summary for new conversations. Default: true | No |
110
-
|`shield_ids`| array[string]|Shield IDs to apply. If omitted, all configured shields in LCORE are used | No |
110
+
|`shield_ids`| array[string]|LCORE-configured shield `name` values to apply. If omitted, all configured shields are used. Not Llama Stack Safety resource names.| No |
111
111
|`solr`| object | Optional `mode` and `filters`. Legacy top-level filter-only objects are still accepted. | No |
The API introduces extensions that are not part of the OpenResponses specification:
601
601
602
602
-`generate_topic_summary` (request) — When set to `true` and a new conversation is created, a topic summary is automatically generated and stored in conversation metadata.
603
-
-`shield_ids` (request) — Optional list of safety shield IDs to apply. If omitted, all configured shields are used.
603
+
-`shield_ids` (request) — Optional list of LCORE shield `name` values to apply. If omitted, all shields from `lightspeed-stack.yaml`are used. See the [Safety Shields Guide](../user_doc/shields_guide.md).
604
604
-`solr` (request) — Object with optional `mode` (`semantic`, `hybrid`, or `lexical`) and `filters` (Solr vector_io provider payload). Legacy filter-only objects (no `mode`/`filters` wrapper) still work.
605
605
-`available_quotas` (response) — Provides real-time quota information from all configured quota limiters.
| generate_topic_summary | boolean | Whether to generate topic summary for new conversations |
849
849
| media_type | string | Media type for the response format |
850
850
| vector_store_ids | array | Optional list of specific vector store IDs to query for RAG. If not provided, all available vector stores will be queried. |
851
-
| shield_ids | array | Optional list of safety shield IDs to apply. If None, all configured shields are used.|
851
+
| shield_ids | array | Optional list of configured shield names to apply. If None, all configured shields are used. |
852
852
| solr || Solr inline RAG config: mode (semantic, hybrid, lexical) and filters; a legacy filter-only object (e.g. fq) is still accepted. |
853
853
854
854
@@ -900,8 +900,8 @@ Attributes:
900
900
calls, MCP tools). Defaults to all tools available to the model.
901
901
generate_topic_summary: LCORE-specific flag indicating whether to generate a
902
902
topic summary for new conversations. Defaults to True.
903
-
shield_ids: LCORE-specific list of safety shield IDs to apply. If None, all
904
-
configured shields are used.
903
+
shield_ids: LCORE-specific list of configured shield names to apply.
-**Scope**: REST API of the Lightspeed Core Stack (query, streaming_query, models, info, health, feedback, conversations, RBAC, MCP, etc.).
27
-
-**Execution**: Tests run in a **separate process** from the app. They send HTTP requests to the service and (in server mode) optionally talk to the Llama Stack service for shield setup.
27
+
-**Execution**: Tests run in a **separate process** from the app. They send HTTP requests to the service. LCORE shields are configured in `lightspeed-stack.yaml` (not via Llama Stack Safety APIs).
28
28
-**Environments**: Local (Docker Compose) or Prow/OpenShift (containers/pods). Mode is detected via `E2E_DEPLOYMENT_MODE` and `RUNNING_PROW`.
29
29
30
30
---
@@ -206,8 +206,8 @@ You can put several tags on one scenario. To document why a scenario is skipped,
-**before_feature**: Applies feature-level config and restarts container for `Authorized`, `RBAC`, `RHIdentity`, `Feedback`, `MCP`.
209
-
-**before_scenario**: Skips scenarios for `@skip`, `@local`, `@skip-in-library-mode`; applies scenario config for `InvalidFeedbackStorageConfig` / `NoCacheConfig`; for `@disable-shields` (server mode) unregisters the shield.
210
-
-**after_scenario**: Restores Llama Stack if it was disrupted; restores config and restarts for scenario config tags; for `@disable-shields` re-registers the shield.
209
+
-**before_scenario**: Skips scenarios for `@skip`, `@local`, `@skip-in-library-mode`; applies scenario config for `InvalidFeedbackStorageConfig` / `NoCacheConfig`.
210
+
-**after_scenario**: Restores Llama Stack if it was disrupted; restores config and restarts for scenario config tags.
211
211
-**after_feature**: Restores config and restarts for `Authorized`, `RBAC`, `RHIdentity`, `MCP`; deletes feedback conversations for `Feedback`.
0 commit comments