Everyone talks about RAG (Retrieval-Augmented Generation), but most explanations stop at the surface level. In this episode, we dig into the actual mechanics of how RAG systems work - and why those details completely change how you should think about creating AI-ready content.
You'll learn:
Why RAG systems never actually "see" your documents
How the three-stage retrieval pipeline really works
What happens when your content gets chunked
How to optimize content for each stage of the RAG process
This isn't just theory - understanding these mechanics is essential for anyone creating content that will be used by AI systems.
Key Topics Covered
The Chunking Revelation
RAG systems immediately fragment documents into 75-375 word chunks
Each chunk becomes an independent, isolated unit
The system has no awareness of original document structure
Your carefully organized content becomes disconnected fragments
The Three-Stage RAG Pipeline
Initial Retrieval: Casts a wide net, retrieving 20-100 candidate chunks using hybrid search (keyword + semantic)
Re-ranking: Uses cross-encoders to precisely score each chunk, narrowing to 2-6 best matches
Generation: Only final ranked chunks get passed to the LLM for answer generation
Practical Implications for Content Creators
Design content in semantic chunks from the start
Use clear, descriptive titles for retrieval
Maintain consistent terminology for re-ranking
Create single-topic, focused chunks for generation
Test how your content actually chunks before deployment
Research Sources
Gao, Y., Xiong, Y., Gao, X., Jia, K., Pan, J., Bi, Y., Dai, Y., Sun, J., Wang, M., & Wang, H. (2024). Retrieval-augmented generation for large language models: A survey. Transactions of the Association for Computational Linguistics, 12, 1-25. https://arxiv.org/abs/2312.10997
Lewis, P., Perez, E., Piktus, A., Petroni, F., Karpukhin, V., Goyal, N., Küttler, H., Lewis, M., Yih, W., Rocktäschel, T., Riedel, S., & Kiela, D. (2020). Retrieval-augmented generation for knowledge-intensive NLP tasks. Advances in Neural Information Processing Systems, 33, 9459-9474. https://arxiv.org/abs/2005.11401
Nogueira, R., Yang, W., Cho, K., & Lin, J. (2019). Multi-stage document ranking with BERT. arXiv preprint. https://arxiv.org/abs/1910.14424
Newsletter: Cyborgs Writing
Interested in collaborating on AI-ready content research? Reach out - Lance is exploring these ideas out loud and welcomes conversation with others working in this space.
Deep Reading is a biweekly podcast taking short, focused dives into AI research for content professionals, technical writers, and educators.
This is a public episode. If you'd like to discuss this with other subscribers or get access to bonus episodes, visit www.isophist.com/subscribe
Audio and video play straight from the show's own hosting. PodSubs stores and serves no media.
Transcript
From the show. Tap a time to play from there.
SPEAKER_00Hey everyone, welcome to Deep Reading. I'm Lance Cummings from Cyborg's Writing, and today I'm digging into some research on rag. Many of us, including myself, know vaguely what rag is, but I think the details really matter. So I've been doing a lot of research on rag lately, or retrieval augmented generation. And I mean really digging into the research papers. If you're creating content for AI systems, you really need to understand how these systems actually work.
SPEAKER_00Not just the marketing version, but the real mechanics. And here's what I've discovered. Most explanations of RAG are technically correct, but can sometimes be misleading. They'll tell you RAG retrieves relevant documents from a database and uses them to generate answers. True, but that definition hides crucial details that completely change how you should think about creating AI-ready content. Today, I want to walk you through what RAG really does step by step,
drawing on the foundational research and recent surveys because understanding these
SPEAKER_00details will shift how you approach content structure. By the way, I'm revising and replatforming my course on writing with machines. As I work through this redesign, the course will be available for paid subscribers to preview and provide feedback. If you're interested in being part of that process, consider subscribing as a paid subscriber. A separate message will go out to paid subscribers soon. Now let me start with something that surprised me. Your RAG system never actually sees your documents.
SPEAKER_00Here's what happens. When you upload a user manual or a knowledge base article to a RAG system, before anyone even asks a question, the system immediately breaks that document into chunks. The 2024 survey by Gal and collaborators on RAG for large language models notes that these chunks typically contain 100 to 500 tokens, roughly 75 to 375 words each. And each chunk gets converted into a numerical representation
called an embedding,
SPEAKER_00stored in a database as a complete, separate, and independent item. From that moment forward, the RAG system only retrieves and works with these individual chunks. It has zero awareness that chunk 23 and chunk 24 came from the same manual. It doesn't know they were originally adjacent. It doesn't know they both came from the installation section. So think about what this means. You carefully structured 50 page troubleshooting guide becomes
100 disconnected fragments.
SPEAKER_00The system treats each one like a separate document. This is why I say the basic definition is misleading. When people say RAG retrieves relevant documents, what they really mean is RAG retrieves relevant chunks. And chunks are not documents. They're fragments that the system created, often by just counting words and cutting wherever it hits the limit. If you write a procedure and it gets split across three chunks,
SPEAKER_00the system might retrieve one chunk without chunk two, giving an incomplete answer. So that beautiful document structure you created gone the moment it gets chunked. Now let's look at how RAG actually retrieves those chunks because this is where it gets really interesting. The original RAG paper by Lewis and collaborators back in 2020 introduced the foundational architecture with the goal of combining what they call parametric memory, which is the model's internal knowledge,
SPEAKER_00with non-parametric memory, which is your external database, the knowledge you want to add. But what's evolved since then is how sophisticated the retrieval process has become. Most people think of RAG as search, find, answer. But Gao's survey identifies what they call advanced RAG and modular RAG, these approaches that use multi-stage pipelines. So for example, stage one can be an initial retrieval.
SPEAKER_00When you ask a question, the system searched through all those chunks and pulls back a broad set of candidates, typically 20 to 100 chunks. This stage is fast, but imprecise. It's like casting a wide net. The system uses hybrid search combining both keyword matching with algorithms like BM25 and semantic similarity using what they call dense vector embeddings. All this really means is that it's looking for your exact words
and for the content
SPEAKER_00that means the same thing using different words. Stage two is re-ranking. Now, the system gets more careful. Research by Nagora and collaborators on multi-stage document ranking showed that cross-encoders, the things that are encoding your knowledge, they jointly encode the query and chunks together and can significantly outperform the initial retrieval. So this stage takes those 20 to 100 candidates and then
examines each one more closely. It looks at your question and each chunk together as a pair and scores how well
SPEAKER_00they actually match. This is computationally expensive, but much more accurate. And this stage narrows the results down to maybe two to six chunks, not just the best ones. So stage three then is the generation. Only those final ranked chunks get passed to the language model to actually generate your answer. Now, why does this three-stage process matter for content creators? Because different content optimizations help at different stages or for different kinds of rag.
SPEAKER_00Clear descriptive titles, for example, help stage one's keyword matching. If your title's vague or generic, the initial retrieval might miss relevant content entirely. Secondly, consistent terminology helps take stage two's semantic scoring. If you use three different terms for the same concept, you're making it harder for the re-ranker to recognize relevance. And finally, focus single topic chunks help stage three generation because the language model can work with the content that's directly relevant rather than
having to extract
SPEAKER_00the useful parts from a mixed topic chunk. This is why understanding the pipeline matters. You might not be optimizing for one search. You could be optimizing for a three-stage process, and each stage has different needs. So what does this mean for you and for how you create AI-ready content? First, think in chunks from the beginning. Don't create long documents and hope the chunking works out. Design each section to be a complete standalone unit.
SPEAKER_00One topic clearly titled with all necessary context, because that's what the RAG system will work with. If your content naturally maps to good chunks, you're starting with an advantage. Second, optimize for each stage of the pipeline. That means descriptive titles for retrieval, consistent terminology throughout for re-ranking, and focus topics for generation. So a chunk titled quote overview tells the retrieval system nothing,
but a chunk titled installing the database on Linux servers tells it exactly what's
SPEAKER_00inside. Third, test how your content actually chunks. If you're serious about AI-ready content, you need to see what happens when it gets chunked. Does the procedure get split? Does the context get separated from the steps? Understanding this lets you adjust your structure before prompts appear. RAG isn't magic. It's a mechanical process with specific steps, and understanding those steps completely changes how you think about content structure. You're not writing for human readers who can flip back and
forth through a document.
SPEAKER_00You're writing for a system that will fragment your content, search through those fragments, and reassemble pieces into answers. That requires a different approach to organization, and that's why I'm exploring structured content and microcontent principles. So the next time someone tells you they're optimizing content for RAG, ask them how and for what kind of RAG, because that detail matters. I'm currently developing testing protocols myself to verify some of these AI-ready content methods, actually putting structured content approaches through
systematic evaluation with
SPEAKER_00RAG systems. If you're working on similar research or want to compare notes, reach out. I'm exploring this stuff out loud because I think we're all trying to figure out what good content looks like in this new context. Until next time, keep reading deeply.
How not to lose a fact between three documents Every copy of a fact is a chance for it to drift. This episode walks through two real cases - an HVAC manual where the filter-cleaning interval got three different answers...
OpenWork is a free desktop app that reads and writes the markdown files on your own hard drive - the open-source counterpart to Claude Cowork. This walks through installing it, choosing a model without handing your...
How do you stop documentation drift? | Q&A Kitchen #1 When the same fact lives in several places, the copies eventually stop matching. For years, only customers and new hires noticed. Now AI systems pull from every...
What Information Actually Is - and why rhetoric figured out first We call everything “information” - context, instructions, facts, background. When the word means everything, it stops being useful, and that vagueness is...