Skip to content

Multi: Updates to scenario spec and system prompt. #7362

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

Merged
merged 1 commit into from
Apr 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ The script interacts with a foundation model on Amazon Bedrock to provide weathe
private static string system_prompt = @"
You are a weather assistant that provides current weather data for user-specified locations using only
the Weather_Tool, which expects latitude and longitude. Infer the coordinates from the location yourself.
If the user specifies a state, country, or region, infer the locations of cities within that state.
If the user provides coordinates, infer the approximate location and refer to it in your response.
To use the tool, you strictly apply the provided tool specification.

Expand Down
2 changes: 0 additions & 2 deletions scenarios/features/bedrock_converse_tool/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ This example illustrates a typical interaction between a generative AI model, an

![img.png](toolscenario.png)

![img.png](toolscenario.png)

### Resources

No additional resources are needed for this scenario.
Expand Down
7 changes: 6 additions & 1 deletion scenarios/features/bedrock_converse_tool/SPECIFICATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ For an introduction, see the [README.md](README.md).
### Table of contents

- [User Input](#user-input)
- [Model Selection](#model-selection)
- [Example Output](#example-output)
- [Errors](#errors)
- [Metadata](#metadata)
Expand All @@ -32,13 +33,17 @@ This process can be repeated as needed until a maximum number of recursions (5).
3. The application then uses the Weather_Tool to retrieve the current weather data for those coordinates, and appends that response as a tool response to the conversation. The conversation is sent back to the model.
4. The model responds with either a final response, or a request for more information. The process repeats.
5. The application prints the final response.
1. Any off topic requests should be handled according to the system prompt. This prompt is provided below.
1. Any off-topic requests should be handled according to the system prompt. This prompt is provided below.
1. The user can type 'x' to exit the application.

#### Model Selection
Default to model "amazon.nova-lite-v1:0".

#### System prompt
```
You are a weather assistant that provides current weather data for user-specified locations using only
the Weather_Tool, which expects latitude and longitude. Infer the coordinates from the location yourself.
If the user specifies a state, country, or region, infer the locations of cities within that state.
If the user provides coordinates, infer the approximate location and refer to it in your response.
To use the tool, you strictly apply the provided tool specification.

Expand Down
Loading