Retrieval-Augmented Generation (RAG) combines a language model with a searchable knowledge base. The application retrieves relevant sources before generating an answer.
How RAG works
- Split and index your documents.
- Retrieve the most relevant passages for a user question.
- Provide those passages as context to the model.
- Return an answer with source references.
RAG is useful when answers must reflect private, changing, or domain-specific information.