Long documents, citations, and coverage
The canonical version always lives at https://tavina.ai/docs/friendly/files-knowledge/long-documents-citations-coverage
Long documents, citations, and coverage
Long documents need different handling from short notes. Tavina should not put an entire long PDF, EPUB, manual, manuscript, or ebook into one chat prompt. Instead, Knowledge Library Sources can be extracted, chunked, retrieved, and traversed with coverage tracking.
Targeted retrieval
Targeted retrieval is best for focused questions, such as:
- “What does this manual say about winterizing the pump?”
- “Find the section about cancellation.”
- “Which chapters mention the antagonist?”
For targeted retrieval, Tavina finds relevant chunks and should provide citations or Source references when available. This does not mean Tavina read the whole document.
Whole-Source traversal
Whole-Source traversal is for broad tasks, such as:
- “Summarize the whole ebook.”
- “Review this manuscript for contradictions.”
- “Compare every chapter’s recommendations.”
A traversal should track coverage: what was read, summarized, skipped, failed, or still pending. If a traversal is partial, Tavina should say so.
Citations
Citation metadata can include Source title, chunk ID, section, heading, page, chapter, offsets, or other provenance captured during extraction. Citation quality depends on what the Source provided and what extraction preserved.
If you need citations, ask for them directly. If Tavina cannot cite a claim, treat it as a draft answer until you verify it.
You can also take a Source’s citation with you: each Source exports a ready-made citation in BibTeX, RIS, or plain text (tavina/tavina#2394), including where the Source came from and when it was retrieved — the same provenance shown on the Source’s card. This is for your reference manager or bibliography; it does not change how Tavina cites answers in chat.
Coverage limitations
Tavina should be honest about limitations, including:
- selected chunks retrieved instead of full-document review;
- pages or chapters skipped;
- extraction failures;
- partial processing;
- OCR-needed or encrypted/blocked files;
- purged or unavailable artifacts;
- missing page, heading, or chapter metadata.
A good answer says what it used and what it did not use.
Useful prompts
Try prompts such as:
- “Answer from this Source and cite the chunks you used.”
- “Tell me whether you used targeted retrieval or whole-Source traversal.”
- “Summarize the whole Source and report processed, skipped, and failed coverage.”
- “If you cannot inspect every section, say what is missing.”