live demo · v0.1

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

01

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.

02

Retrieve

Your question is embedded and matched against the document's chunks by cosine similarity. The highest-scoring chunk wins.

03

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.

Try it

Asking against: sample_contract.pdf