Skip to content

Commit fef3c84

Browse files
author
AWS
committed
Agents for Amazon Bedrock Runtime Update: This release introduces the ability to generate SQL using natural language, through a new GenerateQuery API (with native integration into Knowledge Bases); ability to ingest and retrieve images through Bedrock Data Automation; and ability to create a Knowledge Base backed by Kendra GenAI Index.
1 parent 5736483 commit fef3c84

File tree

2 files changed

+250
-5
lines changed

2 files changed

+250
-5
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 Runtime",
4+
"contributor": "",
5+
"description": "This release introduces the ability to generate SQL using natural language, through a new GenerateQuery API (with native integration into Knowledge Bases); ability to ingest and retrieve images through Bedrock Data Automation; and ability to create a Knowledge Base backed by Kendra GenAI Index."
6+
}

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

Lines changed: 244 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,28 @@
3737
"documentation":"<p>Deletes memory from the specified memory identifier.</p>",
3838
"idempotent":true
3939
},
40+
"GenerateQuery":{
41+
"name":"GenerateQuery",
42+
"http":{
43+
"method":"POST",
44+
"requestUri":"/generateQuery",
45+
"responseCode":200
46+
},
47+
"input":{"shape":"GenerateQueryRequest"},
48+
"output":{"shape":"GenerateQueryResponse"},
49+
"errors":[
50+
{"shape":"ConflictException"},
51+
{"shape":"ResourceNotFoundException"},
52+
{"shape":"ValidationException"},
53+
{"shape":"InternalServerException"},
54+
{"shape":"DependencyFailedException"},
55+
{"shape":"BadGatewayException"},
56+
{"shape":"ThrottlingException"},
57+
{"shape":"AccessDeniedException"},
58+
{"shape":"ServiceQuotaExceededException"}
59+
],
60+
"documentation":"<p>Generates an SQL query from a natural language query. For more information, see <a href=\"https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base-generate-query.html\">Generate a query for structured data</a> in the Amazon Bedrock User Guide.</p>"
61+
},
4062
"GetAgentMemory":{
4163
"name":"GetAgentMemory",
4264
"http":{
@@ -1737,6 +1759,56 @@
17371759
"type":"list",
17381760
"member":{"shape":"FunctionDefinition"}
17391761
},
1762+
"GenerateQueryRequest":{
1763+
"type":"structure",
1764+
"required":[
1765+
"queryGenerationInput",
1766+
"transformationConfiguration"
1767+
],
1768+
"members":{
1769+
"queryGenerationInput":{
1770+
"shape":"QueryGenerationInput",
1771+
"documentation":"<p>Specifies information about a natural language query to transform into SQL.</p>"
1772+
},
1773+
"transformationConfiguration":{
1774+
"shape":"TransformationConfiguration",
1775+
"documentation":"<p>Specifies configurations for transforming the natural language query into SQL.</p>"
1776+
}
1777+
}
1778+
},
1779+
"GenerateQueryResponse":{
1780+
"type":"structure",
1781+
"members":{
1782+
"queries":{
1783+
"shape":"GeneratedQueries",
1784+
"documentation":"<p>A list of objects, each of which defines a generated query that can correspond to the natural language queries.</p>"
1785+
}
1786+
}
1787+
},
1788+
"GeneratedQueries":{
1789+
"type":"list",
1790+
"member":{"shape":"GeneratedQuery"},
1791+
"min":0
1792+
},
1793+
"GeneratedQuery":{
1794+
"type":"structure",
1795+
"members":{
1796+
"sql":{
1797+
"shape":"String",
1798+
"documentation":"<p>An SQL query that corresponds to the natural language query.</p>"
1799+
},
1800+
"type":{
1801+
"shape":"GeneratedQueryType",
1802+
"documentation":"<p>The type of transformed query.</p>"
1803+
}
1804+
},
1805+
"documentation":"<p>Contains information about a query generated for a natural language query.</p>",
1806+
"sensitive":true
1807+
},
1808+
"GeneratedQueryType":{
1809+
"type":"string",
1810+
"enum":["REDSHIFT_SQL"]
1811+
},
17401812
"GeneratedResponsePart":{
17411813
"type":"structure",
17421814
"members":{
@@ -2485,6 +2557,10 @@
24852557
"documentation":"<p>Contains information about the prompt to optimize.</p>",
24862558
"union":true
24872559
},
2560+
"InputQueryType":{
2561+
"type":"string",
2562+
"enum":["TEXT"]
2563+
},
24882564
"InputText":{
24892565
"type":"string",
24902566
"max":25000000,
@@ -2838,6 +2914,12 @@
28382914
},
28392915
"documentation":"<p> Details of the knowledge base associated withe inline agent. </p>"
28402916
},
2917+
"KnowledgeBaseArn":{
2918+
"type":"string",
2919+
"max":128,
2920+
"min":0,
2921+
"pattern":"^arn:aws(|-cn|-us-gov):bedrock:[a-zA-Z0-9-]*:[0-9]{12}:knowledge-base/[0-9a-zA-Z]+$"
2922+
},
28412923
"KnowledgeBaseConfiguration":{
28422924
"type":"structure",
28432925
"required":[
@@ -2929,7 +3011,7 @@
29293011
"members":{
29303012
"content":{
29313013
"shape":"RetrievalResultContent",
2932-
"documentation":"<p>Contains a chunk of text from a data source in the knowledge base.</p>"
3014+
"documentation":"<p>Contains information about the content of the chunk.</p>"
29333015
},
29343016
"location":{
29353017
"shape":"RetrievalResultLocation",
@@ -3807,6 +3889,30 @@
38073889
},
38083890
"documentation":"<p>Contains the parameters in the request body.</p>"
38093891
},
3892+
"QueryGenerationInput":{
3893+
"type":"structure",
3894+
"required":[
3895+
"text",
3896+
"type"
3897+
],
3898+
"members":{
3899+
"text":{
3900+
"shape":"QueryGenerationInputTextString",
3901+
"documentation":"<p>The text of the query.</p>"
3902+
},
3903+
"type":{
3904+
"shape":"InputQueryType",
3905+
"documentation":"<p>The type of the query.</p>"
3906+
}
3907+
},
3908+
"documentation":"<p>Contains information about a natural language query to transform into SQL.</p>",
3909+
"sensitive":true
3910+
},
3911+
"QueryGenerationInputTextString":{
3912+
"type":"string",
3913+
"max":20000,
3914+
"min":1
3915+
},
38103916
"QueryTransformationConfiguration":{
38113917
"type":"structure",
38123918
"required":["type"],
@@ -3818,6 +3924,10 @@
38183924
},
38193925
"documentation":"<p>To split up the prompt and retrieve multiple sources, set the transformation type to <code>QUERY_DECOMPOSITION</code>.</p>"
38203926
},
3927+
"QueryTransformationMode":{
3928+
"type":"string",
3929+
"enum":["TEXT_TO_SQL"]
3930+
},
38213931
"QueryTransformationType":{
38223932
"type":"string",
38233933
"enum":["QUERY_DECOMPOSITION"]
@@ -4286,16 +4396,70 @@
42864396
},
42874397
"RetrievalResultContent":{
42884398
"type":"structure",
4289-
"required":["text"],
42904399
"members":{
4400+
"byteContent":{
4401+
"shape":"String",
4402+
"documentation":"<p>A data URI with base64-encoded content from the data source. The URI is in the following format: returned in the following format: <code>data:image/jpeg;base64,${base64-encoded string}</code>.</p>"
4403+
},
4404+
"row":{
4405+
"shape":"RetrievalResultContentRow",
4406+
"documentation":"<p>Specifies information about the rows with the cells to return in retrieval.</p>"
4407+
},
42914408
"text":{
42924409
"shape":"String",
42934410
"documentation":"<p>The cited text from the data source.</p>"
4411+
},
4412+
"type":{
4413+
"shape":"RetrievalResultContentType",
4414+
"documentation":"<p>The type of content in the retrieval result.</p>"
4415+
}
4416+
},
4417+
"documentation":"<p>Contains information about a chunk of text from a data source in the knowledge base. If the result is from a structured data source, the cell in the database and the type of the value is also identified.</p> <p>This data type is used in the following API operations:</p> <ul> <li> <p> <a href=\"https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_ResponseSyntax\">Retrieve response</a> – in the <code>content</code> field</p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_ResponseSyntax\">RetrieveAndGenerate response</a> – in the <code>content</code> field</p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_InvokeAgent.html#API_agent-runtime_InvokeAgent_ResponseSyntax\">InvokeAgent response</a> – in the <code>content</code> field</p> </li> </ul>",
4418+
"sensitive":true
4419+
},
4420+
"RetrievalResultContentColumn":{
4421+
"type":"structure",
4422+
"members":{
4423+
"columnName":{
4424+
"shape":"String",
4425+
"documentation":"<p>The name of the column.</p>"
4426+
},
4427+
"columnValue":{
4428+
"shape":"String",
4429+
"documentation":"<p>The value in the column.</p>"
4430+
},
4431+
"type":{
4432+
"shape":"RetrievalResultContentColumnType",
4433+
"documentation":"<p>The data type of the value.</p>"
42944434
}
42954435
},
4296-
"documentation":"<p>Contains the cited text from the data source.</p> <p>This data type is used in the following API operations:</p> <ul> <li> <p> <a href=\"https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_ResponseSyntax\">Retrieve response</a> – in the <code>content</code> field</p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_ResponseSyntax\">RetrieveAndGenerate response</a> – in the <code>content</code> field</p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_InvokeAgent.html#API_agent-runtime_InvokeAgent_ResponseSyntax\">InvokeAgent response</a> – in the <code>content</code> field</p> </li> </ul>",
4436+
"documentation":"<p>Contains information about a column with a cell to return in retrieval.</p>",
4437+
"sensitive":true
4438+
},
4439+
"RetrievalResultContentColumnType":{
4440+
"type":"string",
4441+
"enum":[
4442+
"BLOB",
4443+
"BOOLEAN",
4444+
"DOUBLE",
4445+
"NULL",
4446+
"LONG",
4447+
"STRING"
4448+
]
4449+
},
4450+
"RetrievalResultContentRow":{
4451+
"type":"list",
4452+
"member":{"shape":"RetrievalResultContentColumn"},
42974453
"sensitive":true
42984454
},
4455+
"RetrievalResultContentType":{
4456+
"type":"string",
4457+
"enum":[
4458+
"TEXT",
4459+
"IMAGE",
4460+
"ROW"
4461+
]
4462+
},
42994463
"RetrievalResultCustomDocumentLocation":{
43004464
"type":"structure",
43014465
"members":{
@@ -4306,6 +4470,16 @@
43064470
},
43074471
"documentation":"<p>Contains information about the location of a document in a custom data source.</p>"
43084472
},
4473+
"RetrievalResultKendraDocumentLocation":{
4474+
"type":"structure",
4475+
"members":{
4476+
"uri":{
4477+
"shape":"String",
4478+
"documentation":"<p>The document's uri.</p>"
4479+
}
4480+
},
4481+
"documentation":"<p>The location of a result in Amazon Kendra.</p>"
4482+
},
43094483
"RetrievalResultLocation":{
43104484
"type":"structure",
43114485
"required":["type"],
@@ -4318,6 +4492,10 @@
43184492
"shape":"RetrievalResultCustomDocumentLocation",
43194493
"documentation":"<p>Specifies the location of a document in a custom data source.</p>"
43204494
},
4495+
"kendraDocumentLocation":{
4496+
"shape":"RetrievalResultKendraDocumentLocation",
4497+
"documentation":"<p>The location of a document in Amazon Kendra.</p>"
4498+
},
43214499
"s3Location":{
43224500
"shape":"RetrievalResultS3Location",
43234501
"documentation":"<p>The S3 data source location.</p>"
@@ -4330,6 +4508,10 @@
43304508
"shape":"RetrievalResultSharePointLocation",
43314509
"documentation":"<p>The SharePoint data source location.</p>"
43324510
},
4511+
"sqlLocation":{
4512+
"shape":"RetrievalResultSqlLocation",
4513+
"documentation":"<p>Specifies information about the SQL query used to retrieve the result.</p>"
4514+
},
43334515
"type":{
43344516
"shape":"RetrievalResultLocationType",
43354517
"documentation":"<p>The type of data source location.</p>"
@@ -4339,7 +4521,7 @@
43394521
"documentation":"<p>The web URL/URLs data source location.</p>"
43404522
}
43414523
},
4342-
"documentation":"<p>Contains information about the data source location.</p> <p>This data type is used in the following API operations:</p> <ul> <li> <p> <a href=\"https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_ResponseSyntax\">Retrieve response</a> – in the <code>location</code> field</p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_ResponseSyntax\">RetrieveAndGenerate response</a> – in the <code>location</code> field</p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_InvokeAgent.html#API_agent-runtime_InvokeAgent_ResponseSyntax\">InvokeAgent response</a> – in the <code>locatino</code> field</p> </li> </ul>",
4524+
"documentation":"<p>Contains information about the data source location.</p> <p>This data type is used in the following API operations:</p> <ul> <li> <p> <a href=\"https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_ResponseSyntax\">Retrieve response</a> – in the <code>location</code> field</p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_ResponseSyntax\">RetrieveAndGenerate response</a> – in the <code>location</code> field</p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_InvokeAgent.html#API_agent-runtime_InvokeAgent_ResponseSyntax\">InvokeAgent response</a> – in the <code>location</code> field</p> </li> </ul>",
43434525
"sensitive":true
43444526
},
43454527
"RetrievalResultLocationType":{
@@ -4350,7 +4532,9 @@
43504532
"CONFLUENCE",
43514533
"SALESFORCE",
43524534
"SHAREPOINT",
4353-
"CUSTOM"
4535+
"CUSTOM",
4536+
"KENDRA",
4537+
"SQL"
43544538
]
43554539
},
43564540
"RetrievalResultMetadata":{
@@ -4401,6 +4585,16 @@
44014585
},
44024586
"documentation":"<p>The SharePoint data source location.</p>"
44034587
},
4588+
"RetrievalResultSqlLocation":{
4589+
"type":"structure",
4590+
"members":{
4591+
"query":{
4592+
"shape":"String",
4593+
"documentation":"<p>The SQL query used to retrieve the result.</p>"
4594+
}
4595+
},
4596+
"documentation":"<p>Contains information about the SQL query used to retrieve the result.</p>"
4597+
},
44044598
"RetrievalResultWebLocation":{
44054599
"type":"structure",
44064600
"members":{
@@ -5038,6 +5232,36 @@
50385232
"documentation":"<p>Contains the part of the generated text that contains a citation, alongside where it begins and ends.</p> <p>This data type is used in the following API operations:</p> <ul> <li> <p> <a href=\"https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_ResponseSyntax\">RetrieveAndGenerate response</a> – in the <code>textResponsePart</code> field</p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_InvokeAgent.html#API_agent-runtime_InvokeAgent_ResponseSyntax\">InvokeAgent response</a> – in the <code>textResponsePart</code> field</p> </li> </ul>",
50395233
"sensitive":true
50405234
},
5235+
"TextToSqlConfiguration":{
5236+
"type":"structure",
5237+
"required":["type"],
5238+
"members":{
5239+
"knowledgeBaseConfiguration":{
5240+
"shape":"TextToSqlKnowledgeBaseConfiguration",
5241+
"documentation":"<p>Specifies configurations for a knowledge base to use in transformation.</p>"
5242+
},
5243+
"type":{
5244+
"shape":"TextToSqlConfigurationType",
5245+
"documentation":"<p>The type of resource to use in transformation.</p>"
5246+
}
5247+
},
5248+
"documentation":"<p>Contains configurations for transforming text to SQL.</p>"
5249+
},
5250+
"TextToSqlConfigurationType":{
5251+
"type":"string",
5252+
"enum":["KNOWLEDGE_BASE"]
5253+
},
5254+
"TextToSqlKnowledgeBaseConfiguration":{
5255+
"type":"structure",
5256+
"required":["knowledgeBaseArn"],
5257+
"members":{
5258+
"knowledgeBaseArn":{
5259+
"shape":"KnowledgeBaseArn",
5260+
"documentation":"<p>The ARN of the knowledge base</p>"
5261+
}
5262+
},
5263+
"documentation":"<p>Contains configurations for a knowledge base to use in transformation.</p>"
5264+
},
50415265
"ThrottlingException":{
50425266
"type":"structure",
50435267
"members":{
@@ -5143,6 +5367,21 @@
51435367
"event":true,
51445368
"sensitive":true
51455369
},
5370+
"TransformationConfiguration":{
5371+
"type":"structure",
5372+
"required":["mode"],
5373+
"members":{
5374+
"mode":{
5375+
"shape":"QueryTransformationMode",
5376+
"documentation":"<p>The mode of the transformation.</p>"
5377+
},
5378+
"textToSqlConfiguration":{
5379+
"shape":"TextToSqlConfiguration",
5380+
"documentation":"<p>Specifies configurations for transforming text to SQL.</p>"
5381+
}
5382+
},
5383+
"documentation":"<p>Contains configurations for transforming the natural language query into SQL.</p>"
5384+
},
51465385
"Type":{
51475386
"type":"string",
51485387
"enum":[

0 commit comments

Comments
 (0)