Skip to content

Commit 745a2c8

Browse files
authored
Merge pull request #1280 from Anxhela21/anx/solr
Fix Solr port and update rag_guide
2 parents 410bb5f + f585b19 commit 745a2c8

2 files changed

Lines changed: 33 additions & 4 deletions

File tree

docs/rag_guide.md

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ This document explains how to configure and customize your RAG pipeline using th
1515
* [Prerequisites](#prerequisites)
1616
* [Set Up the Vector Database](#set-up-the-vector-database)
1717
* [Download an Embedding Model](#download-an-embedding-model)
18-
* [Configure Vector Store and Embedding Model](#configure-vector-store-and-embedding-model)
18+
* [Automatic Configuration Enrichment](#automatic-configuration-enrichment)
19+
* [Manual Configuration](#manual-configuration)
1920
* [Add an Inference Model (LLM)](#add-an-inference-model-llm)
2021
* [Complete Configuration Reference](#complete-configuration-reference)
2122
* [System Prompt Guidance for RAG (as a tool)](#system-prompt-guidance-for-rag-as-a-tool)
@@ -60,9 +61,37 @@ Download a local embedding model such as `sentence-transformers/all-mpnet-base-v
6061
6162
---
6263

63-
## Configure Vector Store and Embedding Model
64+
## Automatic Configuration Enrichment
6465

65-
Update the `run.yaml` file used by Llama Stack to point to:
66+
For users with BYOK or OKP/Solr configurations, you can automatically enrich your `run.yaml` file using the `llama_stack_configuration.py` script:
67+
68+
```bash
69+
# Enrich run.yaml with BYOK and/or Solr configurations from lightspeed-stack.yaml
70+
python src/llama_stack_configuration.py -c lightspeed-stack.yaml -i run.yaml -o run_enriched.yaml
71+
```
72+
73+
This script automatically adds the necessary:
74+
- **Storage backends** for BYOK vector databases
75+
- **Vector IO providers** for BYOK and Solr
76+
- **Vector stores** and **embedding models** registration
77+
- **Solr provider configuration** when `okp` is enabled in your RAG configuration
78+
79+
The script reads your `lightspeed-stack.yaml` configuration and enriches a base `run.yaml` file with all required Llama Stack sections, eliminating the need to manually configure complex vector store setups.
80+
81+
**Command line options:**
82+
- `-c, --config`: Lightspeed config file (default: `lightspeed-stack.yaml`)
83+
- `-i, --input`: Input Llama Stack config (default: `run.yaml`)
84+
- `-o, --output`: Output enriched config (default: `run_.yaml`)
85+
- `-e, --env-file`: Path to .env file for AZURE_API_KEY (default: `.env`)
86+
87+
> [!TIP]
88+
> Use this script to generate your initial `run.yaml` configuration, then manually customize as needed for your specific setup.
89+
90+
---
91+
92+
## Manual Configuration
93+
94+
If you prefer to manually configure your `run.yaml` file, update it to point to:
6695

6796
* Your downloaded **embedding model**
6897
* Your generated **vector database**

src/llama_stack_configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ def enrich_solr(ls_config: dict[str, Any], solr_config: dict[str, Any]) -> None:
405405
]
406406
if constants.SOLR_PROVIDER_ID not in existing_providers:
407407
# Build environment variable expressions
408-
solr_url_env = "${env.SOLR_URL:=http://localhost:8081/solr}"
408+
solr_url_env = "${env.SOLR_URL:=http://localhost:8983/solr}"
409409
collection_env = (
410410
f"${{env.SOLR_COLLECTION:={constants.SOLR_DEFAULT_VECTOR_STORE_ID}}}"
411411
)

0 commit comments

Comments
 (0)