Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions docs/rag_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Comment on lines +264 to +266
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

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
Verify each finding against the current code and only fix it if needed.

In `@docs/rag_guide.md` around lines 264 - 266, The Table of Contents is missing
an entry for the new "Solr Vector IO" subsection; update the existing ToC by
adding a bullet like "* [Solr Vector IO](`#solr-vector-io`)" under the other items
so the "Solr Vector IO" header links from the ToC and navigation stays
consistent with the new section.



#### 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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 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"
fi

Repository: 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
fi

Repository: 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 -1

Repository: lightspeed-core/lightspeed-stack

Length of output: 250


Broken GitHub URL — missing /blob/main/ segment.

The link in line 321 is syntactically invalid. GitHub URLs require a ref segment (/blob/main/, /blob/branch/, etc.) between the repository name and the file path. The current URL concatenates them directly.

Correct the URL to:

https://github.com/lightspeed-core/lightspeed-providers/blob/main/lightspeed_stack_providers/providers/remote/solr_vector_io/solr_vector_io/README.md
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/rag_guide.md` around lines 320 - 321, The GitHub link in the Solr
instruction is missing the required ref segment (e.g., /blob/main/) and is
therefore invalid; update the URL string (the one pointing to
lightspeed-providers ... README.md) to include /blob/main/ between the
repository and path so it matches the corrected form
(https://github.com/lightspeed-core/lightspeed-providers/blob/main/lightspeed_stack_providers/providers/remote/solr_vector_io/solr_vector_io/README.md).



**Limitations:**

- This is a **read-only** provider - no insert/delete operations

---

# Complete Configuration Reference
Expand Down
3 changes: 2 additions & 1 deletion lightspeed-stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ authentication:
module: "noop"


# OKP Solr for supplementary RAG
solr:
enabled: true
enabled: false
offline: true
Loading