π RAG LanceDB Demo Agent
The RAG LanceDB Demo Agent showcases high-performance RAG capabilities with LanceDB vector database in SuperOptiX. This demo focuses specifically on how to configure and use RAG with LanceDB for scalable, production-ready knowledge retrieval.
π― What This Demo Shows
This demo demonstrates:
- π High-Performance RAG: How to configure RAG with LanceDB in SuperOptiX
- π Scalable Knowledge Retrieval: Production-ready vector database
- β‘ Fast Semantic Search: Optimized retrieval performance
- βοΈ Playbook Configuration: How to set up RAG with LanceDB in agent playbooks
π Setup RAG with LanceDB
1. Install Ollama Model
2. Start Ollama Server
3. Pull and Run the Demo
Bash
# Pull the RAG LanceDB demo agent
super agent pull rag_lancedb_demo
# Compile the agent
super agent compile rag_lancedb_demo
# Run the agent
super agent run rag_lancedb_demo --goal "What is the SuperOptiX framework?"
π§ RAG Configuration in Playbook
The RAG LanceDB demo showcases how to configure RAG with LanceDB in the agent playbook:
Language Model Configuration
YAML
language_model:
location: local
provider: ollama
model: llama3.2:8b
api_base: http://localhost:11434
temperature: 0.7
max_tokens: 2048
RAG Configuration
YAML
rag:
enabled: true
retriever_type: lancedb
config:
top_k: 5
chunk_size: 512
chunk_overlap: 50
similarity_threshold: 0.7
vector_store:
embedding_model: sentence-transformers/all-MiniLM-L6-v2
table_name: lancedb_demo_table
database_path: ./data/lancedb
Key RAG Configuration Points:
- β
enabled: true
: Enables RAG functionality - ποΈ
retriever_type: lancedb
: Uses LanceDB as vector database - π
top_k: 5
: Retrieves top 5 most similar documents - π
chunk_size: 512
: Document chunk size for processing - π
chunk_overlap: 50
: Overlap between chunks for context - π―
similarity_threshold: 0.7
: Minimum similarity score for retrieval - π§
embedding_model
: Sentence transformers for embeddings - π
table_name
: LanceDB table name - πΎ
database_path
: Local storage directory
π LanceDB: Enterprise-Grade RAG
LanceDB is built for production environments where performance and scalability matter. It's the vector database of choice for serious applications:
- β‘ Lightning Fast: Optimized for high-speed semantic search across millions of documents
- π Enterprise Scale: Handles massive document collections with ease
- π’ Production Ready: Built with enterprise-grade reliability and consistency
- βοΈ Cloud Native: Seamlessly works with cloud storage and distributed systems
- π ACID Compliant: Guarantees data consistency and transaction safety
- π Version Control: Track changes and maintain document history
π§ Customizing RAG Configuration
Adjust Retrieval Settings
Edit agents/rag_lancedb_demo/playbook/rag_lancedb_demo_playbook.yaml
:
YAML
rag:
config:
top_k: 10 # Retrieve more documents
chunk_size: 1024 # Larger chunks
similarity_threshold: 0.8 # Higher similarity threshold
Change Vector Database
YAML
rag:
retriever_type: chroma # Use ChromaDB instead
vector_store:
collection_name: chromadb_demo_collection
persist_directory: ./data/chromadb
Use Different Embedding Model
YAML
rag:
vector_store:
embedding_model: sentence-transformers/all-mpnet-base-v2 # Different embeddings
π¨ Troubleshooting RAG
Common Issues
-
Ollama Server Not Running
-
LanceDB Issues
-
RAG Not Working
Getting Help
Bash
# Check agent status
super agent inspect rag_lancedb_demo
# View agent logs
super agent logs rag_lancedb_demo
# Get RAG help
super agent --help
π Related Documentation
- RAG Guide - Complete RAG setup and usage
- RAG Integration Guide - LanceDB configuration and setup
- Agent Development - Building custom agents
π Next Steps
- Try Other RAG Backends: Explore RAG ChromaDB for development