-
Notifications
You must be signed in to change notification settings - Fork 140
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-919] Add question condensing LLM and prompt template #1827
[DERCBOT-919] Add question condensing LLM and prompt template #1827
Conversation
7c6ddda
to
0ac80d7
Compare
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.
Ok for me but some breaking changes need to be documented as we don't have any issue put them on the PR description the release script will be able to catch them.
Also we need to open an issue on tock helm repository to reference the environment variable changes.
Some conflicting files, rebase need to be done.
...hestrator-client/src/main/kotlin/ai/tock/genai/orchestratorclient/requests/PromptTemplate.kt
Outdated
Show resolved
Hide resolved
...ain/kotlin/ai/tock/genai/orchestratorcore/models/vectorstore/OpenSearchVectorStoreSetting.kt
Show resolved
Hide resolved
...server/src/main/python/server/src/gen_ai_orchestrator/configurations/environment/settings.py
Show resolved
Hide resolved
...n/python/server/src/gen_ai_orchestrator/services/langchain/callbacks/rag_callback_handler.py
Show resolved
Hide resolved
aff026b
to
ad8c1b3
Compare
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, thanks 😀
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.
Sorry changes need to be done as the documentation as moved, can you check it please ?
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.
Doc is also present in french please update it, sorry I forgot it during the first review
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.
This doc doesn't exist at this location anymore I don't understand why it's not generating a conflict can you update the new file FR and EN ?
3874541
to
4497c53
Compare
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 changes
Website is published: https://doc.tock.ai/tock/feature/dercbot-919/ |
🚀 Cleanup completed for PR and associated branch: feature/dercbot-919 |
Use Case / Functionnal
Let the user configure in it's RAG chain the condensation prompt, this prompt is used to reformulate user's query using the latest messages in the dialog history including chatbot messaged. It's use to contextualize the user query.
For each bot using Rag Settings we can also now configure :
Technical changes
This pull request includes significant changes to the BotAdminService and related models, primarily focused on enhancing the RAG (Retrieval-Augmented Generation) configuration and sentence generation functionalities. The most important changes include the addition of new settings for question condensing and answering, updates to the data transfer objects (DTOs), and modifications to the validation and deletion processes.
Enhancements to RAG Configuration:
questionCondensingLlmSetting
,questionCondensingPrompt
,questionAnsweringLlmSetting
, andquestionAnsweringPrompt
inBotRAGConfigurationDTO
to support more granular control over RAG processes. [1] [2] [3]BotAdminService
to handle the new LLM settings for question condensing and answering. [1] [2]Sentence Generation Updates:
prompt
as a new field inBotSentenceGenerationConfigurationDTO
to allow customizable prompts for sentence generation. [1] [2] [3]CompletionService
to utilize the newprompt
field for generating sentences. [1] [2]Validation and Testing:
RAGValidationService
to include checks for both question condensing and answering LLM settings. [1] [2] [3]RAGServiceTest
andRAGValidationServiceTest
to reflect the new configuration fields and validation logic. [1] [2] [3] [4] [5]These changes collectively improve the flexibility and robustness of the BotAdminService, particularly in handling complex RAG configurations and sentence generation scenarios.
Breaking changes
tock_gen_ai_orchestrator_rag_debug_enabled
is no longer used. Debug mode can only be activated directly from the RAG configuration.tock_gen_ai_orchestrator_dialog_number_messages
is no longer used. The number of dialog messages to be taken can be specified directly from the RAG configuration.VectorStoreSettingBase::k
attribute is removed, as this information is now carried by the RAG configuration.