Citations in custom RAG pipeline #156
Replies: 1 comment 7 replies
-
The biggest problem with OpenWebUI / Pipelines for custom RAG applications is not supporting citations. There are cases even with 400B+ parameter models where the LLM does not correctly synthesize the information from the retrieved documents or understand that it does not have sufficient context to answer. In these cases, the user has no easy way to verify the information since pipelines can only return a string (or character generator for streaming output). RAG without citations is dangerous. I'm open to trying to contribute something here, but the issue is with current pipeline abstractions there is no way to handle this. The issue with including all of the context in the response string is this will quickly saturate the context length for the chat history. Ideally the history shouldn't contain all of the context information for every previous response, it should only contain the users messages and the agents response. Even if the context was included in a way that was filtered out of the history, its still not a great way to present the information to the user. A potential workaround creating an HTTP endpoint on the custom RAG service to display all of the context, and including a link to it in a way that would be parsed out for the chat history, like Another potential option is defining a standard XML/JSON citation schema for use at the end of the response which OpenWebUI could parse into citations. The disadvantage of this is it only works with simple pipeline structures. Both sides of the pipeline would have to be aware of the format, which would make any kind of composition or scaffolding difficult. To me most of the power of pipelines to begin with is the ability to easily connect an entire application into OpenWebUI's interface. Only a single pipeline is needed for such cases realistically because all of the heavy lifting will happen in the applications code rather than OpenWebUI's pipeline. |
Beta Was this translation helpful? Give feedback.
-
Can we pass through RAG metadata to show as chunks like with the local RAG interface from a pipeline?
Any help appreciated!
Beta Was this translation helpful? Give feedback.
All reactions