AI Fundamentals

The RAG Pipeline: How Your Content Gets Selected in Four Steps

Retrieve, filter, extract, reassemble. Every time a model answers a question, it runs through these four steps—and each one is an elimination round. Figure out which step you're losing at, and you'll know which part of the page to fix.

The RAG Pipeline: How Your Content Gets Selected in Four Steps

Bottom line first: when a model answers a question, it doesn't "read your webpage"—it runs a four-step pipeline: first retrieve a batch of candidates, then filter out the untrustworthy ones, then extract sentences from the trustworthy ones, and finally assemble an answer. Most websites don't fail at step one; they fail at steps two and three: they get retrieved but aren't trusted, or they're trusted but no complete sentence can be extracted.

Step One: Retrieval — Get Into the Candidate Pool

The model searches for a batch of potentially relevant pages based on the question. This step mainly looks at: whether the topic is clear, whether the page is crawlable, and whether the title and content actually match the question.

Common failure points: the title reads like an ad slogan while the body talks about something else; the page loads but the main content is all images; the same topic is scattered across ten pages, none of them complete.

Step Two: Filtering — Judging Trustworthiness

At this step, the model is comparing "who looks more like someone who knows this subject": is there a byline, is there an organization, do the data and claims have sources, is there an update date, is the expression consistent throughout.

Common failure points: the whole page says "industry-leading" and "trustworthy" without a single verifiable fact; the content is good, but the author, organization, and team background are all blank.

Step Three: Extraction — Can a Passage Be Quoted

The model needs a passage it can directly restate. If the answer is scattered across five paragraphs, or one paragraph crams in three points, it can't extract it and will use someone else's instead.

Common failure points: one paragraph covers multiple points; conclusions exist only in charts; definitions are written in a convoluted way; comparisons are described in prose instead of tables.

Step Four: Reassembly — In What Tone You Get Written Into the Answer

When assembling the final answer, the model decides whether you are the "main basis" or a "passing mention," and whether the tone is positive or doubtful. This step is determined by the combined signals from the previous three steps, as well as by external mentions.

StepWhat the model is judgingWhat you can change
RetrievalIs this page about this questionAlign title and opening paragraph with the question; don't hide content in images
FilteringIs this source trustworthyByline, organization, sources, update date
ExtractionIs there a passage that can be used directlyOne point per paragraph, conclusions up front, comparisons in tables
ReassemblyWhere should you be placedConsistent messaging site-wide + consistent external mentions

How to Tell Which Step You're Losing At

  1. Ask AI your core question and see whether it mentions you — if not, fix step one first.
  2. It mentions you but the tone is vague, saying "according to a certain website" — fix step two.
  3. It mentions you but quotes someone else's description of the product, not your own words — fix step three.

Related reading: EEAT: Why the Model Trusts You, Structured Writing: Let the Model Extract Whole Passages.