What algorithm would you use to make fact retrieval across chunks robust when a fact may be split across a chunk boundary?
Asked at
AI answer
Don’t search each chunk in isolation: a boundary can split a match. A reliable approach is to keep the original offsets and search the combined text, or join adjacent chunks with an overlap. If the maximum length of the fact being searched for is known, the overlap should be at least that length minus one character. If it’s unknown, check the window at the boundary between adjacent chunks or use a sliding window. For semantic search, also retrieve the neighboring chunk and verify the fact in context.
Also asked at Т1
- What enables the OpenSearch engine to return results quickly across a huge database (what algorithm is it based on)?
- How can you tell that a service is showing signs of degradation or has stopped functioning? What error codes would you expect?
- Why is Object Storage used in this architecture, and what exactly do we store there?
- Based on your experience, name an example of a task similar to the architecture we discussed. How exactly were the microservices interactions and event delivery set up?
- How would you handle user authorization when they sign in to the interface and upload documents?
Similar questions
- How would you create a chunking-agnostic eval benchmark (a benchmark that does not depend on how the text is split into chunks)?
- Why does RAG search over a contract split into 200-character chunks with no overlap fail to find the relevant penalty clause and instead return the header and details?
- What problems can pagination cause? Which type have you worked with—page-based (`limit/offset`) or cursor-based?
- With a large offset, all the preceding records have to be read. What alternative approaches can solve this offset problem?
- Where would you get the ground-truth facts for such a benchmark?