Ask a PDF a question.
Get an answer that cites the page it came from.
docubrain answers questions from PDF documents and always returns the exact page a claim came from — or it doesn't answer at all. No page number, no answer: that rule is enforced in the code, not just the prompt.
How it works
Ingest
A PDF is split page-by-page — a chunk of text never crosses a page boundary, so every piece of retrieved text has one unambiguous source page.
Retrieve
Your question is embedded and matched against the document's chunks by cosine similarity. The highest-scoring chunk wins.
Answer, cited
The response is built from that chunk's text, tagged with its page number. This is a data-model guarantee — an answer object cannot exist with zero cited pages.
Enforced here: Answer.__post_init__ raises if cited_pages is empty. There is no code path in docubrain that can hand back an uncited answer, even by accident.