A recap of Session 5 of The AI FDE Certification, Cohort 1 (#FDE1) · By the AI Makerspace Curriculum Team
Session 5 was about a problem most teams discover late: nobody is quite sure how their app does retrieval. Dr. Greg Loughnane spent the day before class with a private equity firm helping its portfolio companies use AI, and the pattern was familiar. Someone excited and not very technical, or somewhat technical, had vibe-coded something that retrieves information, and now the team had to figure out how it worked, dial in the retrieval, and dial in the evals.
This session gave us the tools to do that. We revisited classic RAG, then covered agentic RAG, LLM wikis, and direct corpus interaction (DCI), and spent most of the time on the real question: which one should you use?
Retrieval, Put Simply
Dr. Greg gave the shortest possible definitions. RAG is giving the LLM things it wasn’t trained on. Agents are giving the LLM tools. Agentic RAG is giving it access to new information through a tool interface, inside a loop: the model takes an action, the result is fed back into context, and it decides what to do next.
The goal behind all of it is that we don’t want LLMs to lie to us. Retrieval won’t make an answer absolutely true, but it makes it fact-checkable, which is what stakeholders need.
What to Use in a Prototype
Tyler Laughlin’s advice for prototypes is that speed matters most, and nothing is faster or easier than an exact match, as long as you know what you’re looking for. You can bring in more complicated pieces as you progress. Tools like Elasticsearch and OpenSearch keep an inverted index, so only chunks containing a specific word are grabbed rather than the entire corpus. An LLM wiki works the same way: it only goes to pages whose index and description match, and it won’t look in a dog care wiki when you’re asking about cats.
Dr. Greg shared a latency comparison from a notebook in the beginner course. A BM25 retriever took 0.5 milliseconds, while a hybrid approach with a multi-query retriever and parent-child document retrieval took 5,111 milliseconds. Speed and quality both matter, and which one matters more depends on the use case.
What about vibe coding? Without examples, a coding agent builds whatever is the simplest way to return an answer. And with closed-source systems, you may not know what retrieval is happening under the hood at all.
It Depends on Your Data
As you move toward production, Tyler Laughlin said, the choice becomes data-driven:
If correct answers reside on specific pages maintained by a knowledge-transfer team or in a clearly structured wiki, a DCI and LLM wiki approach can perform far better in terms of latency and tool calls than a chunked system.
If you have 100,000 Jira tickets with CSVs and comments attached, and nobody maintaining the indexes, a chunk-based system may be better, because you need something that can cope with chaotic storage.
If you have a multi-million-row SQL table, you may want an entirely different route: a data query tool the agent can call.
His own work involves SQL tables, Jira, and wikis, each with a different retrieval approach, combined downstream.
Dr. Greg’s take: if you can structure your data so it fits in a CSV or a simple database schema, retrieval is trivial at prototype scale. A lot of people get bogged down choosing the perfect retriever when they’ve spent zero time structuring their data. Where we used to talk about model-centric versus data-centric, we now talk about retriever-centric versus data-centric.
LLM Wikis and Direct Corpus Interaction
The idea behind the LLM wiki comes from Andrej Karpathy: instead of uploading files, chunking, retrieving, and re-embedding everything whenever anything changes, you build a persistent, growing wiki that keeps compounding. Searching it with agentic search means the agent doesn’t one-shot an embedding or keyword pipeline. It looks over here, reasons, looks somewhere else, and reasons again, using the general-purpose tools a coding agent has in a terminal.
That helps with questions RAG finds hard: the big theme of an entire book, answers that must contain an exact part number, multi-hop questions, and answers that depend on text a page or ten above.
Tyler’s definitions for the notebook:
An LLM wiki is a group of Markdown pages with stable names, headings, and a navigational index page. Without the index, you just have pages with no navigation, and DCI doesn’t work as well.
Direct corpus interaction means there’s no chunk retriever. The agent reads pages directly.
Agentic RAG means the agent runs several chunk searches and reformulates between them, so you don’t have to iterate yourself.
A question in the chat sums up the difference. What separates an LLM wiki from an organized folder of Markdown files? Ovo’s answer: a folder of Markdown is raw source the agent has to re-read and piece together every time, while a wiki is a linked summary the agent writes and keeps up to date, so the work is done once and reused.
The Bake-Off
Tyler ran the notebook with Nadia, a second-level support engineer at a regional broadband and mobile operator. Her tickets don’t contain the answer, so she has to find it in a small knowledge base of seven pages: runbooks, tariffs, and codes, mostly Markdown plus one small CSV. The agentic RAG side turned those pages into 67 chunks indexed with BM25. The DCI side could list the pages and grep the wiki.
In one example, the question was which plan costs £45 a month and how long you’re tied in for. Agentic RAG needed two calls and 5.9 seconds, searching first for the price and then for the minimum term. DCI needed one call, because it could read the tariffs page directly.
Across seven cases, the pattern was clear:
DCI wins on vocabulary mismatches (none of the page’s words are in the question), deep sections longer than a chunk, and “which pages mention X” questions, where it can cite the page itself.
Agentic RAG wins on broad questions where the answer is spread across multiple sources or pages that must be read together.
Exact match works with either one. It’s a choice between bag-of-words and an exact string.
Declining worked with both, but agentic RAG ran far more searches to learn the answer wasn’t there, while DCI only needed to read a page.
Tyler’s TL;DR: if you’re looking for a specific thing in a specific place, DCI is generally better. If the answer is complex and lives in many places, agentic RAG gets there quicker. And one rule applies to both: set a maximum number of turns, so a runaway loop doesn’t waste your customer’s time and your budget.
Taking it From Notebook to Production
The notebook is simpler than production in several ways.
A local BM25 over seven pages becomes denser hybrid retrieval, or indexes rebuilt whenever wiki pages change.
A wiki needs navigation, link validation, ownership, and freshness, so a stale page doesn’t lie to a customer.
Permissions matter. If managers can only see payroll for their own team, you have to chunk by security as well as size.
Keyword checks aren’t enough. A search for “Acrobat” that returns acrobats doing flips would show your corpus contains the wrong data, so you need human-calibrated checks like the goldens you’re building.
Max-turn limits become rate limits and timeouts built into the tool.
Tyler’s decision rule: choose the cheapest interface that passes your questions, and write down which corpus changes would make you reconsider. The inputs are what you’re consuming, how large the documents are, how complex the answers need to be, and how big a support team you have to maintain the sources. With data people to maintain a wiki, DCI pays off. Without them, starting with agentic RAG will probably be easier to maintain, even if it’s less efficient on tool calls.
Questions From the Room
Which approach is easier to trace? Tanner Davis thought agentic RAG’s trace looks more logical to a human than “grepWiki number 45.” Tyler found the reverse: DCI cites the actual page name, which non-technical users know from wikis, while RAG traces a chunk ID. But you earn that by maintaining a wiki, and if you’re getting started, RAG is easier. Tanner suggested metadata could fix it, and Tyler agreed: rigorous metadata tied to chunks gets you most of the way, especially in environments like Databricks or Amazon Bedrock.
What if answers depend on the state? Brian Zeichick described a Medicaid project where one state’s answer is wrong in another. Tyler said either approach can work, but you have to plan: tag chunks with metadata or keep separate indexes, or keep one wiki page per state. Combining state and federal law makes it harder. Legal, he said, is the most high-stakes version of “don’t quote the wrong chunk.”
The Big Idea: Three Dimensions
Jacob closed with a panel on when to use each technique. Tyler’s version: avoid garbage in, garbage out, and use natural groupings a human can double-check. Dr. Dragos Crintea added that you may have to use whatever your cloud provides, that the two approaches come at the problem from opposite ends (finding an answer you don’t know versus using knowledge that’s pre-prepared), and that prototypes often die before production because of security and data access. Phil Mui offered a framework:
Best retriever, or an agent that investigates?
Two years ago, the energy was on retrieving the most relevant fragment in one shot. Now it’s on giving an agent a way to investigate and verify evidence within a time or token budget. Phil’s example: if an agent in a microVM could have one tool, it would be bash, because bash means everything else. But that can be slow, so a voice application might need BM25.
Exact or semantic?
Semantic search fails on corner cases. In his turbine example, a model 501 and a model 601 are serviced differently, and the world’s best semantic search may return the replacement part for the wrong one. The answer is hybrid search, combining semantic with keyword. Freshness. Interest rates change constantly, and updating a large semantic index is painful. Use a live API for authoritative, up-to-date data.
The summary: semantic search is great for discovery, BM25 for exact position, and an API for the latest.
Choose the simplest combination that meets your quality, freshness, permission, and latency requirements. Tyler added the last piece: RAG is great at “find the passage most like my question” and bad at “prove the corpus does or doesn’t contain this,” while DCI is the opposite and isn’t efficient at searching 900 loosely connected Jira tickets.
What’s Next
Next up is Multimodal RAG, where the same questions meet images, documents, and video. Technical Challenge 3 in the course asks students to implement an MVP with the right retriever for their use case.
This session recording is available here: [VIDEO LINK]
Follow along for more lessons, or join us for the next cohort in January.
Build. 🏗️ Ship. 🚢 Share. 🚀
Your Curriculum Crew at AI Makerspace
Sources and Links
- AI FDE Certification Session 5: Agentic Search & Retrieval (recording): https://youtu.be/XOouQFgNrSY?si=0VSOypy3i6WUllBb
- The AI FDE Certification on Maven: https://maven.com/aimakerspace/ai-fde-certification
- The AI FDE Certification at AI Makerspace: https://aimakerspace.io/the-ai-fde-certification/
- FDE Field Notes: https://aimakerspace.io/fde-field-notes/
- Session 1 recap: https://aimakerspace.io/fde-cohort-1-kickoff-development-environment/
- Andrej Karpathy, “LLM Wiki” (GitHub gist): https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f