How Retrieval Works
When you add a knowledge source, AETHER runs it through a RAG pipeline so the agent can find and quote the right passage at answer time. This page explains what happens under the hood — useful when tuning what you feed an agent.
The pipeline
- Extract — text is pulled from the PDF, file or URL.
- Chunk — the text is split into small, topically-focused passages with slight overlap so a single fact isn't diluted across a huge block or lost at a boundary.
- Embed — each chunk is converted to a vector embedding that captures its meaning.
- Index — embeddings are stored in a vector index (PostgreSQL + pgvector) for fast similarity search.
At answer time
- The user's message is embedded with the same model.
- The most similar chunks are retrieved from the index.
- Those chunks are supplied to the model as context, and the agent composes an answer grounded in them.
- The passages used can be surfaced as citations on the response.
Why chunking matters
Smaller, overlapping chunks keep each embedding focused on one idea, which makes retrieval more precise. A single page collapsed into one giant chunk buries specific facts; well-sized chunks let the agent pull the exact sentence that answers the question.
Tip: Quality in, quality out. Clean, well-structured documents retrieve better than scanned images or pages heavy with navigation chrome. Prefer text-based PDFs and focused pages.
Cost note
Embedding generation consumes tokens on an embedding model. You can see embedding usage and cost alongside chat usage in the admin reports.
Next steps
- Connecting MCP Tools — add live actions on top of knowledge.
- Invocation Logs, Tokens & Cost — see retrieval's footprint.