# What is RAG?

> RAG connects a language model to external information sources to ground its answers. Learn how it works, its limits and the controls needed in production.

- URL: https://www.codarasolutions.com/en/glosario/rag
- Language: en
- Collection: Glossary
- Author: Codara
- Published: 2026-05-27
- Updated: 2026-11-23
- Tags: rag, llm, datos

**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](/en/glosario/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.

**Figure: How a system with RAG answers.**

1. The question: A query comes in
2. Retrieval: The relevant fragments from your sources
3. Generation: The LLM composes the answer over them
4. Answer: Anchored to your data, ideally citing the origin

## 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](/en/glosario/agente-de-ia) that needs to consult reliable information before acting. It is an alternative or complement to [fine-tuning](/en/glosario/fine-tuning-vs-rag).

## 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](/en/glosario/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](https://learn.microsoft.com/en-us/azure/search/retrieval-augmented-generation-overview) 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](/en/blog/rag-o-fine-tuning) and the [AI knowledge search use case](/en/soluciones/busqueda-conocimiento-interno-ia).

We connect your information sources to the agents in the [AI products we build with your team](/en/agentic-os), with permissions and traceability back to the origin, so the answers rest on your real, verifiable knowledge.

## How Codara helps

**AI products built with your team**

AI software we design, build and run around the work of one team, connected to its data and tools, with human review.

[See AI products](https://www.codarasolutions.com/en/agentic-os)

## Frequently asked questions

### 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.


---

- Agent index: https://www.codarasolutions.com/llms.txt
- Full text (every page + FAQ): https://www.codarasolutions.com/llms-full.txt
- Sitemap: https://www.codarasolutions.com/sitemap.xml
- Contact: info@codarasolutions.com
- [Codara Community on Discord](https://discord.gg/9euUzq4rXy)
