Write a text chunker with overlap for a RAG pipeline
Interview insights are lockedSee how often this is asked and which companies asked it with Buncho Pro.Write chunk_words(text, size, overlap) that splits text into chunks of at most size words, where consecutive chunks share overlap words.
- Validate the inputs.
- Make sure the end of the text is covered exactly once and no tiny duplicate tail chunk is produced.
- Discuss what you would change for production.