mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 03:18:23 -05:00
[GH-ISSUE #14164] feat: retrieve RAG context chunks within /api/chat/completions #17162
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @vaclcer on GitHub (May 22, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/14164
Check Existing Issues
Problem Description
Hi, this is a recurring topic 13304
Judging by the reactions, many people would appreciate to get context chunks used for final generation step in RAG via API. I believe this should be pretty much standard in any production system.
Context chunks are used not only for a reference, but also for any response evaluations based on RAGAS, DeepEval or others...
There was a rejected PR addressing this 13378
This might be working with enabled streaming response, but that is not trivial to process for many of us, I presume.
Thank you for the consideration!
Desired Solution you'd like
I would think retrieving RAG context/chunks would be configurable via /api/chat/completions payload object, similar as:
Alternatives Considered
No response
Additional Context
No response
@daschuchmann commented on GitHub (May 22, 2025):
This would be so nice to have, making the api finally capable to return the knowledge
@tjbck commented on GitHub (May 26, 2025):
Addressed with
2d5b82df8c.