Skip to content

Commit f803c6c

Browse files
author
AWS
committed
Agents for Amazon Bedrock Update: Add support for user metadata inside PromptVariant.
1 parent 8a020ff commit f803c6c

File tree

2 files changed

+52
-2
lines changed

2 files changed

+52
-2
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"type": "feature",
3+
"category": "Agents for Amazon Bedrock",
4+
"contributor": "",
5+
"description": "Add support for user metadata inside PromptVariant."
6+
}

services/bedrockagent/src/main/resources/codegen-resources/service-2.json

Lines changed: 46 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
{"shape":"ConflictException"},
5151
{"shape":"ServiceQuotaExceededException"}
5252
],
53-
"documentation":"<p>Creates an agent that orchestrates interactions between foundation models, data sources, software applications, user conversations, and APIs to carry out tasks to help customers.</p> <ul> <li> <p>Specify the following fields for security purposes.</p> <ul> <li> <p> <code>agentResourceRoleArn</code> – The Amazon Resource Name (ARN) of the role with permissions to invoke API operations on an agent.</p> </li> <li> <p>(Optional) <code>customerEncryptionKeyArn</code> – The Amazon Resource Name (ARN) of a KMS key to encrypt the creation of the agent.</p> </li> <li> <p>(Optional) <code>idleSessionTTLinSeconds</code> – Specify the number of seconds for which the agent should maintain session information. After this time expires, the subsequent <code>InvokeAgent</code> request begins a new session.</p> </li> </ul> </li> <li> <p>To enable your agent to retain conversational context across multiple sessions, include a <code>memoryConfiguration</code> object. For more information, see <a href=\"https://docs.aws.amazon.com/bedrock/latest/userguide/agents-configure-memory.html\">Configure memory</a>.</p> </li> <li> <p>To override the default prompt behavior for agent orchestration and to use advanced prompts, include a <code>promptOverrideConfiguration</code> object. For more information, see <a href=\"https://docs.aws.amazon.com/bedrock/latest/userguide/advanced-prompts.html\">Advanced prompts</a>.</p> </li> <li> <p>If you agent fails to be created, the response returns a list of <code>failureReasons</code> alongside a list of <code>recommendedActions</code> for you to troubleshoot.</p> </li> </ul>",
53+
"documentation":"<p>Creates an agent that orchestrates interactions between foundation models, data sources, software applications, user conversations, and APIs to carry out tasks to help customers.</p> <ul> <li> <p>Specify the following fields for security purposes.</p> <ul> <li> <p> <code>agentResourceRoleArn</code> – The Amazon Resource Name (ARN) of the role with permissions to invoke API operations on an agent.</p> </li> <li> <p>(Optional) <code>customerEncryptionKeyArn</code> – The Amazon Resource Name (ARN) of a KMS key to encrypt the creation of the agent.</p> </li> <li> <p>(Optional) <code>idleSessionTTLinSeconds</code> – Specify the number of seconds for which the agent should maintain session information. After this time expires, the subsequent <code>InvokeAgent</code> request begins a new session.</p> </li> </ul> </li> <li> <p>To enable your agent to retain conversational context across multiple sessions, include a <code>memoryConfiguration</code> object. For more information, see <a href=\"https://docs.aws.amazon.com/bedrock/latest/userguide/agents-configure-memory.html\">Configure memory</a>.</p> </li> <li> <p>To override the default prompt behavior for agent orchestration and to use advanced prompts, include a <code>promptOverrideConfiguration</code> object. For more information, see <a href=\"https://docs.aws.amazon.com/bedrock/latest/userguide/advanced-prompts.html\">Advanced prompts</a>.</p> </li> <li> <p>If your agent fails to be created, the response returns a list of <code>failureReasons</code> alongside a list of <code>recommendedActions</code> for you to troubleshoot.</p> </li> <li> <p>The agent instructions will not be honored if your agent has only one knowledge base, uses default prompts, has no action group, and user input is disabled.</p> </li> </ul>",
5454
"idempotent":true
5555
},
5656
"CreateAgentActionGroup":{
@@ -6042,7 +6042,7 @@
60426042
"documentation":"<p>The parsing strategy for the data source.</p>"
60436043
}
60446044
},
6045-
"documentation":"<p>Settings for parsing document contents. By default, the service converts the contents of each document into text before splitting it into chunks. To improve processing of PDF files with tables and images, you can configure the data source to convert the pages of text into images and use a model to describe the contents of each page.</p> <p>To use a model to parse PDF documents, set the parsing strategy to <code>BEDROCK_FOUNDATION_MODEL</code> and specify the model to use by ARN. You can also override the default parsing prompt with instructions for how to interpret images and tables in your documents. The following models are supported.</p> <ul> <li> <p>Anthropic Claude 3 Sonnet - <code>anthropic.claude-3-sonnet-20240229-v1:0</code> </p> </li> <li> <p>Anthropic Claude 3 Haiku - <code>anthropic.claude-3-haiku-20240307-v1:0</code> </p> </li> </ul> <p>You can get the ARN of a model with the action. Standard model usage charges apply for the foundation model parsing strategy.</p>"
6045+
"documentation":"<p>Settings for parsing document contents. By default, the service converts the contents of each document into text before splitting it into chunks. To improve processing of PDF files with tables and images, you can configure the data source to convert the pages of text into images and use a model to describe the contents of each page.</p> <p>To use a model to parse PDF documents, set the parsing strategy to <code>BEDROCK_FOUNDATION_MODEL</code> and specify the model to use by ARN. You can also override the default parsing prompt with instructions for how to interpret images and tables in your documents. The following models are supported.</p> <ul> <li> <p>Anthropic Claude 3 Sonnet - <code>anthropic.claude-3-sonnet-20240229-v1:0</code> </p> </li> <li> <p>Anthropic Claude 3 Haiku - <code>anthropic.claude-3-haiku-20240307-v1:0</code> </p> </li> </ul> <p>You can get the ARN of a model with the <a href=\"https://docs.aws.amazon.com/bedrock/latest/APIReference/API_ListFoundationModels.html\">ListFoundationModels</a> action. Standard model usage charges apply for the foundation model parsing strategy.</p>"
60466046
},
60476047
"ParsingPrompt":{
60486048
"type":"structure",
@@ -6380,6 +6380,46 @@
63806380
"min":0,
63816381
"sensitive":true
63826382
},
6383+
"PromptMetadataEntry":{
6384+
"type":"structure",
6385+
"required":[
6386+
"key",
6387+
"value"
6388+
],
6389+
"members":{
6390+
"key":{
6391+
"shape":"PromptMetadataKey",
6392+
"documentation":"<p>The key of a metadata tag for a prompt variant.</p>"
6393+
},
6394+
"value":{
6395+
"shape":"PromptMetadataValue",
6396+
"documentation":"<p>The value of a metadata tag for a prompt variant.</p>"
6397+
}
6398+
},
6399+
"documentation":"<p>Contains a key-value pair that defines a metadata tag and value to attach to a prompt variant. For more information, see <a href=\"https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-management-create.html\">Create a prompt using Prompt management</a>.</p>",
6400+
"sensitive":true
6401+
},
6402+
"PromptMetadataKey":{
6403+
"type":"string",
6404+
"max":128,
6405+
"min":1,
6406+
"pattern":"^[a-zA-Z0-9\\s._:/=+@-]*$",
6407+
"sensitive":true
6408+
},
6409+
"PromptMetadataList":{
6410+
"type":"list",
6411+
"member":{"shape":"PromptMetadataEntry"},
6412+
"max":50,
6413+
"min":0,
6414+
"sensitive":true
6415+
},
6416+
"PromptMetadataValue":{
6417+
"type":"string",
6418+
"max":1024,
6419+
"min":0,
6420+
"pattern":"^[a-zA-Z0-9\\s._:/=+@-]*$",
6421+
"sensitive":true
6422+
},
63836423
"PromptModelIdentifier":{
63846424
"type":"string",
63856425
"max":2048,
@@ -6522,6 +6562,10 @@
65226562
"shape":"PromptInferenceConfiguration",
65236563
"documentation":"<p>Contains inference configurations for the prompt variant.</p>"
65246564
},
6565+
"metadata":{
6566+
"shape":"PromptMetadataList",
6567+
"documentation":"<p>An array of objects, each containing a key-value pair that defines a metadata tag and value to attach to a prompt variant. For more information, see <a href=\"https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-management-create.html\">Create a prompt using Prompt management</a>.</p>"
6568+
},
65256569
"modelId":{
65266570
"shape":"PromptModelIdentifier",
65276571
"documentation":"<p>The unique identifier of the model with which to run inference on the prompt.</p>"

0 commit comments

Comments
 (0)