π RAG ChromaDB Demo Agent
The RAG ChromaDB Demo Agent showcases Retrieval-Augmented Generation capabilities with ChromaDB vector database in SuperOptiX. This demo focuses specifically on how to configure and use RAG with ChromaDB for knowledge retrieval and context-aware responses.
π― What This Demo Shows
This demo demonstrates:
- π RAG Integration: How to configure RAG with ChromaDB in SuperOptiX
- π Knowledge Retrieval: Semantic search and document retrieval
- π§ Context-Aware Responses: Responses based on retrieved knowledge
- βοΈ Playbook Configuration: How to set up RAG in agent playbooks
π Setup RAG with ChromaDB
1. Install Ollama Model
2. Start Ollama Server
3. Pull and Run the Demo
# Pull the RAG ChromaDB demo agent
super agent pull rag_chroma_demo
# Compile the agent
super agent compile rag_chroma_demo
# Run the agent
super agent run rag_chroma_demo --goal "What is the SuperOptiX framework?"
π§ RAG Configuration in Playbook
The RAG ChromaDB demo showcases how to configure RAG in the agent playbook:
Language Model Configuration
language_model:
location: local
provider: ollama
model: llama3.2:8b
api_base: http://localhost:11434
temperature: 0.7
max_tokens: 2048
RAG Configuration
rag:
enabled: true
retriever_type: chroma
config:
top_k: 5
chunk_size: 512
chunk_overlap: 50
similarity_threshold: 0.7
vector_store:
embedding_model: sentence-transformers/all-MiniLM-L6-v2
collection_name: rag_demo_knowledge
persist_directory: ./data/chromadb
Key RAG Configuration Points:
- β
enabled: true
: Enables RAG functionality - ποΈ
retriever_type: chroma
: Uses ChromaDB 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 - π
collection_name
: ChromaDB collection name - πΎ
persist_directory
: Local storage directory
π RAG: Your AI's Memory Bank
Retrieval-Augmented Generation (RAG) gives your AI agent the ability to access and use specific knowledge. Think of it as giving your AI a personal library:
- π§ Semantic Understanding: Finds relevant information based on meaning, not just keywords
- π Knowledge Base: Access to your own documents, databases, and information sources
- π― Precise Answers: Generates responses based on actual retrieved content
- π Source Citations: Always provides references to where information came from
- π Real-time Updates: Can access the latest information as it becomes available
π§ Customizing RAG Configuration
Adjust Retrieval Settings
Edit agents/rag_chroma_demo/playbook/rag_chroma_demo_playbook.yaml
:
rag:
config:
top_k: 10 # Retrieve more documents
chunk_size: 1024 # Larger chunks
similarity_threshold: 0.8 # Higher similarity threshold
Change Vector Database
rag:
retriever_type: lancedb # Use LanceDB instead
vector_store:
table_name: lancedb_demo_table
database_path: ./data/lancedb
Use Different Embedding Model
rag:
vector_store:
embedding_model: sentence-transformers/all-mpnet-base-v2 # Different embeddings
π¨ Troubleshooting RAG
Common Issues
-
Ollama Server Not Running
-
ChromaDB Issues
-
RAG Not Working
Getting Help
# Check agent status
super agent inspect rag_chroma_demo
# View agent logs
super agent logs rag_chroma_demo
# Get RAG help
super agent --help
π Related Resources
- RAG Guide - Complete RAG setup and usage
- RAG Integration Guide - ChromaDB configuration and setup
- Agent Development - Building custom agents
π Next Steps
After exploring the RAG ChromaDB demo:
- Try Other RAG Backends: Explore RAG LanceDB for production use
- Customize: Modify the playbook for your specific knowledge base
- Build Your Own: Use this as a template for your custom RAG agent
Ready to explore knowledge retrieval? Start with the RAG ChromaDB demo! π Ready to explore knowledge retrieval? Start with the RAG ChromaDB demo! π