Overview
Vedaya’s Retrieval and RAG system allows you to:- Query your knowledge base for relevant information
- Retrieve document chunks based on semantic search
- Generate answers using language models enhanced with retrieved context
- Build chatbots with knowledge from your documents
Simple Retrieval
To retrieve relevant chunks from your knowledge base without generating an answer:Retrieval with Answer Generation
To retrieve chunks and generate an answer:RAG Queries for Frontend Integration
For applications that need a more structured response format, you can use the dedicated RAG endpoint:Simple Chatbot Queries
For simpler use cases, you can use the basic chatbot endpoint:Understanding RAG
Retrieval Augmented Generation (RAG) combines:- Retrieval: Finding relevant information from your document collection
- Generation: Using a language model to create coherent, contextual responses
- Up-to-date information: Responses based on your latest documents
- Reduced hallucinations: Grounding responses in factual content
- Domain-specific knowledge: Tailored answers based on your specific data
- Transparency: Citations to source documents for verification
- Cost efficiency: Optimizing expensive language model usage
Implementing RAG in Your Application
Follow these steps to implement RAG in your application:- Ingest documents using the Data Ingestion API
- Wait for processing to complete (indexing and embedding generation)
- Set up retrieval endpoints in your application
- Design prompts that effectively use the retrieved context
- Handle responses appropriately in your frontend
Best Practices
- Query Formulation: Ask clear, specific questions for better retrieval
- Context Length: Adjust
top_k
based on the complexity of the question - Model Selection: Use more powerful models for complex reasoning tasks
- Citation Generation: Extract and display source information to users
- Fallback Mechanisms: Handle cases where relevant information isn’t found
- Progressive Enhancement: Start with simple retrieval and add RAG capabilities as needed