-
Notifications
You must be signed in to change notification settings - Fork 72
[LCORE-1342] OKP Solr documentation #1169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -261,6 +261,70 @@ Currently, tool calling is not supported out of the box. Some experimental patch | |
|
|
||
| The RAG tool calls where not working properly when experimenting with `mistralai/Mistral-7B-Instruct-v0.3` on vLLM. | ||
|
|
||
| ### Solr Vector IO | ||
|
|
||
| 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. | ||
|
|
||
|
|
||
| #### How to Enable Solr Vector IO | ||
|
|
||
| **1. Configure Llama Stack (`run.yaml`):** | ||
|
|
||
| ```yaml | ||
| providers: | ||
| vector_io: | ||
| - provider_id: solr-vector | ||
| provider_type: remote::solr_vector_io | ||
| config: | ||
| solr_url: http://localhost:8983/solr | ||
| collection_name: portal-rag | ||
| vector_field: chunk_vector | ||
| content_field: chunk | ||
| embedding_dimension: 384 | ||
| embedding_model: ${env.EMBEDDING_MODEL_DIR} | ||
| persistence: | ||
| namespace: portal-rag | ||
| backend: kv_default | ||
|
|
||
| registered_resources: | ||
| vector_stores: | ||
| - vector_store_id: portal-rag | ||
| provider_id: solr-vector | ||
| embedding_model: granite-embedding-30m | ||
| embedding_dimension: 384 | ||
| ``` | ||
|
|
||
| **2. Configure Lightspeed Stack (`lightspeed-stack.yaml`):** | ||
|
|
||
| ```yaml | ||
| solr: | ||
| enabled: true # Enable Solr vector IO functionality | ||
| offline: true # Use parent_id for document URLs (offline mode) | ||
| # Set to false to use reference_url (online mode) | ||
| ``` | ||
|
|
||
| **Query Processing:** | ||
|
|
||
| 1. When Solr is enabled, queries use the `portal-rag` vector store | ||
| 2. Vector search is performed with configurable parameters: | ||
| - `k`: Number of results (default: 5) | ||
| - `score_threshold`: Minimum similarity score (default: 0.0) | ||
| - `mode`: Search mode (default: "hybrid") | ||
| 3. Results include document metadata and source URLs | ||
| 4. Document URLs are built based on the `offline` setting: | ||
| - **Offline mode**: Uses `parent_id` with Mimir base URL | ||
| - **Online mode**: Uses `reference_url` from document metadata | ||
|
|
||
| **Prerequisites:** | ||
|
|
||
| - Solr must be running and accessible at the configured URL | ||
| 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 | ||
|
Comment on lines
+320
to
+321
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: # First, check if docs/rag_guide.md exists and read the relevant lines
if [ -f "docs/rag_guide.md" ]; then
echo "=== Lines 320-321 from docs/rag_guide.md ==="
sed -n '320,321p' docs/rag_guide.md
echo ""
echo "=== Context (lines 315-325) ==="
sed -n '315,325p' docs/rag_guide.md
else
echo "File docs/rag_guide.md not found"
fiRepository: lightspeed-core/lightspeed-stack Length of output: 856 🏁 Script executed: # Check if the solr_vector_io directory exists
fd -t d "solr_vector_io" . 2>/dev/null || echo "Directory not found via fd"
# Also check git ls-files for README files
echo "=== Searching for README files in lightspeed_stack_providers ==="
git ls-files | grep -i "lightspeed_stack_providers.*solr.*README" || echo "No matches found"
# List directory structure if it exists
if [ -d "lightspeed_stack_providers" ]; then
echo "=== lightspeed_stack_providers structure ==="
find lightspeed_stack_providers -type f -name "README*" 2>/dev/null | head -20
fiRepository: lightspeed-core/lightspeed-stack Length of output: 157 🏁 Script executed: # Test the corrected URL format
echo "=== Testing corrected GitHub URL format ==="
curl -s -I "https://github.com/lightspeed-core/lightspeed-providers/blob/main/lightspeed_stack_providers/providers/remote/solr_vector_io/solr_vector_io/README.md" | head -1
echo ""
echo "=== Testing original malformed URL ==="
curl -s -I "https://github.com/lightspeed-core/lightspeed-providers/lightspeed_stack_providers/providers/remote/solr_vector_io/solr_vector_io/README.md" | head -1
# Also check if the lightspeed-providers repo exists
echo ""
echo "=== Testing if lightspeed-providers repo exists ==="
curl -s -I "https://github.com/lightspeed-core/lightspeed-providers" | head -1Repository: lightspeed-core/lightspeed-stack Length of output: 250 Broken GitHub URL — missing The link in line 321 is syntactically invalid. GitHub URLs require a ref segment ( Correct the URL to: 🤖 Prompt for AI Agents |
||
|
|
||
|
|
||
| **Limitations:** | ||
|
|
||
| - This is a **read-only** provider - no insert/delete operations | ||
|
|
||
| --- | ||
|
|
||
| # Complete Configuration Reference | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Table of Contents is missing an entry for the new Solr Vector IO section.
The ToC (lines 12–22) doesn't link to this new subsection. Consider adding an entry like
* [Solr Vector IO](#solr-vector-io)under the existing items to keep navigation consistent.🤖 Prompt for AI Agents