-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(assistant rag): use assistant templates for RAG/QAF #173
Conversation
…qaf implementation
I suspect something has changed the rag pipeline as I get different answers from my assistant (with rag) switching to this branch from master. Everything else work flawlessly 👍 |
Getting error Error log:
|
Replace
create_rag_stream
with functionally equivalent assistant template implementation to unify RAG and templates.Main benefit is ability to edit QAF and scoring templates on the fly without code changes and redeployment.
How to test
Add the following templates to your database (mongo). QAF and scoring searches for templates with specific IDs so
_qaf
and_rag_scoring
must exist. Templates starting with_
are not shown in the frontend.For QAF ask a question and it should answer mostly the same as before.
For chat with RAG you can duplicate the
_qaf
template and change ID and addfiles_collection_id
and it should work the same as asking a QAF question.Misc Technical
create_rag_stream
which exploited function calls to format the LLM response. This new approach instead more aptly utilizesresponse_format
to ensure JSON is returned from the LLM.files_collection_id
does not need to be set for_qaf
or_rag_scoring
; they are inferred from usage.