glossary

Context and retrieval

Retrieval-augmented generation (RAG)

Retrieval-augmented generation fetches passages from an external store and then asks the model to answer from those passages, as a fixed retrieve-then-answer path rather than a loop that decides whether to search again.

Abracadabra Team Glossary

How it works

The path is fixed by the program. A query is formed, a retriever returns a set number of passages, those passages are written into the prompt, and the model answers. The model does not choose the index, the query, or a second search. If the passages are right, the generator can quote a rule that was not in its weights. If they are wrong, a fluent answer still comes out, grounded in the wrong page. The generation step does not go back to fetch a better one.

That fixed shape is the point of the name, and it is the contrast with agentic RAG. Chunking, embeddings and ranking decide what the one fetch can see. The window still has to hold the passages plus the instructions. RAG does not expand the window. It spends the window on text that came from outside the conversation. Evaluating the answer alone hides whether the fetch or the wording failed.

A worked example

Two prospectus chunks, then one answer

An admissions bot at a university answers "Can I defer entry for a year after I firm an offer?" The program always embeds that question, takes the top two chunks from the prospectus index, and calls the model once. One chunk explains how to firm an offer. The other explains term dates. Neither states the deferral rule, which lives on a page titled "interrupting before enrolment". The bot says deferral is arranged with the academic department and invents a deadline. The path had no second query. A person in the admissions office later pastes the interrupting page into the chat, and only then does the reply match the prospectus.

Illustrative example, not a production trace and not a measured result.

What goes wrong

  • The single fetch returns neighbours of the question and misses the page that states the rule, and the model answers from those neighbours without a further search.
  • The passages are pasted below a long system prompt and get truncated out of the window, so the call is labelled RAG while the model never saw the evidence.
  • The answer cites a chunk that was retrieved but does not contain the claimed rule, and a reader who only checks that a citation exists treats it as grounded.

How to measure it

For a set of questions with a known page, record whether that page was in the fetched set, and whether the reply's claim appears in the fetched text. Keep the passage ids on the same turn as the answer.

When the reply is wrong, separate a missing page from a page that was present and misread. After you change the index or the number of passages, compare task success for that task and cohort.

Further reading

How Abracadabra helps

Corrections that paste the missing page, or that contradict a cited chunk, mark a fixed fetch that never held the fact. After the index or the passage count changes, compare task success for that task and cohort.

When context is lost, people restate a fact or repeat the request. Abracadabra pins those corrections and repeated intents to the turn. After a change to what the agent keeps, compare task success for that task and cohort with the previous period.

Request access to read this on your own agent.

See it in your own agent's conversations.

Each task, the step where it stops, and the conversations behind every count. Free during early access.