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: docs/okp_guide.md
+53-19Lines changed: 53 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,15 @@
1
1
# OKP Deployment and Configuration Guide
2
2
3
-
This document explains how to deploy the Offline Knowledge Portal (OKP) as a RAG source and configure Lightspeed Stack and Llama Stack to use it. You will:
3
+
This document explains how to deploy the Offline Knowledge Portal (OKP) as a
4
+
RAG source and configure Lightspeed Stack and Llama Stack to use it. You will:
4
5
5
6
* Deploy and verify the OKP Solr service
6
7
* Configure Lightspeed Stack for OKP (inline or tool RAG)
7
8
* Install dependencies and launch Lightspeed Stack
8
9
* Confirm the end-to-end stack with a sample query
9
10
10
-
For general RAG concepts, BYOK vector stores, and manual Llama Stack configuration, see the [RAG Configuration Guide](rag_guide.md).
11
+
For general RAG concepts, BYOK vector stores, and manual Llama Stack
12
+
configuration, see the [RAG Configuration Guide](rag_guide.md).
11
13
12
14
---
13
15
@@ -16,17 +18,22 @@ For general RAG concepts, BYOK vector stores, and manual Llama Stack configurati
*[Step 6: Verify the Stack](#step-6-verify-the-stack)
24
26
25
27
---
26
28
27
29
## Introduction
28
30
29
-
OKP (Offline Knowledge Portal) provides a Solr-backed RAG source that Lightspeed Stack can use for both **Inline RAG** (context injected before the LLM request) and **Tool RAG** (context retrieved on demand via the `file_search` tool). This guide walks through deploying the OKP container, enriching your Llama Stack config from Lightspeed Stack settings, and validating that queries return referenced chunks.
31
+
OKP (Offline Knowledge Portal) provides a Solr-backed RAG source that
32
+
Lightspeed Stack can use for both **Inline RAG** (context injected before the
33
+
LLM request) and **Tool RAG** (context retrieved on demand via the
34
+
`file_search` tool). This guide walks through deploying the OKP container,
35
+
enriching your Llama Stack config from Lightspeed Stack settings, and
36
+
validating that queries return referenced chunks.
30
37
31
38
---
32
39
@@ -42,7 +49,8 @@ OKP (Offline Knowledge Portal) provides a Solr-backed RAG source that Lightspeed
42
49
43
50
## Step 1: Launch OKP
44
51
45
-
> **Warning:** The image referenced below is a **prototype**. The official OKP RAG image is expected in **late March / early April** of 2026.
52
+
> **Warning:** The image referenced below is a **prototype**. The official OKP
53
+
> RAG image is expected in **late March / early April** of 2026.
> **Note:** Lightspeed stack will automatically enrich the llamastack configuration to add the necessary providers/resources for referencing OKP. This assumes your OKP instance is running on localhost:8081. If you need a different OKP url, you can set the SOLR_URL environment variable with the correct url prior to launching Lightspeed stack and that value will be used instead.
72
+
> **Note:** Lightspeed stack will automatically enrich the llamastack
73
+
> configuration to add the necessary providers/resources for referencing OKP.
74
+
> This assumes your OKP instance is running on localhost:8081. If you need a
75
+
> different OKP url, you can set the SOLR_URL environment variable with the
76
+
> correct url prior to launching Lightspeed stack and that value will be used
Set the required environment variables. The external providers path must point to the `external_providers` content inside the [lightspeed-providers](https://github.com/lightspeed-core/lightspeed-providers/tree/main/lightspeed_stack_providers/) repository:
82
+
Set the required environment variables. The external providers path must point
***`uv sync`**: Installs project and dev/llslibdev groups so that the app and tooling run correctly.
91
108
***`uv pip install -e ../lightspeed-providers`**: Installs the lightspeed stack providers from the local clone of the repository. Adjust the directory path as needed.
92
109
93
-
> **Note:** Running `uv sync` will remove the lightspeed-providers dependency installed by the `uv pip install` command, so you will need to rerun the `uv pip install` command if you rerun `uv sync`.
110
+
> **Note:** Running `uv sync` will remove the lightspeed-providers dependency
111
+
> installed by the `uv pip install` command, so you will need to rerun the `uv
112
+
> pip install` command if you rerun `uv sync`.
94
113
95
114
---
96
115
97
116
## Step 4: Configure Lightspeed Stack
98
117
99
118
### Enable OKP in Lightspeed Stack
100
-
Edit your Lightspeed Stack config file (e.g. `lightspeed-stack.yaml`) and add the following top-level sections so that OKP is used for either inline or tool RAG:
119
+
120
+
Edit your Lightspeed Stack config file (e.g. `lightspeed-stack.yaml`) and add
121
+
the following top-level sections so that OKP is used for either inline or tool
122
+
RAG:
101
123
102
124
Inline RAG:
125
+
103
126
```yaml
104
127
# RAG configuration
105
128
rag:
@@ -111,6 +134,7 @@ okp:
111
134
```
112
135
113
136
Tool RAG:
137
+
114
138
```yaml
115
139
# RAG configuration
116
140
rag:
@@ -124,19 +148,22 @@ okp:
124
148
* **`rag.inline`** and **`rag.tool`**: Enable OKP as the RAG source for inline context injection and for the RAG tool. Tool rag means the LLM will be provided a search tool it can choose to invoke to find relevant content and augment the user prompt. The tool may or may not be invoked. Inline means a rag search and prompt augmentation will always occur.
125
149
* **`okp.offline`**: When `true`, source URLs use `parent_id` (offline/Mimir-style). When `false`, use `reference_url` (online).
126
150
127
-
If you want to filter the docs to a specific product, you can include a query filter such as:
151
+
If you want to filter the docs to a specific product, you can include a query
152
+
filter such as:
128
153
129
154
```yaml
130
155
okp:
131
156
offline: true
132
157
chunk_filter_query: "product:*openshift*"
133
158
```
134
159
135
-
When you launch Lightspeed stack it will augment the Llamastack run.yaml with configuration for OKP.
160
+
When you launch Lightspeed stack it will augment the Llamastack run.yaml with
161
+
configuration for OKP.
136
162
137
163
### Configure Lightspeed Stack for library mode
138
164
139
-
For the simplest local development, configure `lightspeed-stack.yaml` to consume Llama Stack in library mode:
165
+
For the simplest local development, configure `lightspeed-stack.yaml` to
166
+
consume Llama Stack in library mode:
140
167
141
168
```yaml
142
169
llama_stack:
@@ -153,13 +180,16 @@ llama_stack:
153
180
154
181
## Step 5: Launch Lightspeed Stack
155
182
156
-
Then launch Lightspeed Stack using your Lightspeed Stack config(`lightspeed-stack.yaml`) which references the provided default Llamastack config file (`run.yaml`):
183
+
Then launch Lightspeed Stack using your Lightspeed Stack
184
+
config(`lightspeed-stack.yaml`) which references the provided default
185
+
Llamastack config file (`run.yaml`):
157
186
158
187
```bash
159
188
make run
160
189
```
161
190
162
-
Lightspeed Stack has launched successfully and is available when you see this log output:
191
+
Lightspeed Stack has launched successfully and is available when you see this
192
+
log output:
163
193
164
194
```log
165
195
INFO 2026-03-17 11:20:31,347 uvicorn.error:62 uncategorized: Application startup complete.
Confirm that the full stack (Lightspeed Stack + Llama Stack + OKP) is working by sending a query and checking that the response includes referenced chunks from OKP:
203
+
Confirm that the full stack (Lightspeed Stack + Llama Stack + OKP) is working
204
+
by sending a query and checking that the response includes referenced chunks
205
+
from OKP:
174
206
175
207
```bash
176
208
curl -sX POST http://localhost:8080/v1/query \
@@ -196,7 +228,9 @@ Example response excerpt:
196
228
],
197
229
```
198
230
199
-
> **Note:** The first time you query the system the response may take additional time because it must first download the necessary embedding model to perform the vector search.
231
+
> **Note:** The first time you query the system the response may take
232
+
> additional time because it must first download the necessary embedding model
0 commit comments