Skip to content

[FEAT] Add source page references to PDF Assistant responses #660

Description

@NaitikVerma6776

Title

Add source page references to PDF Assistant responses

Problem

When the PDF Assistant answers a question, users cannot easily determine which page(s) of the document were used to generate the response. This makes verification and navigation difficult, especially for large PDFs.

Proposed Solution

Display source page references alongside each answer generated by the assistant. Users should be able to see the page number(s) and optionally jump directly to the relevant page in the PDF viewer.

Approach

  • Extend the response metadata to include source page information.
  • Render page references below assistant responses.
  • Add click-to-navigate support for page references in the PDF viewer.
  • Gracefully handle cases where page information is unavailable.

Acceptance Criteria

  • Answers display relevant source page numbers.
  • Clicking a page reference navigates to the correct page.
  • Existing chat functionality remains unaffected.
  • No noticeable performance regression.

Test Plan

  • Verify page references appear for document-based responses.
  • Verify navigation opens the correct page.
  • Verify behavior when no page metadata is available.
  • Test with multi-page and single-page references.

Benefits

  • Improves transparency and trust in responses

GSSoC '26

  • Yes, I am participating in GirlScript Summer of Code and would like to build this.

Metadata

Metadata

Labels

enhancementNew feature or improvementgssocGirlScript Summer of Code 2026 issue/PR

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions