How RAG Works in kaag.ai
When a visitor asks a question, kaag.ai does not just pass it to the model and hope for the best. The system first converts the question into a vector embedding using the same model that indexed your content. It then performs a similarity search across your entire knowledge base using our high-performance semantic search engine, retrieving the most relevant chunks of content. These chunks are injected into the prompt as context, ensuring the AI response is grounded in your actual business data rather than general training knowledge. This dramatically reduces hallucinations and ensures accuracy.
Multiple Ingestion Methods
- File upload handles PDF, DOCX, plain text, and CSV formats with automatic text extraction
- Direct text input lets you paste FAQs, product specs, or policy documents right in the admin panel
- Website crawler follows links and indexes up to your configured page limit per crawl session
- Scheduled re-crawling keeps crawled pages in sync as your website content changes
Embedding and Retrieval Quality
kaag.ai uses state-of-the-art embedding models to convert text into high-dimensional vectors. Our high-performance semantic search engine provides fast approximate nearest-neighbor search, returning the most relevant chunks in milliseconds even across thousands of documents. You can configure chunk size and overlap in the admin panel to balance between retrieval precision and context breadth. Larger chunks preserve more context around key information, while smaller chunks improve precision for specific factual queries.