aws-sdk-bedrockagentruntime 1.3.0 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -115,6 +115,17 @@ module Aws::BedrockAgentRuntime
115
115
  # on a source in the knowledge base, alongside information about the
116
116
  # source.
117
117
  #
118
+ # This data type is used in the following API operations:
119
+ #
120
+ # * [Retrieve response][1] – in the `citations` field
121
+ #
122
+ # * [RetrieveAndGenerate response][2] – in the `citations` field
123
+ #
124
+ #
125
+ #
126
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_ResponseSyntax
127
+ # [2]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_ResponseSyntax
128
+ #
118
129
  # @!attribute [rw] generated_response_part
119
130
  # Contains the generated response and metadata
120
131
  # @return [Types::GeneratedResponsePart]
@@ -188,6 +199,38 @@ module Aws::BedrockAgentRuntime
188
199
  include Aws::Structure
189
200
  end
190
201
 
202
+ # Specifies the name that the metadata attribute must match and the
203
+ # value to which to compare the value of the metadata attribute. For
204
+ # more information, see [Query configurations][1].
205
+ #
206
+ # This data type is used in the following API operations:
207
+ #
208
+ # * [RetrieveAndGenerate request][2]
209
+ #
210
+ # ^
211
+ #
212
+ #
213
+ #
214
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/kb-test-config.html
215
+ # [2]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_RequestSyntax
216
+ #
217
+ # @!attribute [rw] key
218
+ # The name that the metadata attribute must match.
219
+ # @return [String]
220
+ #
221
+ # @!attribute [rw] value
222
+ # The value to whcih to compare the value of the metadata attribute.
223
+ # @return [Hash,Array,String,Numeric,Boolean]
224
+ #
225
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/FilterAttribute AWS API Documentation
226
+ #
227
+ class FilterAttribute < Struct.new(
228
+ :key,
229
+ :value)
230
+ SENSITIVE = []
231
+ include Aws::Structure
232
+ end
233
+
191
234
  # Contains details about the response to the user.
192
235
  #
193
236
  # @!attribute [rw] text
@@ -205,6 +248,18 @@ module Aws::BedrockAgentRuntime
205
248
  # Contains metadata about a part of the generated response that is
206
249
  # accompanied by a citation.
207
250
  #
251
+ # This data type is used in the following API operations:
252
+ #
253
+ # * [Retrieve response][1] – in the `generatedResponsePart` field
254
+ #
255
+ # * [RetrieveAndGenerate response][2] – in the `generatedResponsePart`
256
+ # field
257
+ #
258
+ #
259
+ #
260
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_ResponseSyntax
261
+ # [2]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_ResponseSyntax
262
+ #
208
263
  # @!attribute [rw] text_response_part
209
264
  # Contains metadata about a textual part of the generated response
210
265
  # that is accompanied by a citation.
@@ -218,6 +273,32 @@ module Aws::BedrockAgentRuntime
218
273
  include Aws::Structure
219
274
  end
220
275
 
276
+ # Contains configurations for response generation based on the knowledge
277
+ # base query results.
278
+ #
279
+ # This data type is used in the following API operations:
280
+ #
281
+ # * [RetrieveAndGenerate request][1]
282
+ #
283
+ # ^
284
+ #
285
+ #
286
+ #
287
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_RequestSyntax
288
+ #
289
+ # @!attribute [rw] prompt_template
290
+ # Contains the template for the prompt that's sent to the model for
291
+ # response generation.
292
+ # @return [Types::PromptTemplate]
293
+ #
294
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/GenerationConfiguration AWS API Documentation
295
+ #
296
+ class GenerationConfiguration < Struct.new(
297
+ :prompt_template)
298
+ SENSITIVE = []
299
+ include Aws::Structure
300
+ end
301
+
221
302
  # Specifications about the inference parameters that were provided
222
303
  # alongside the prompt. These are specified in the
223
304
  # [PromptOverrideConfiguration][1] object that was set when the agent
@@ -353,6 +434,11 @@ module Aws::BedrockAgentRuntime
353
434
  #
354
435
  # @!attribute [rw] session_state
355
436
  # Contains parameters that specify various attributes of the session.
437
+ # For more information, see [Control session context][1].
438
+ #
439
+ #
440
+ #
441
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/agents-session-state.html
356
442
  # @return [Types::SessionState]
357
443
  #
358
444
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/InvokeAgentRequest AWS API Documentation
@@ -429,6 +515,16 @@ module Aws::BedrockAgentRuntime
429
515
 
430
516
  # Contains the query made to the knowledge base.
431
517
  #
518
+ # This data type is used in the following API operations:
519
+ #
520
+ # * [Retrieve request][1] – in the `retrievalQuery` field
521
+ #
522
+ # ^
523
+ #
524
+ #
525
+ #
526
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_RequestSyntax
527
+ #
432
528
  # @!attribute [rw] text
433
529
  # The text of the query made to the knowledge base.
434
530
  # @return [String]
@@ -441,22 +537,29 @@ module Aws::BedrockAgentRuntime
441
537
  include Aws::Structure
442
538
  end
443
539
 
444
- # Contains details about how the results should be returned.
540
+ # Contains configurations for the knowledge base query and retrieval
541
+ # process. For more information, see [Query configurations][1].
445
542
  #
446
543
  # This data type is used in the following API operations:
447
544
  #
448
- # * [Retrieve request body][1]
545
+ # * [Retrieve request][2] – in the `retrievalConfiguration` field
449
546
  #
450
- # * [RetrieveAndGenerate request body][2]
547
+ # * [RetrieveAndGenerate request][3] – in the `retrievalConfiguration`
548
+ # field
451
549
  #
452
550
  #
453
551
  #
454
- # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_RequestSyntax
455
- # [2]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_RequestSyntax
552
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/kb-test-config.html
553
+ # [2]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_RequestSyntax
554
+ # [3]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_RequestSyntax
456
555
  #
457
556
  # @!attribute [rw] vector_search_configuration
458
557
  # Contains details about how the results from the vector search should
459
- # be returned.
558
+ # be returned. For more information, see [Query configurations][1].
559
+ #
560
+ #
561
+ #
562
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/kb-test-config.html
460
563
  # @return [Types::KnowledgeBaseVectorSearchConfiguration]
461
564
  #
462
565
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/KnowledgeBaseRetrievalConfiguration AWS API Documentation
@@ -469,6 +572,16 @@ module Aws::BedrockAgentRuntime
469
572
 
470
573
  # Details about a result from querying the knowledge base.
471
574
  #
575
+ # This data type is used in the following API operations:
576
+ #
577
+ # * [Retrieve response][1] – in the `retrievalResults` field
578
+ #
579
+ # ^
580
+ #
581
+ #
582
+ #
583
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_ResponseSyntax
584
+ #
472
585
  # @!attribute [rw] content
473
586
  # Contains a chunk of text from a data source in the knowledge base.
474
587
  # @return [Types::RetrievalResultContent]
@@ -477,6 +590,15 @@ module Aws::BedrockAgentRuntime
477
590
  # Contains information about the location of the data source.
478
591
  # @return [Types::RetrievalResultLocation]
479
592
  #
593
+ # @!attribute [rw] metadata
594
+ # Contains metadata attributes and their values for the file in the
595
+ # data source. For more information, see [Metadata and filtering][1].
596
+ #
597
+ #
598
+ #
599
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base-ds.html#kb-ds-metadata
600
+ # @return [Hash<String,Hash,Array,String,Numeric,Boolean>]
601
+ #
480
602
  # @!attribute [rw] score
481
603
  # The level of relevance of the result to the query.
482
604
  # @return [Float]
@@ -486,13 +608,31 @@ module Aws::BedrockAgentRuntime
486
608
  class KnowledgeBaseRetrievalResult < Struct.new(
487
609
  :content,
488
610
  :location,
611
+ :metadata,
489
612
  :score)
490
- SENSITIVE = [:content, :location]
613
+ SENSITIVE = [:content, :location, :metadata]
491
614
  include Aws::Structure
492
615
  end
493
616
 
494
617
  # Contains details about the resource being queried.
495
618
  #
619
+ # This data type is used in the following API operations:
620
+ #
621
+ # * [Retrieve request][1] – in the `knowledgeBaseConfiguration` field
622
+ #
623
+ # * [RetrieveAndGenerate request][2] – in the
624
+ # `knowledgeBaseConfiguration` field
625
+ #
626
+ #
627
+ #
628
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_RequestSyntax
629
+ # [2]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_RequestSyntax
630
+ #
631
+ # @!attribute [rw] generation_configuration
632
+ # Contains configurations for response generation based on the
633
+ # knowwledge base query results.
634
+ # @return [Types::GenerationConfiguration]
635
+ #
496
636
  # @!attribute [rw] knowledge_base_id
497
637
  # The unique identifier of the knowledge base that is queried and the
498
638
  # foundation model used for generation.
@@ -510,6 +650,7 @@ module Aws::BedrockAgentRuntime
510
650
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/KnowledgeBaseRetrieveAndGenerateConfiguration AWS API Documentation
511
651
  #
512
652
  class KnowledgeBaseRetrieveAndGenerateConfiguration < Struct.new(
653
+ :generation_configuration,
513
654
  :knowledge_base_id,
514
655
  :model_arn,
515
656
  :retrieval_configuration)
@@ -517,16 +658,34 @@ module Aws::BedrockAgentRuntime
517
658
  include Aws::Structure
518
659
  end
519
660
 
520
- # Configurations for how to carry out the search.
661
+ # Configurations for how to perform the search query and return results.
662
+ # For more information, see [Query configurations][1].
663
+ #
664
+ # This data type is used in the following API operations:
665
+ #
666
+ # * [Retrieve request][2] – in the `vectorSearchConfiguration` field
667
+ #
668
+ # * [RetrieveAndGenerate request][3] – in the
669
+ # `vectorSearchConfiguration` field
670
+ #
671
+ #
672
+ #
673
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/kb-test-config.html
674
+ # [2]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_RequestSyntax
675
+ # [3]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_RequestSyntax
676
+ #
677
+ # @!attribute [rw] filter
678
+ # Specifies the filters to use on the metadata in the knowledge base
679
+ # data sources before returning results. For more information, see
680
+ # [Query configurations][1].
521
681
  #
522
- # @!attribute [rw] number_of_results
523
- # The number of results to return.
524
682
  #
525
- # <note markdown="1"> The `numberOfResults` field is currently unsupported for
526
- # `RetrieveAndGenerate`. Don't include it in this field if you are
527
- # sending a `RetrieveAndGenerate` request.
528
683
  #
529
- # </note>
684
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/kb-test-config.html
685
+ # @return [Types::RetrievalFilter]
686
+ #
687
+ # @!attribute [rw] number_of_results
688
+ # The number of source chunks to retrieve.
530
689
  # @return [Integer]
531
690
  #
532
691
  # @!attribute [rw] override_search_type
@@ -547,9 +706,10 @@ module Aws::BedrockAgentRuntime
547
706
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/KnowledgeBaseVectorSearchConfiguration AWS API Documentation
548
707
  #
549
708
  class KnowledgeBaseVectorSearchConfiguration < Struct.new(
709
+ :filter,
550
710
  :number_of_results,
551
711
  :override_search_type)
552
- SENSITIVE = []
712
+ SENSITIVE = [:filter]
553
713
  include Aws::Structure
554
714
  end
555
715
 
@@ -943,6 +1103,48 @@ module Aws::BedrockAgentRuntime
943
1103
  class Unknown < PreProcessingTrace; end
944
1104
  end
945
1105
 
1106
+ # Contains the template for the prompt that's sent to the model for
1107
+ # response generation. For more information, see [Knowledge base prompt
1108
+ # templates][1].
1109
+ #
1110
+ # This data type is used in the following API operations:
1111
+ #
1112
+ # * [RetrieveAndGenerate request][2] – in the `filter` field
1113
+ #
1114
+ # ^
1115
+ #
1116
+ #
1117
+ #
1118
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/kb-test-config.html#kb-test-config-sysprompt
1119
+ # [2]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_RequestSyntax
1120
+ #
1121
+ # @!attribute [rw] text_prompt_template
1122
+ # The template for the prompt that's sent to the model for response
1123
+ # generation. You can include prompt placeholders, which become
1124
+ # replaced before the prompt is sent to the model to provide
1125
+ # instructions and context to the model. In addition, you can include
1126
+ # XML tags to delineate meaningful sections of the prompt template.
1127
+ #
1128
+ # For more information, see the following resources:
1129
+ #
1130
+ # * [Knowledge base prompt templates][1]
1131
+ #
1132
+ # * [Use XML tags with Anthropic Claude models][2]
1133
+ #
1134
+ #
1135
+ #
1136
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/kb-test-config.html#kb-test-config-sysprompt
1137
+ # [2]: https://docs.anthropic.com/claude/docs/use-xml-tags
1138
+ # @return [String]
1139
+ #
1140
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/PromptTemplate AWS API Documentation
1141
+ #
1142
+ class PromptTemplate < Struct.new(
1143
+ :text_prompt_template)
1144
+ SENSITIVE = [:text_prompt_template]
1145
+ include Aws::Structure
1146
+ end
1147
+
946
1148
  # Contains the reasoning, based on the input, that the agent uses to
947
1149
  # justify carrying out an action group or getting information from a
948
1150
  # knowledge base.
@@ -1012,8 +1214,137 @@ module Aws::BedrockAgentRuntime
1012
1214
  include Aws::Structure
1013
1215
  end
1014
1216
 
1217
+ # Specifies the filters to use on the metadata attributes in the
1218
+ # knowledge base data sources before returning results. For more
1219
+ # information, see [Query configurations][1].
1220
+ #
1221
+ # This data type is used in the following API operations:
1222
+ #
1223
+ # * [Retrieve request][2] – in the `filter` field
1224
+ #
1225
+ # * [RetrieveAndGenerate request][3] – in the `filter` field
1226
+ #
1227
+ #
1228
+ #
1229
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/kb-test-config.html
1230
+ # [2]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_RequestSyntax
1231
+ # [3]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_RequestSyntax
1232
+ #
1233
+ # @note RetrievalFilter is a union - when making an API calls you must set exactly one of the members.
1234
+ #
1235
+ # @!attribute [rw] and_all
1236
+ # Knowledge base data sources whose metadata attributes fulfill all
1237
+ # the filter conditions inside this list are returned.
1238
+ # @return [Array<Types::RetrievalFilter>]
1239
+ #
1240
+ # @!attribute [rw] equals
1241
+ # Knowledge base data sources that contain a metadata attribute whose
1242
+ # name matches the `key` and whose value matches the `value` in this
1243
+ # object are returned.
1244
+ # @return [Types::FilterAttribute]
1245
+ #
1246
+ # @!attribute [rw] greater_than
1247
+ # Knowledge base data sources that contain a metadata attribute whose
1248
+ # name matches the `key` and whose value is greater than the `value`
1249
+ # in this object are returned.
1250
+ # @return [Types::FilterAttribute]
1251
+ #
1252
+ # @!attribute [rw] greater_than_or_equals
1253
+ # Knowledge base data sources that contain a metadata attribute whose
1254
+ # name matches the `key` and whose value is greater than or equal to
1255
+ # the `value` in this object are returned.
1256
+ # @return [Types::FilterAttribute]
1257
+ #
1258
+ # @!attribute [rw] in
1259
+ # Knowledge base data sources that contain a metadata attribute whose
1260
+ # name matches the `key` and whose value is in the list specified in
1261
+ # the `value` in this object are returned.
1262
+ # @return [Types::FilterAttribute]
1263
+ #
1264
+ # @!attribute [rw] less_than
1265
+ # Knowledge base data sources that contain a metadata attribute whose
1266
+ # name matches the `key` and whose value is less than the `value` in
1267
+ # this object are returned.
1268
+ # @return [Types::FilterAttribute]
1269
+ #
1270
+ # @!attribute [rw] less_than_or_equals
1271
+ # Knowledge base data sources that contain a metadata attribute whose
1272
+ # name matches the `key` and whose value is less than or equal to the
1273
+ # `value` in this object are returned.
1274
+ # @return [Types::FilterAttribute]
1275
+ #
1276
+ # @!attribute [rw] not_equals
1277
+ # Knowledge base data sources that contain a metadata attribute whose
1278
+ # name matches the `key` and whose value doesn't match the `value` in
1279
+ # this object are returned.
1280
+ # @return [Types::FilterAttribute]
1281
+ #
1282
+ # @!attribute [rw] not_in
1283
+ # Knowledge base data sources that contain a metadata attribute whose
1284
+ # name matches the `key` and whose value isn't in the list specified
1285
+ # in the `value` in this object are returned.
1286
+ # @return [Types::FilterAttribute]
1287
+ #
1288
+ # @!attribute [rw] or_all
1289
+ # Knowledge base data sources whose metadata attributes fulfill at
1290
+ # least one of the filter conditions inside this list are returned.
1291
+ # @return [Array<Types::RetrievalFilter>]
1292
+ #
1293
+ # @!attribute [rw] starts_with
1294
+ # Knowledge base data sources that contain a metadata attribute whose
1295
+ # name matches the `key` and whose value starts with the `value` in
1296
+ # this object are returned. This filter is currently only supported
1297
+ # for Amazon OpenSearch Serverless vector stores.
1298
+ # @return [Types::FilterAttribute]
1299
+ #
1300
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/RetrievalFilter AWS API Documentation
1301
+ #
1302
+ class RetrievalFilter < Struct.new(
1303
+ :and_all,
1304
+ :equals,
1305
+ :greater_than,
1306
+ :greater_than_or_equals,
1307
+ :in,
1308
+ :less_than,
1309
+ :less_than_or_equals,
1310
+ :not_equals,
1311
+ :not_in,
1312
+ :or_all,
1313
+ :starts_with,
1314
+ :unknown)
1315
+ SENSITIVE = []
1316
+ include Aws::Structure
1317
+ include Aws::Structure::Union
1318
+
1319
+ class AndAll < RetrievalFilter; end
1320
+ class Equals < RetrievalFilter; end
1321
+ class GreaterThan < RetrievalFilter; end
1322
+ class GreaterThanOrEquals < RetrievalFilter; end
1323
+ class In < RetrievalFilter; end
1324
+ class LessThan < RetrievalFilter; end
1325
+ class LessThanOrEquals < RetrievalFilter; end
1326
+ class NotEquals < RetrievalFilter; end
1327
+ class NotIn < RetrievalFilter; end
1328
+ class OrAll < RetrievalFilter; end
1329
+ class StartsWith < RetrievalFilter; end
1330
+ class Unknown < RetrievalFilter; end
1331
+ end
1332
+
1015
1333
  # Contains the cited text from the data source.
1016
1334
  #
1335
+ # This data type is used in the following API operations:
1336
+ #
1337
+ # * [Retrieve response][1] – in the `content` field
1338
+ #
1339
+ # * [RetrieveAndGenerate response][2] – in the `content` field
1340
+ #
1341
+ # * [Retrieve response][1] – in the `content` field
1342
+ #
1343
+ #
1344
+ #
1345
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_ResponseSyntax
1346
+ # [2]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_ResponseSyntax
1347
+ #
1017
1348
  # @!attribute [rw] text
1018
1349
  # The cited text from the data source.
1019
1350
  # @return [String]
@@ -1028,6 +1359,19 @@ module Aws::BedrockAgentRuntime
1028
1359
 
1029
1360
  # Contains information about the location of the data source.
1030
1361
  #
1362
+ # This data type is used in the following API operations:
1363
+ #
1364
+ # * [Retrieve response][1] – in the `location` field
1365
+ #
1366
+ # * [RetrieveAndGenerate response][2] – in the `location` field
1367
+ #
1368
+ # * [Retrieve response][1] – in the `locatino` field
1369
+ #
1370
+ #
1371
+ #
1372
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_ResponseSyntax
1373
+ # [2]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_ResponseSyntax
1374
+ #
1031
1375
  # @!attribute [rw] s3_location
1032
1376
  # Contains the S3 location of the data source.
1033
1377
  # @return [Types::RetrievalResultS3Location]
@@ -1047,6 +1391,19 @@ module Aws::BedrockAgentRuntime
1047
1391
 
1048
1392
  # Contains the S3 location of the data source.
1049
1393
  #
1394
+ # This data type is used in the following API operations:
1395
+ #
1396
+ # * [Retrieve response][1] – in the `s3Location` field
1397
+ #
1398
+ # * [RetrieveAndGenerate response][2] – in the `s3Location` field
1399
+ #
1400
+ # * [Retrieve response][1] – in the `s3Location` field
1401
+ #
1402
+ #
1403
+ #
1404
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_ResponseSyntax
1405
+ # [2]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_ResponseSyntax
1406
+ #
1050
1407
  # @!attribute [rw] uri
1051
1408
  # The S3 URI of the data source.
1052
1409
  # @return [String]
@@ -1061,6 +1418,17 @@ module Aws::BedrockAgentRuntime
1061
1418
 
1062
1419
  # Contains details about the resource being queried.
1063
1420
  #
