Chunking
Python Chunking Interview Questions
Chunking is cutting a long document into pieces small enough to embed and search, with a little overlap so that a sentence sitting on a boundary still appears whole in one of them. It is the first step of every retrieval system and the one that quietly decides how good the answers are.
What chunking questions ask you to do
Across the questions here, these are the shapes that come up:
- Split a document into fixed-size pieces that overlap by a set amount
- Keep the last, shorter piece rather than dropping it
- Split on sentence or paragraph boundaries instead of a character count
- Attach the source and the position to each piece so an answer can cite it
- Choose a piece size that leaves room for the question and the answer
Common mistakes with chunking
Stepping forward by the chunk size instead of the chunk size minus the overlap, which produces pieces that do not overlap at all and loses every sentence that straddles a boundary. The other is dropping the final short piece, which is where the end of the document lives.
Questions to practice
Questions last reviewed 19 October 2026.
Roles this comes up in
Companies these come from
Other topics
- Filtering7
- Logical operators4
- Calculations11
- Conditional logic12
- NULL handling9
- Dates16
- Joins15
- Aggregations14
- Subqueries5
- Window functions32
- Reshaping15
- Arrays6
- Strings11
- Hashing8
- Two pointers4
- Sliding window1
- Binary search4
- Sorting1
- Math3
- Lists5
- Tuples3
- Dictionaries3
- Ranking16
- Running totals10
- Deduplication2
- Similarity1
- Token budget2
- Parsing4
- Backoff3
- Agent loop1
- Cost1