-
Notifications
You must be signed in to change notification settings - Fork 52
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
Bedrock: Prompt Management. Add ability to add variables for system
prompt
#883
Comments
Hi @o-alexandrov ! In any case, system instructions are usually meant for static info that doesn't change between invocations, as this helps the model work more efficiently and better. You can still do role prompting by including your dynamic section in the user message. const variantChat = PromptVariant.chat({
variantName: 'variant1',
model: BedrockFoundationModel.ANTHROPIC_CLAUDE_3_5_SONNET_V1_0,
system: "You are a highly acclaimed educator with extensive experience in developing innovative inquiry-based curricula for students. The content you create aligns with current educational standards and incorporates the latest research in effective science pedagogy.",
messages: [
ChatMessage.user('Your expertise lies in creating engaging, hands-on lessons about {{subject}} that foster critical thinking and scientific curiosity for students in grades {{grades}}. Your task is to design an interactive, question-driven lesson on {{lessonName}}. Do not include a preamble to your answer.'),
],
promptVariables: ['subject', 'grades', 'lessonName'],
}); |
Yes, it's also not working in the AWS Bedrock web interface.
Even though variables for the system message are present, it doesn't mean the system message is different for the chat.
|
Describe the feature
Currently, there is a limitation in Prompt Management:
system
part of the promptUse Case
When defining a system prompt, most of the prompts I worked on involve a necessity to have variables in the
system
(role defining) part of the prompt.Proposed Solution
Add ability
to reuse
andadd unique
(used only in thesystem
part) variables.Than, expose it through the construct.
Other Information
No response
Acknowledgements
The text was updated successfully, but these errors were encountered: