Ground every LLM answer in your own documents.
Retrieval Augmented Generation feeds your LLM the passages it needs, then asks it to compose a cited answer. CogniWeave provides the ingestion, indexing, and retrieval—use any LLM on top.
Definition
Retrieval Augmented Generation (RAG) couples a retriever—usually a vector or hybrid search system—with a large language model. The retriever finds relevant context; the LLM composes a grounded answer over it.
How it works
- • Ingest: documents are chunked and embedded into a vector index.
- • Retrieve: at query time, the top-k most relevant chunks are fetched.
- • Augment: those chunks are inserted into the LLM prompt as context.
- • Generate: the LLM produces an answer with citations to the chunks.
When to use it
Use RAG for assistants over private knowledge—policies, contracts, manuals, support history, research libraries—where the underlying corpus changes faster than you can fine-tune, and where every answer needs a traceable source.
Trade-offs vs. fine-tuning
Fine-tuning is good for shaping tone, format, and reasoning patterns. RAG is good for facts and freshness. They compose: fine-tune the behaviour, retrieve the knowledge.
The CogniWeave advantage
CogniWeave is RAG-as-a-service with its own managed memory engine. Ingestion, OCR, chunking, embedding, indexing, hybrid retrieval, reranking, and citation lineage are all included. Bring your LLM of choice—we deliver the grounded context.
Integration in a few lines
- • POST documents to /api/v1/ingest to add them to your workspace.
- • POST a query to /api/v1/retrieve to get the top-k cited passages.
- • Pass the passages as context in your call to Claude, GPT, or any LLM.
- • Render citations in your UI using the passage and document metadata.
Common questions
What is RAG (Retrieval Augmented Generation)?
RAG is a pattern where an LLM is given relevant passages from a private corpus at query time, instead of relying solely on its training data. The model reads the retrieved context and generates an answer grounded in those passages, with citations.
Why use RAG instead of fine-tuning?
Fine-tuning bakes knowledge into model weights and is expensive to update. RAG keeps knowledge in an index you can edit in seconds, supports per-tenant data, and produces auditable citations. Most production assistants use RAG; fine-tuning is reserved for style and behaviour, not facts.
Can I use CogniWeave with Claude, GPT, or open-source LLMs?
Yes. CogniWeave is a retrieval layer. Query our API for the top-k passages relevant to a question, then pass them as context to Claude, GPT-4, Llama, Mistral, or any LLM you operate.
How does CogniWeave reduce hallucination?
Every answer is grounded in retrieved passages and surfaced with citations linking back to the source chunk and document version. Lineage is visible in the workspace and logged for audit.