[GH-ISSUE #1294] Add the ability to return sources from RAG, score them and control which are used. #27962

Closed
opened 2026-04-25 02:43:45 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @icsy7867 on GitHub (Mar 25, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/1294

Is your feature request related to a problem? Please describe.
I am experimenting with RAGs for my corporation. We have many different information portals (Confluence and various policy websites and information sources, PDFS, etc...). While the information being returned is accurate, I would like to include the sources at the end of each chat.

Random example, lets say I ingest: https://en.wikipedia.org/wiki/Boat and I ask for the types of boats. And the user questioning wanted to know more about this. Having source displayed would be hugely helpful.

Describe the solution you'd like
At the end of a chat that pulled information from the RAG, it would be nice to be able to enable/disabled the sources used. This could look something like:

Sources:
Boat - Wikipedia - https://en.wikipedia.org/wiki/Boat

And the link should be clickable. If a PDF or something was uploaded, then just the name of the PDF (Not clickable).

Additionally, with llamaindex (Not sure what you guys are using). There are also two settings that can be set.
https://docs.llamaindex.ai/en/latest/module_guides/querying/node_postprocessors/

  • Similarity_top_k, which returns the top X results returned from the RAG. This sort of behavior is helpful since a user might have MANY different sources in different locations.
  • However this can also return junk, so being able to score the RAG results based on how well they matched. in llamaindex they have SimilarityPostprocessor, which allows you to specify that "I want the results to be at least 50% relevant or more".

For smaller deployments, it's not an issue, but once you scale to 1000+ docs ingested, then these sorts of tweaks become invaluable.

Describe alternatives you've considered
N/A

Additional context
Add any other context or screenshots about the feature request here.

Originally created by @icsy7867 on GitHub (Mar 25, 2024). Original GitHub issue: https://github.com/open-webui/open-webui/issues/1294 **Is your feature request related to a problem? Please describe.** I am experimenting with RAGs for my corporation. We have many different information portals (Confluence and various policy websites and information sources, PDFS, etc...). While the information being returned is accurate, I would like to include the sources at the end of each chat. Random example, lets say I ingest: https://en.wikipedia.org/wiki/Boat and I ask for the types of boats. And the user questioning wanted to know more about this. Having source displayed would be hugely helpful. **Describe the solution you'd like** At the end of a chat that pulled information from the RAG, it would be nice to be able to enable/disabled the sources used. This could look something like: Sources: Boat - Wikipedia - https://en.wikipedia.org/wiki/Boat And the link should be clickable. If a PDF or something was uploaded, then just the name of the PDF (Not clickable). Additionally, with llamaindex (Not sure what you guys are using). There are also two settings that can be set. https://docs.llamaindex.ai/en/latest/module_guides/querying/node_postprocessors/ - Similarity_top_k, which returns the top X results returned from the RAG. This sort of behavior is helpful since a user might have MANY different sources in different locations. - However this can also return junk, so being able to score the RAG results based on how well they matched. in llamaindex they have SimilarityPostprocessor, which allows you to specify that "I want the results to be at least 50% relevant or more". For smaller deployments, it's not an issue, but once you scale to 1000+ docs ingested, then these sorts of tweaks become invaluable. **Describe alternatives you've considered** N/A **Additional context** Add any other context or screenshots about the feature request here.
Author
Owner

@tjbck commented on GitHub (Mar 25, 2024):

Great suggestions, Let's continue our discussion here: #715 #1293

<!-- gh-comment-id:2018461580 --> @tjbck commented on GitHub (Mar 25, 2024): Great suggestions, Let's continue our discussion here: #715 #1293
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#27962