1421
+ # This data type is used in the following API operations:
1422
+ #
1423
+ # * [RetrieveAndGenerate request][1] – in the
1424
+ # `retrieveAndGenerateConfiguration` field
1425
+ #
1426
+ # ^
1427
+ #
1428
+ #
1429
+ #
1430
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_RequestSyntax
1431
+ #
1064
1432
  # @!attribute [rw] knowledge_base_configuration
1065
1433
  # Contains details about the resource being queried.
1066
1434
  # @return [Types::KnowledgeBaseRetrieveAndGenerateConfiguration]
@@ -1080,6 +1448,16 @@ module Aws::BedrockAgentRuntime
1080
1448
 
1081
1449
  # Contains the query made to the knowledge base.
1082
1450
  #
1451
+ # This data type is used in the following API operations:
1452
+ #
1453
+ # * [RetrieveAndGenerate request][1] – in the `input` field
1454
+ #
1455
+ # ^
1456
+ #
1457
+ #
1458
+ #
1459
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_RequestSyntax
1460
+ #
1083
1461
  # @!attribute [rw] text
1084
1462
  # The query made to the knowledge base.
1085
1463
  # @return [String]
@@ -1094,6 +1472,16 @@ module Aws::BedrockAgentRuntime
1094
1472
 
1095
1473
  # Contains the response generated from querying the knowledge base.
1096
1474
  #
1475
+ # This data type is used in the following API operations:
1476
+ #
1477
+ # * [RetrieveAndGenerate response][1] – in the `output` field
1478
+ #
1479
+ # ^
1480
+ #
1481
+ #
1482
+ #
1483
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_ResponseSyntax
1484
+ #
1097
1485
  # @!attribute [rw] text
1098
1486
  # The response generated from querying the knowledge base.
1099
1487
  # @return [String]
@@ -1107,12 +1495,16 @@ module Aws::BedrockAgentRuntime
1107
1495
  end
1108
1496
 
1109
1497
  # @!attribute [rw] input
1110
- # Contains the query made to the knowledge base.
1498
+ # Contains the query to be made to the knowledge base.
1111
1499
  # @return [Types::RetrieveAndGenerateInput]
1112
1500
  #
1113
1501
  # @!attribute [rw] retrieve_and_generate_configuration
1114
- # Contains details about the resource being queried and the foundation
1115
- # model used for generation.
1502
+ # Contains configurations for the knowledge base query and retrieval
1503
+ # process. For more information, see [Query configurations][1].
1504
+ #
1505
+ #
1506
+ #
1507
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/kb-test-config.html
1116
1508
  # @return [Types::RetrieveAndGenerateConfiguration]
1117
1509
  #
1118
1510
  # @!attribute [rw] session_configuration
@@ -1162,6 +1554,17 @@ module Aws::BedrockAgentRuntime
1162
1554
 
1163
1555
  # Contains configuration about the session with the knowledge base.
1164
1556
  #
1557
+ # This data type is used in the following API operations:
1558
+ #
1559
+ # * [RetrieveAndGenerate request][1] – in the `sessionConfiguration`
1560
+ # field
1561
+ #
1562
+ # ^
1563
+ #
1564
+ #
1565
+ #
1566
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_RequestSyntax
1567
+ #
1165
1568
  # @!attribute [rw] kms_key_arn
1166
1569
  # The ARN of the KMS key encrypting the session.
1167
1570
  # @return [String]
@@ -1185,11 +1588,16 @@ module Aws::BedrockAgentRuntime
1185
1588
  # @return [String]
1186
1589
  #
1187
1590
  # @!attribute [rw] retrieval_configuration
1188
- # Contains details about how the results should be returned.
1591
+ # Contains configurations for the knowledge base query and retrieval
1592
+ # process. For more information, see [Query configurations][1].
1593
+ #
1594
+ #
1595
+ #
1596
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/kb-test-config.html
1189
1597
  # @return [Types::KnowledgeBaseRetrievalConfiguration]
1190
1598
  #
1191
1599
  # @!attribute [rw] retrieval_query
1192
- # The query to send the knowledge base.
1600
+ # Contains the query to send the knowledge base.
1193
1601
  # @return [Types::KnowledgeBaseQuery]
1194
1602
  #
1195
1603
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/RetrieveRequest AWS API Documentation
@@ -1222,7 +1630,19 @@ module Aws::BedrockAgentRuntime
1222
1630
  include Aws::Structure
