RAG Lab

Eight retrieval-augmented generation architectures built on one shared base and measured the same way, with a demo you can ask.

What it is

A study I'm running on one question: which RAG architecture gives the best answers for the cost? I built eight retrieval-augmented generation architectures, from plain top-k retrieval to an agent that picks its own search tools, and they all stand on one base: the same corpus, the same chunking and embeddings, the same vector store, the same model and the same system prompt. The architecture is the only thing that differs between them.

The evaluation is still running, so this page describes the design and reports no results. In the meantime you can ask the eight yourself.

Why a controlled comparison

Published RAG comparisons usually line up systems that differ in more than their architecture: a different model, a different chunk size, a different prompt, sometimes a different corpus. When one comes out ahead, there is no telling which of those differences did it. I wanted to know what each architectural idea buys on its own, so everything that is not the architecture is held fixed, and the fixed part lives in one package that every architecture has to install.

That trades breadth for attribution. Eight architectures on one corpus in three domains will not say which system wins everywhere. What the setup can do is isolate what a mechanism like query rewriting or self-critique changes when nothing else moves.

The eight architectures

Simple is the baseline. Each of the other seven adds one mechanism to it and reuses everything else. The last column is the most model calls the pipeline can make for one question. Judging adds its own calls, which are counted separately.

ArchitectureWhat it changes about retrievalModel calls, at most
SimpleNothing. It retrieves the top four chunks for the question and answers from them.1
MemoryCondenses the earlier turns and the new question into one standalone query before it searches. The answer still sees the original question and the full history.2, or 1 with no history
HyDEHas the model draft the passage it expects to find, then searches with the draft instead of the question. The answer never sees the draft.2
BranchedAsks the model which of the corpus's three domains could answer the question, then searches only those domains.2
AdaptiveAsks the model whether the question is simple or complex. A simple one is searched once. A complex one is split into two to four sub queries, each is searched, and four chunks are chosen across them.4
CorrectiveGrades every retrieved chunk for relevance in one call. When fewer than three in four pass, it rewrites the question and replaces the failing chunks with fresh ones.3
Self-reflectiveAnswers first, then asks in one call whether the answer is grounded in its chunks and whether they were enough. If either is no, it searches again with a changed query and answers once more.3
AgenticLets the model choose, turn by turn, among vector search, keyword search and looking up a whole document, then answers from four of the chunks it gathered.8, over at most 6 turns

The ceilings are part of the design, not a measurement. Cost is half the question, so a mechanism that may call the model eight times has to be weighed against one that calls it once, and a fixed ceiling means no pipeline can keep looping until it happens to land a better answer.

Every mechanism also has a way to work against the question, by construction. HyDE searches with whatever its draft got wrong. A branched route that misses a domain never searches it. A rewritten follow-up can drop what the follow-up meant. Those cases are part of what the comparison is for.

The shared framework

One base package holds everything that could confound a comparison. Every architecture installs it from a pinned version rather than copying from it, and overrides only the retrieval or orchestration layer.

  • Corpus. 90 Wikipedia articles in three domains: space exploration, human biology and machine learning, fetched from a manifest.
  • Chunking. Recursive character splitting at 1,500 characters with a 150 character overlap, so every chunk has a fixed id.
  • Embeddings and store. all-MiniLM-L6-v2 at 384 dimensions, cosine similarity, in a Chroma vector store.
  • Retrieval. k = 4 chunks per answer, each tagged with its source so the answer can cite it.
  • Model. One model for every call an architecture makes, gpt-oss-120b on Groq at temperature 0.
  • System prompt. One, shared word for word: answer only from the context, say so when the context does not hold the answer, and cite the sources used.

Because the shared part is one versioned package, two architectures cannot drift apart on chunking, embeddings or the prompt without it showing up as a different base.

The evaluation design

Each guard here exists because of a specific way a comparison like this goes wrong.

  • A frozen 120-question set. The questions were written once and then frozen, with a digest of the file pinned in the shared base. A question set that can still change can be tuned, on purpose or not, toward whichever architecture looks best so far.
  • Digest-verified inputs. The corpus, the question set and the chunk ids each have a digest pinned in the shared base, and a run checks its own inputs against them. Wikipedia articles change, so a corpus fetched a month later is a different corpus, and so is one chunked differently. Two runs only compare if they read the same bytes.
  • Provenance checks. A separate benchmark archives every results file under a digest of its bytes and refuses a run whose provenance or record shape makes it incomparable. A number whose inputs cannot be named is an anecdote, and archiving by digest means an accepted file cannot be quietly edited afterwards.
  • Blind LLM judging. Answers are scored by an LLM judge in one pooled pass over every accepted record, with the architecture's name kept out of what the judge sees. A judge that knows it is reading the agentic pipeline has a label to lean on. Pooling means every architecture is judged in the same pass under the same conditions, not by whatever setup was current when its run landed.

Results are in progress. None appear on this page until they are final.

The demo

The demo puts all eight in front of you on the same corpus. Pick an architecture, ask about space exploration, human biology or machine learning, and you get the answer, the chunks it was built from with their similarity values, and a trace of what that architecture did on the way: the rewritten query, the route, the chunk grades, the critique, the sub queries or each tool step, depending on which one you picked. Ask two architectures the same question and compare the traces. That difference is what the study is about.

What it deliberately does not do:

  • No scores and no ranking. A demo answer is one answer to one question. Placed next to a study number it would be read as evidence for that number, so the demo shows none.
  • No questions from the frozen set. The sample questions were written for the demo, and a test fails if one matches a question from the frozen set, so no study item ever appears with an answer beside it.
  • No topic filter. A question outside the three domains goes to the architecture like any other, and the architecture declines it the way it was built to. How each one handles a question it cannot answer is part of what there is to see.
  • No unlimited asking. It runs on a free-tier model key, answers one question at a time and is rate limited. Greetings and questions about the demo itself are answered from fixed text, without a model call.

Try it

Open the demo. Start with Simple to see plain retrieval, then ask another architecture the same question and compare what it did differently.