Free 6-page guide

RAG From Scratch

Everyone bolts an LLM onto their app and ships it — then wonders why the output is generic. The fix isn't a bigger model, it's better context. Here's the exact RAG architecture behind Hookem: how retrieval makes an AI answer like it knows you, not the average of the internet.

Free 6-Page Guide

Everyone bolts an LLM onto their app and ships it — then wonders why the output is generic. The fix isn't a bigger model, it's better context. Here's the exact RAG architecture behind Hookem: how retrieval makes an AI answer like it knows you, not the average of the internet.

What's inside

The six-stage RAG pipeline — indexing vs retrieval — and the one stage that does the real work
The three decisions RAG lives or dies on: chunking, separating sources, and embedding choice
The relevance trick: why retrieving 3 of 12 sources beats stuffing everything into the prompt
Four retrieval-quality fixes in the order they pay off — metadata filtering, hybrid search, reranking, query rewriting
The prompt skeleton and a 6-point build checklist you can ship against

Get instant access

Free. No spam. Unsubscribe anytime.

01
What You Get
The six-stage RAG pipeline — indexing vs retrieval — and the one stage that does the real work
The three decisions RAG lives or dies on: chunking, separating sources, and embedding choice
The relevance trick: why retrieving 3 of 12 sources beats stuffing everything into the prompt
Four retrieval-quality fixes in the order they pay off — metadata filtering, hybrid search, reranking, query rewriting
The prompt skeleton and a 6-point build checklist you can ship against
02
The Details

What's inside

A raw model only knows what it saw in training — the average of the internet. It has never read your work, your customers, or what's converted for you, so it regresses to the mean. RAG (Retrieval-Augmented Generation) fixes that by fetching the few things that actually matter and handing them to the model before it answers — turning a closed-book exam into an open-book one.

This guide walks the full system end to end, using Hookem's architecture as the case study: the six-stage pipeline (ingest, chunk, embed, store, retrieve, augment), the three decisions that make or break retrieval quality, and why more context is not better context.

You get a concrete metadata schema for tagging and filtering sources, four retrieval-quality techniques in the order they pay off, a prompt skeleton that keeps the model grounded, and a six-point build checklist — enough to build a real RAG system, not just understand one.

Who this is for

Developers who've wired up an LLM and want it to stop giving generic, average answers
Builders adding AI features who keep hearing 'RAG' and want the real architecture, not buzzwords
Engineers who want a buildable, end-to-end mental model of retrieval before they commit to a stack

About the author

Jonathan is a software engineer at Amazon, building Hookem — an AI tool that analyses what makes content go viral — alongside his day job.

Every product decision is documented in public. These guides are the written version of that process.

Ready to get started?

Free 6-page guide. No spam. Takes 30 seconds to unlock.

Get the free guide →

More guides

The Hook Formula

4-page guide · Free

The Two-Way Door

4-page guide · Free

R2 vs S3

6-page guide · Free

Autonomous Agents vs Workflow Agents

7-page guide · Free

Git Worktrees

4-page guide · Free

10 Claude Skills Every Dev Needs

5-page guide · Free

AI Agent Frameworks, Ranked

13-page guide · Free

More guides dropping as they ship.