1223
1631
  end
1224
1632
 
1225
- # Contains metadata about a sources cited for the generated response.
1633
+ # Contains metadata about a source cited for the generated response.
1634
+ #
1635
+ # This data type is used in the following API operations:
1636
+ #
1637
+ # * [RetrieveAndGenerate response][1] – in the `retrievedReferences`
1638
+ # field
1639
+ #
1640
+ # * [Retrieve response][2] – in the `retrievedReferences` field
1641
+ #
1642
+ #
1643
+ #
1644
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_ResponseSyntax
1645
+ # [2]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_ResponseSyntax
1226
1646
  #
1227
1647
  # @!attribute [rw] content
1228
1648
  # Contains the cited text from the data source.
@@ -1232,12 +1652,22 @@ module Aws::BedrockAgentRuntime
1232
1652
  # Contains information about the location of the data source.
1233
1653
  # @return [Types::RetrievalResultLocation]
1234
1654
  #
1655
+ # @!attribute [rw] metadata
1656
+ # Contains metadata attributes and their values for the file in the
1657
+ # data source. For more information, see [Metadata and filtering][1].
1658
+ #
1659
+ #
1660
+ #
1661
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base-ds.html#kb-ds-metadata
1662
+ # @return [Hash<String,Hash,Array,String,Numeric,Boolean>]
1663
+ #
1235
1664
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/RetrievedReference AWS API Documentation
1236
1665
  #
1237
1666
  class RetrievedReference < Struct.new(
1238
1667
  :content,
1239
- :location)
1240
- SENSITIVE = [:content, :location]
1668
+ :location,
1669
+ :metadata)
1670
+ SENSITIVE = [:content, :location, :metadata]
1241
1671
  include Aws::Structure
1242
1672
  end
1243
1673
 
@@ -1262,13 +1692,13 @@ module Aws::BedrockAgentRuntime
1262
1692
  # group or pass them when making an [InvokeAgent][2] request. Use
1263
1693
  # session state attributes to control and provide conversational context
1264
1694
  # for your agent and to help customize your agent's behavior. For more
1265
- # information, see [Session context][3].
1695
+ # information, see [Control session context][3].
1266
1696
  #
1267
1697
  #
1268
1698
  #
1269
1699
  # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/agents-lambda.html
1270
1700
  # [2]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_InvokeAgent.html
1271
- # [3]: https://docs.aws.amazon.com/bedrock/latest/userguide/sessionstate.html
1701
+ # [3]: https://docs.aws.amazon.com/bedrock/latest/userguide/agents-session-state.html
1272
1702
  #
1273
1703
  # @!attribute [rw] prompt_session_attributes
1274
1704
  # Contains attributes that persist across a prompt and the values of
@@ -1299,6 +1729,17 @@ module Aws::BedrockAgentRuntime
1299
1729
  # Contains information about where the text with a citation begins and
1300
1730
  # ends in the generated output.
1301
1731
  #
1732
+ # This data type is used in the following API operations:
1733
+ #
1734
+ # * [RetrieveAndGenerate response][1] – in the `span` field
1735
+ #
1736
+ # * [Retrieve response][2] – in the `span` field
1737
+ #
1738
+ #
1739
+ #
1740
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_ResponseSyntax
1741
+ # [2]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_ResponseSyntax
1742
+ #
1302
1743
  # @!attribute [rw] end
1303
1744
  # Where the text with a citation ends in the generated output.
1304
1745
  # @return [Integer]
@@ -1319,6 +1760,17 @@ module Aws::BedrockAgentRuntime
1319
1760
  # Contains the part of the generated text that contains a citation,
1320
1761
  # alongside where it begins and ends.
1321
1762
  #
1763
+ # This data type is used in the following API operations:
1764
+ #
1765
+ # * [RetrieveAndGenerate response][1] – in the `textResponsePart` field
1766
+ #
1767
+ # * [Retrieve response][2] – in the `textResponsePart` field
1768
+ #
1769
+ #
1770
+ #
1771
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_ResponseSyntax
1772
+ # [2]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_ResponseSyntax
1773
+ #
1322
1774
  # @!attribute [rw] span
1323
1775
  # Contains information about where the text with a citation begins and
1324
1776
  # ends in the generated output.