-
Notifications
You must be signed in to change notification settings - Fork 137
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
[DERCBOT-1314] Add documentsRequired Setting to BotRAGConfiguration #1814
[DERCBOT-1314] Add documentsRequired Setting to BotRAGConfiguration #1814
Conversation
… and ensure backward compatibility
…g in RAGQuery and rag_chain
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just update the unit tests (python) and everything should be ready.
Tests added @assouktim |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks good PR, I just found an edge case maybe we can argue about it @assouktim @scezen but it's also easy to handle it if we want.
...trator-server/src/main/python/server/src/gen_ai_orchestrator/services/langchain/rag_chain.py
Outdated
Show resolved
Hide resolved
Fixed the edge case, now handles missing documents without 'no_answer' configuration @Benvii |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Remove the last condition see my comment.
- Add a test without the 'no_answer' input to check that it works
...trator-server/src/main/python/server/src/gen_ai_orchestrator/services/langchain/rag_chain.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the last updates ok for me.
Related Tickets
JIRA: [DERCBOT-1314]
Description
This PR introduces a new boolean attribute
documentsRequired
to theBotRAGConfiguration
and integrates it across the system. ThedocumentsRequired
attribute determines whether documents are mandatory for processing the RAG chain.Key Changes:
Model Updates:
documentsRequired
toBotRAGConfiguration
(default:true
) andBotRAGConfigurationDTO
documentsRequired
is absent in the database.Orchestrator Enhancements:
RAGQuery
to includedocumentsRequired
as an optional parameter.__rag_guard
inrag_chain.py
to respect thedocumentsRequired
setting.Bot API Modifications:
RAGAnswerHandler
to fetch thedocumentsRequired
setting from the bot configuration and pass it to the RAG query.Testing :
pgvectors_params.py
as so: