> For a complete page index of the Captain API documentation, fetch https://docs.captain.dev/llms.txt?excludeSpec=true

# Document Diversity

* **Cap one document's share of the ranked list**: `max_chunks_per_document` on the [v3 Query](/reference/v3/query) request stops a single long file from occupying every result slot. Surplus chunks drop and the page backfills with the next best chunks from other documents; ranking is unchanged, only the page composition is.

Same day: [Studio Improvements](/changelog/2026-09-09-studio-surfaces), [Terminal Job Stages](/changelog/2026-09-09-terminal-job-stages)