What is RAG?

By Codara · Published: · Updated:

RAG (Retrieval-Augmented Generation) is a technique that retrieves information from external sources and supplies it to a language model as context to ground its answers.

In practice, when faced with a question the system first retrieves the relevant fragments from your sources —documents, databases, internal knowledge— and passes them to the LLM so it composes the answer based on them, ideally citing the origin. This reduces fabrications and keeps the answer anchored to current information that belongs to the organization.

Why it matters

For an organization, the value lies in the AI speaking with its own knowledge and not with generalities. RAG delivers answers that are traceable back to their source, easy to update as the data changes, and it is a common piece inside an AI agent that needs to consult reliable information before acting. It is an alternative or complement to fine-tuning.

What RAG does not guarantee

Retrieving a document does not guarantee it is the right one or that the model interprets it correctly. Check answer quality with evals, including responses when evidence is insufficient.

If sources are copied into an index, changes and deletions must propagate: updating the original document does not automatically update every RAG system. Permissions must also apply during retrieval, before content reaches the model. Microsoft's RAG documentation explains the content preparation, index updates and access controls this design requires.

How we approach it at Codara

Before choosing an architecture, review the comparison of RAG and fine-tuning and the AI knowledge search use case.

We connect your information sources to the agents we build inside Codara's agentic orchestration layer, with permissions and traceability back to the origin, so the answers rest on your real, verifiable knowledge.

FAQ

What is RAG for in a company?

It lets the AI answer with the organization's own knowledge —documents, databases, policies— citing the source, instead of relying only on what the model learned during training.

RAG or fine-tuning?

RAG retrieves information from your sources at answer time; keeping it current requires updating the source and any search index. Fine-tuning adjusts model behavior using examples. The two can be combined.