All Questions
Rag And Retrieval medium

A contract-analysis RAG system splits documents into 2,000-token chunks and puts the top 3 in the prompt. Answers usually cite the right contract but miss the specific clause asked about, and per-query token cost is high. What should you change?

  1. A Index whole documents as single chunks so the model always sees complete clauses and never loses context.
  2. B Keep 2,000-token chunks but raise top-k from 3 to 10 so more of each relevant contract is visible to the model.
  3. C Keep 2,000-token chunks and add a cross-encoder reranker over the top 20, so the chunk with the right clause ranks first.
  4. D Re-chunk to around 400 tokens along clause boundaries with modest overlap, then retrieve more but smaller chunks.

One system design question a day, with spaced repetition so the ones you miss come back.

Get the app

Related questions