How ivanpetrushev/easy-rag works
Key Components to Include:
Processing Pipeline
• PDF Processing Component
• Text Chunking Component
• Embedding Generation Component
• Vector Store (ChromaDB)
• Query Processing Component
• Answer Generation Component
External Services
• AWS Bedrock (containing two sub-components):
• Titan Embed Text Model (for embeddings)
• Claude 3 Haiku Model (for answer generation)
Component Relationships
a. Document Processing Flow:
• PDF → Text Extraction → Text Chunking → Embedding Generation → ChromaDB
b. Query Processing Flow:
• User Query → Query Processing → Embedding Generation → ChromaDB Retrieval → Context Assembly → Answer Generation → Response
Technical Details in Labels
• Use of LangChain framework
• Specify model names (amazon.titan-embed-text-v2:0, anthropic.claude-3-haiku-20240307-v1:0)
• Token processing capabilities
Important Notes
• A processing time indicator (~3 min for embeddings)
• Approximate costs ($0.004 for corpus processing, $0.005 for example queries)
• Potential improvement points (as noted in README)
Docker Container Boundary
• Environment variable dependencies
Special Considerations:
RAG-specific elements
• Clear separation between retrieval and generation components
• How the vector store bridges document processing and query handling
Performance Aspects
• Batch processing for document ingestion
• Real-time flow for query processing
Integration Points
• AWS credentials integration
• Docker environment variables
• Local file system interaction
Future Extensibility
• Potential integration points for suggested improvements
• Where alternative models could be plugged in
Remember to indicate that this is a demo/prototype architecture, with clear markers for where production-grade improvements could be made (such as streaming responses, memory context, and alternative model options).