RAG

RAG (retrieval-augmented generation) is a method where a system first fetches passages relevant to a question from your own sources, adds them to the prompt and then lets the model write an answer based on them.

How does RAG work?

The term comes from a 2020 research paper by Patrick Lewis and colleagues at Facebook AI Research. A RAG system has two parts: retrieval, which searches documents, a database or an index for passages that match the question, and generation, where the model writes the answer with those passages in its context.

RAG can fail in two places. Retrieval can miss the right passage or fetch the wrong one, and the model can ignore what it was given or add claims of its own. A good RAG answer is grounded: every claim can be traced to a passage that was retrieved.

What does RAG mean in Eva?

Eva judges every answer against the criteria your team wrote, for example that an answer only states what your documents say, and asks your users whether the answer helped.

See also

Want to see it on your own product?

Apply for accessTalk to a founder