Citation Preview
View original source documents from chat citations
When Baudhik AI answers a question using retrieved documents, it cites the sources. You can click a citation to preview the original document.
How it works
Each citation links back to the source document. The preview shows:
- The full document content (all chunks joined in order)
- The document metadata (title, source, page number)
- Related cross-references (via citation mapping)
For PDF sources, the preview can display the original PDF with a presigned link to the raw source file stored in a private bucket.
Citation preview respects document-level permissions. You only see documents you have access to.
API
The citation preview system exposes two endpoints:
GET /api/citation-preview/full-content?document_id=...
Returns the full document content (all chunks joined).
GET /api/citation-preview/mapped-targets?document_id=...
Returns cross-reference targets mapped from the document's #BAUDHIK_METADATA target_id declarations.