Open michel-heon opened 2 months ago
Hi @michel-heon , Thank you for the details.
I recently merged the following which reduces the prompts for Bedrock by using a common solution for various models. It might help your use case in the short term https://github.com/aws-samples/aws-genai-llm-chatbot/pull/569 https://github.com/aws-samples/aws-genai-llm-chatbot/blob/main/lib/model-interfaces/langchain/functions/request-handler/adapters/bedrock/base.py#L49
Regarding the update of prompts. An other issue is also suggesting a way to modify the prompts but using a registry: https://github.com/aws-samples/aws-genai-llm-chatbot/issues/334
Hello @charles-marion I've just noticed the change. I'm going to migrate to the latest commit for my work. I will also take this change into account for https://github.com/aws-samples/aws-genai-llm-chatbot/issues/572
Hi @charles-marion see PR https://github.com/aws-samples/aws-genai-llm-chatbot/pull/576
This issue is stale because it has been open for 60 days with no activity.
Description :
Currently, system prompts are scattered throughout the codebase and are only available in English. This setup makes it difficult to manage and internationalize prompts, especially when scaling to new languages or integrating multiple adapters. We propose centralizing the system prompts into a single module for easier management and allowing for internationalization.
Objective :
Affected Adapters:
azure-openai
mistral
claude
titan
llama
Proposed Solution:
system_prompts.py
to store and manage all system prompts./lib/model-interfaces/langchain/functions/request-handler/adapters/base/base.py
:get_prompt
get_condense_question_prompt
get_qa_prompt
These methods will fetch the system prompts from the new
system_prompts.py
class to centralize and simplify prompt management.Steps for Implementation:
system_prompts.py
to store all system prompts.system_prompts.py
class.system_prompts.py
.Expected Outcome:
system_prompts.py
.Environment Information:
azure-openai
,mistral
,claude
,titan
,llama
in in/lib/model-interfaces/langchain/functions/request-handler/adapters/
Additional Information:
Cela permet d'expliquer clairement la problématique, l'objectif, et la solution envisagée pour les contributeurs du projet.