NAiOS IconNAiOS Logo
NAiOS Wiki

RAG (Retrieval Augmented Generation)

También: RAG · Retrieval-Augmented Generation · Retrieval-Augmented Generation

Combine real data search with text generation

1 min de lectura

Retrieval-augmented generation is a technique that combines a language model with an external information retrieval system. Instead of relying solely on knowledge learned during training, the model queries a database, documents, or vector indices in real time and uses that retrieved information to construct its response.

The process typically follows three steps:

  • Retrieval: the most relevant fragments for the user's query are searched for.
  • Augmentation: those fragments are added to the context the model receives.
  • Generation: the model produces a response based on that material.

Its importance lies in the fact that it reduces hallucinations and allows for working with updated or private data without the need to retrain the model. It is especially useful in corporate assistants, where the response must be based on specific internal documentation. A practical nuance: the final quality depends on both the model and the retrieval phase, so a poorly constructed index degrades the results even if the model is excellent.

¿Quieres profundizar?

Lee nuestros artículos sobre IA aplicada en el blog de NAiOS.

Ir al Blog