RAG & Knowledge Bases

Connect your documents and data to agents through Retrieval-Augmented Generation (RAG). Give agents access to your organization's knowledge for accurate, contextual responses.

How RAG Works

RAG enhances AI responses by retrieving relevant context from your documents before generating an answer. This ensures agents have access to up-to-date, organization-specific information.

1. Ingest

Documents are chunked and embedded

2. Retrieve

Semantic search finds relevant chunks

3. Generate

Agent responds with context

Document Ingestion

Upload documents to create a searchable knowledge base. Aethyr supports multiple file formats and automatically handles chunking and embedding.

Supported Formats

PDF
DOCX
TXT
Markdown
HTML
CSV
JSON
Code Files

Via API

POST /api/knowledge/ingest
const formData = new FormData();
formData.append('file', document);
formData.append('corpusId', 'my-knowledge-base');

fetch('/api/knowledge/ingest', {
  method: 'POST',
  body: formData
})

Connecting to Agents

Link a knowledge base to an agent to enable automatic context retrieval during conversations.

Agent Configuration
{
  "name": "Customer Support Agent",
  "model": "gpt-4",
  "systemPrompt": "You are a helpful support agent...",
  "knowledgeBase": {
    "corpusId": "support-docs",
    "topK": 3,
    "autoRetrieve": true   // Automatically search for context
  }
}

Next Steps