DocsGPT icon indicating copy to clipboard operation
DocsGPT copied to clipboard

🚀 Feature: Add Citations to Responses

Open adsdemaybe opened this issue 2 months ago • 3 comments

🔖 Feature description

When users submit multi-paged documents (from 10 pages onwards) users will feel reassured if they are given references to a specific page or section in the document. In a response, users will have a button/text element that guides them to the specific section. When clicking on it, a new window appears with the specific section highlighted.

As of now, DocsGPT does this:

Image

But, if we went with the number citations or physical links to the specific page, it would be much easier to refer to that page. (imagine using this to find a section in a shakespeare book. if you want to write an essay with citations, it would be impossible to do it with this current setup).

For example, this is how Perplexity implements this:

Image

Clicking on the numbers re-directs users to a new wikipedia page in the browser. I already feel like the way sources are displayed in DocsGPT is better than perplexity, so adding citations will make it even clearer to the user.

🎤 Why is this feature needed ?

Helps users feel reassured that the LLM isn't hallucinating and is basing its response on provided context/fact. Especially due to model hallucination (had my own experiences with ChatGPT with this when GPT 4 just came out).

✌️ How do you aim to achieve this?

I haven't read the code enough to know how DocsGPT reads context, but I think it could be possible by having a RAG server divide the document into segments hierarchically. Since this will be mostly used for research papers, textbooks or documentation, having an hierarchical solution helps the model find information quicker (or so a freshmen college student with limited knowledge in LLMs i.e me thinks).

🔄️ Additional Information

Another solution I have considered is standard chunking by page or every 3 paragraphs. This number can also be changed dynamically (maybe have another SLM decide on this or smth). Im brimming with ideas, but let me know if this is a good idea or what to change.

👀 Have you spent some time to check if this feature request has been raised before?

  • [x] I checked and didn't find similar issue

Are you willing to submit PR?

Yes I am willing to submit a PR!

adsdemaybe avatar Oct 27 '25 07:10 adsdemaybe

This is my first issue/feature submission. Please let me know where I can improve, or if this becomes an official feature if anyone wants to collaborate with me (don't know how that works but I bet i can figure it out)!

adsdemaybe avatar Oct 27 '25 07:10 adsdemaybe

Hiya @adsdemaybe I'd be happy to work on this with you if it's approved.

Phenzic avatar Oct 28 '25 00:10 Phenzic

Hi, I’d love to contribute to this feature!
I have experience with NLP and document-context models, and this seems like a great opportunity to help enhance DocsGPT’s explainability.
Could you please assign this issue to me? I can start exploring approaches for citation tagging and inline reference display. Thanks!

Pranavi125 avatar Oct 29 '25 04:10 Pranavi125