How Would You Chunk These Documents for RAG?
The interviewer asksYou're building RAG over long technical manuals with tables, numbered steps and diagrams. How would you split them into chunks?
AI Product EngineerForward Deployed EngineerCoreBuild roundRepresentative7 min
On this page
The 30-second version
- Start from the questions people ask: single facts, procedures, troubleshooting?
- Split along the document's structure: sections and headings, not fixed character counts.
- Keep tables and numbered procedures whole; never split a step list in half.
- Add context to each chunk: document title, section path, product version.
- Compare strategies on a retrieval eval (is the right chunk in the top results?).
What it's really testing
- Chunking trade-offs
- Using document structure
- Testing retrieval choices
How to structure your answer
- Understand the questions.
- Chunk by structure.
- Handle tables, steps and diagrams.
- Test with retrieval evals.
The interview, played out
- InterviewerYou're building RAGRetrieval-augmented generation. Fetching relevant documents and putting them in the model's context before it answers. Read the full explanation over long technical manuals with tables, numbered steps and diagrams. How would you split them into chunks?
- CandidateWhat do people ask? A single spec value, or a whole procedure?
- Revealed when askedMostly "how do I…" procedures and troubleshooting.
- CandidateThen chunks must keep procedures whole. If step 4 lands in a different chunk from steps 1 to 3, answers will be incomplete. So I'd split along the manual's headings, keeping each procedure and each table as one unit.
- Strong moveDerives chunking from the questions asked.
- CandidateEach chunk gets the manual title, the section path and the product version attached, so search and the answer both know where it came from.
- InterviewerWhat about diagrams?
- Missed signalDiagrams should be addressed in the design, not as an afterthought.
- CandidateUse their captions and surrounding text; for key diagrams, generate a short text description to index.
- CandidateAnd I'd compare two or three chunking strategies on a set of real questions, measuring whether the right chunk appears in the top five.
The strong answer, distilled
- Questions first: mostly procedures and troubleshooting.
- Chunk by structure: headings and sections; procedures and tables kept whole.
- Context per chunk: title, section path, product version.
- Diagrams: captions, surrounding text, generated descriptions for key ones.
- Test: compare strategies on recall in the top results for real questions.
This is one strong answer, not the only one.
How it's scored
| Dimension | Weak (2) | Passable (3) | Strong (5) |
|---|---|---|---|
| Approach | Fixed-size chunks | Paragraphs | Structure-aware, keeping procedures and tables whole |
| Context | None | Source name | Title, section path, version |
| Testing | None | Spot checks | Retrieval eval comparing strategies |
Round scorecard: FDE: technical and build round, filled in for the mock candidate
| Dimension | Weak | Passable | Strong | The mock candidate |
|---|---|---|---|---|
| Clarifying | Starts coding immediately. | Asks a few questions. | Pins down the goal, inputs and what done means first. | Strong. Asked what questions people ask of the manuals. |
| Approach | Unworkable or over-built. | Workable. | The simplest approach that works, stated before building. | Strong. Structure-aware chunks that keep tables and steps whole. |
| Testing | Tries one happy-path input. | Tries a few inputs. | Tests varied and bad inputs, and checks outputs systematically. | Strong. Compared chunking strategies on retrieval metrics. |
| Trade-offs | None mentioned. | Some. | Says what was cut, why, and what comes next. | Passable. Mentioned diagrams only when asked. |
How the answer changes by role
| Role | What to emphasise |
|---|---|
| AI Product Engineer | Implementation and the comparison eval |
| Forward Deployed EngineerForward Deployed Engineer. An engineer embedded with customers who scopes, builds and ships AI solutions into production. Read the full explanation | Adapting to the customer's document formats |
Common mistakes
- Fixed-size chunks that split procedures
- Dropping tables or diagrams
- Choosing a strategy without testing
More follow-ups to practise
- "Manuals exist for five product versions." Hint: filter by version before search.
- "A procedure is 40 steps long." Hint: keep it whole and use a larger chunk, or link sub-chunks.
Go deeper
- Module: RAG and retrieval
- Framework: Build Round Framework
- Framework: Opening Any Interview Answer
- Lesson: How retrieval works
- Also tests: Agent and RAG evals
Sources
Representative question: written to match build rounds for AI product roles, not a specific reported interview.