Answer from your data
Part 1 · Failure and questions6 min read

Why retrieval-augmented generation fails so easily

Why a one-day RAG demo breaks in real work, how context gets lost, and the eight questions to answer before you pick an architecture.

The tutorial version is simple. Collect documents, cut them to a fixed size, attach meaning coordinates, store them, fetch pieces that look like the question, and ask the model to write. A demo takes a day. In real work the answers drift.

The reason is also simple. This is not one technique. It is a pipeline of six steps, and the final quality is set by the weakest step.

What breaks at each step

StepWhat breaksWhat the user sees
ParseTables, multi-column pages, scans, and charts fall apart as textA number sticks to the wrong row
ChunkThe piece loses who, when, and which document"Revenue rose 3%" with no company or quarter
Meaning searchSimilar text is not the text that contains the answer. Names, codes, and numbers are weak spotsAsking for error TS-999 returns a nearby code
RankingA fixed cutoff drops the right piece just outside the listThe document has the answer, but the system says it does not
GenerationRetrieved evidence conflicts with what the model already "knows"A number that disagrees with the citation, or a made-up claim
OperationsChanged or deleted documents stay searchable, and unauthorized documents mix inAn obsolete policy, or a leaked restricted file

The underestimated failure: lost context

A chunk is the unit of search. Cut the boundary wrong and no later retrieval trick can recover the information. Context disappears in six ways.

What disappearsExampleResult
What "this" points to"this company", "that plan"The subject is unknown
Document structureHeading split from body, body split from appendixThe role of the passage is unknown
Table contextA row split from its column headersThe number attaches to the wrong item
Cause and effectCause in one chunk, effect in the nextThe link is never found
TimeThe old plan and the revised plan are separatedThe stale plan is treated as current
Logical connectionClaim, evidence, and exception are separatedThe answer is too sure, or simply wrong

A contract is the clean example. Clause 4 says the customer pays a monthly amount. Clause 9 lists the refund exceptions. If "Can I get a refund?" retrieves only clause 4, the conclusion is wrong. Finding one chunk is not the same as finding enough evidence.

The test is short. If a person cannot understand the chunk by itself, the model cannot either.

Some questions do not fit this shape

Basic retrieval is strong when the answer sits in one place. Three kinds of questions are structurally weak.

  • Global questions need a pass over the whole corpus, such as "what theme keeps recurring?" A handful of chunks cannot answer that.
  • Multi-hop questions chain facts, such as "which customers did the owner of project A handle before?"
  • Aggregation questions count or sum, such as "how many contracts last quarter?" That is a database query, not a search.

If you diagnose every failure as "the model is not good enough," the only remedy left is swapping models. Most failures are already decided while the material is being parsed, split, and stored.

Eight questions before you design

CheckWhat to look atWhat it does to the design
SizeToken count of the whole corpusUnder a few hundred thousand tokens, putting it all in context can be more accurate. Millions of tokens need a retrieval layer
ShapeProse, tables, PDFs, slides, code, or chatTables want queries, visual documents want image search, code wants file navigation
Question mixSingle facts, summaries, connections, totalsFacts can stay on an improved basic stack. Connections and global questions need a graph or a compiled layer
Change rateWrite-once, weekly, or liveFrequent change punishes expensive rebuilds. Live data should be read from the source
Accuracy barCost of a wrong answer, and whether citations are requiredHigher bars add forced citations, reranking, and claim checks
Speed and costSeconds allowed, and budget per questionLive chat stays on one retrieval pass. Research work can search more than once
AccessDoes each person see a different set of documents?Filter permissions during search. Sensitive material may need a model you operate
LanguageKorean only, or Korean mixed with EnglishYou need morphological analysis and tests in each direction

The first method follows the question.

QuestionExampleFirst method
Single factHow many days is the refund window?Hybrid search
Procedure or conditionsWhat are the five conditions for this exception?Structure-aware chunks plus search
Compare documentsHow do A and B differ in their supply chain?Query expansion, or an agent
Relationship, multi-hopHow is the company contracted to X tied to lawsuit Y?A graph
Corpus summaryWhat are the themes in 10,000 tickets?Global graph search, or map-reduce summaries
Fresh or externalWhat changed in the policy yesterday?Search plus a tool on the source system

The first task is not a technology choice

Collect 50 to 100 questions real users will ask, and note where each answer lives. That is the evaluation set. With it, chunk size, search method, and reranking become numbers instead of taste.

A set of only easy questions lies. Include questions with no answer in the corpus, questions that require a connection, and questions about what changed recently.