Skip to content

Commit be812e7

Browse files
authored
Merge pull request #1169 from Anxhela21/anx/solr-documentation
[LCORE-1342] OKP Solr documentation
2 parents fcb78b3 + 520d55f commit be812e7

2 files changed

Lines changed: 66 additions & 1 deletion

File tree

docs/rag_guide.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,70 @@ Currently, tool calling is not supported out of the box. Some experimental patch
261261

262262
The RAG tool calls where not working properly when experimenting with `mistralai/Mistral-7B-Instruct-v0.3` on vLLM.
263263

264+
### Solr Vector IO
265+
266+
The OKP (Offline Knowledge Portal) Solr Vector IO is a read-only vector search provider that integrates with Apache Solr for enhanced vector search capabilities. It enables retrieving contextual information from Solr-indexed Red Hat documents to enhance query responses with support for hybrid search and chunk window expansion.
267+
268+
269+
#### How to Enable Solr Vector IO
270+
271+
**1. Configure Llama Stack (`run.yaml`):**
272+
273+
```yaml
274+
providers:
275+
vector_io:
276+
- provider_id: solr-vector
277+
provider_type: remote::solr_vector_io
278+
config:
279+
solr_url: http://localhost:8983/solr
280+
collection_name: portal-rag
281+
vector_field: chunk_vector
282+
content_field: chunk
283+
embedding_dimension: 384
284+
embedding_model: ${env.EMBEDDING_MODEL_DIR}
285+
persistence:
286+
namespace: portal-rag
287+
backend: kv_default
288+
289+
registered_resources:
290+
vector_stores:
291+
- vector_store_id: portal-rag
292+
provider_id: solr-vector
293+
embedding_model: granite-embedding-30m
294+
embedding_dimension: 384
295+
```
296+
297+
**2. Configure Lightspeed Stack (`lightspeed-stack.yaml`):**
298+
299+
```yaml
300+
solr:
301+
enabled: true # Enable Solr vector IO functionality
302+
offline: true # Use parent_id for document URLs (offline mode)
303+
# Set to false to use reference_url (online mode)
304+
```
305+
306+
**Query Processing:**
307+
308+
1. When Solr is enabled, queries use the `portal-rag` vector store
309+
2. Vector search is performed with configurable parameters:
310+
- `k`: Number of results (default: 5)
311+
- `score_threshold`: Minimum similarity score (default: 0.0)
312+
- `mode`: Search mode (default: "hybrid")
313+
3. Results include document metadata and source URLs
314+
4. Document URLs are built based on the `offline` setting:
315+
- **Offline mode**: Uses `parent_id` with Mimir base URL
316+
- **Online mode**: Uses `reference_url` from document metadata
317+
318+
**Prerequisites:**
319+
320+
- Solr must be running and accessible at the configured URL
321+
for instructions on how to pull and run the OKP Solr image visit: https://github.com/lightspeed-core/lightspeed-providers/lightspeed_stack_providers/providers/remote/solr_vector_io/solr_vector_io/README.md
322+
323+
324+
**Limitations:**
325+
326+
- This is a **read-only** provider - no insert/delete operations
327+
264328
---
265329

266330
# Complete Configuration Reference

lightspeed-stack.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ authentication:
3232
module: "noop"
3333

3434

35+
# OKP Solr for supplementary RAG
3536
solr:
36-
enabled: true
37+
enabled: false
3738
offline: true

0 commit comments

Comments
 (0)