From 12e4e476e7d8592c64a131d8e6c20d231b47da04 Mon Sep 17 00:00:00 2001 From: AWS <> Date: Wed, 14 Feb 2024 19:07:15 +0000 Subject: [PATCH] QBusiness Update: This release adds the metadata-boosting feature, which allows customers to easily fine-tune the underlying ranking of retrieved RAG passages in order to optimize Q&A answer relevance. It also adds new feedback reasons for the PutFeedback API. --- .../feature-QBusiness-1caeca5.json | 6 + .../codegen-resources/service-2.json | 152 ++++++++++++++++-- 2 files changed, 148 insertions(+), 10 deletions(-) create mode 100644 .changes/next-release/feature-QBusiness-1caeca5.json diff --git a/.changes/next-release/feature-QBusiness-1caeca5.json b/.changes/next-release/feature-QBusiness-1caeca5.json new file mode 100644 index 000000000000..59c2e1d40b34 --- /dev/null +++ b/.changes/next-release/feature-QBusiness-1caeca5.json @@ -0,0 +1,6 @@ +{ + "type": "feature", + "category": "QBusiness", + "contributor": "", + "description": "This release adds the metadata-boosting feature, which allows customers to easily fine-tune the underlying ranking of retrieved RAG passages in order to optimize Q&A answer relevance. It also adds new feedback reasons for the PutFeedback API." +} diff --git a/services/qbusiness/src/main/resources/codegen-resources/service-2.json b/services/qbusiness/src/main/resources/codegen-resources/service-2.json index 87fb91b593ad..84bd023d0924 100644 --- a/services/qbusiness/src/main/resources/codegen-resources/service-2.json +++ b/services/qbusiness/src/main/resources/codegen-resources/service-2.json @@ -131,7 +131,7 @@ {"shape":"AccessDeniedException"}, {"shape":"ServiceQuotaExceededException"} ], - "documentation":"
Creates an Amazon Q index.
To determine if index creation has completed, check the Status
field returned from a call to DescribeIndex
. The Status
field is set to ACTIVE
when the index is ready to use.
Once the index is active, you can index your documents using the BatchPutDocument
API or the CreateDataSource
API.
Creates an Amazon Q index.
To determine if index creation has completed, check the Status
field returned from a call to DescribeIndex
. The Status
field is set to ACTIVE
when the index is ready to use.
Once the index is active, you can index your documents using the BatchPutDocument
API or the CreateDataSource
API.
Performs a logical OR
operation on all supplied filters.
Enables filtering of Amazon Q web experience responses based on document attributes or metadata fields.
" + "documentation":"Enables filtering of responses based on document attributes or metadata fields.
" }, "AttributeFilters":{ "type":"list", @@ -1623,6 +1623,12 @@ "type":"boolean", "box":true }, + "BoostingDurationInSeconds":{ + "type":"long", + "box":true, + "max":999999999, + "min":0 + }, "ChatSyncInput":{ "type":"structure", "required":[ @@ -2351,6 +2357,21 @@ "type":"list", "member":{"shape":"DataSource"} }, + "DateAttributeBoostingConfiguration":{ + "type":"structure", + "required":["boostingLevel"], + "members":{ + "boostingDurationInSeconds":{ + "shape":"BoostingDurationInSeconds", + "documentation":"Specifies the duration, in seconds, of a boost applies to a DATE
type document attribute.
Specifies how much a document attribute is boosted.
" + } + }, + "documentation":"Provides information on boosting DATE
type document attributes.
For more information on how boosting document attributes work in Amazon Q, see Boosting using document attributes.
" + }, "DeleteApplicationRequest":{ "type":"structure", "required":["applicationId"], @@ -2694,6 +2715,45 @@ }, "documentation":"A document attribute or metadata field.
" }, + "DocumentAttributeBoostingConfiguration":{ + "type":"structure", + "members":{ + "dateConfiguration":{ + "shape":"DateAttributeBoostingConfiguration", + "documentation":"Provides information on boosting DATE
type document attributes.
Provides information on boosting NUMBER
type document attributes.
Provides information on boosting STRING
type document attributes.
Provides information on boosting STRING_LIST
type document attributes.
Provides information on boosting supported Amazon Q document attribute types. When an end user chat query matches document attributes that have been boosted, Amazon Q prioritizes generating responses from content that matches the boosted document attributes.
For STRING
and STRING_LIST
type document attributes to be used for boosting on the console and the API, they must be enabled for search using the DocumentAttributeConfiguration object of the UpdateIndex API. If you haven't enabled searching on these attributes, you can't boost attributes of these data types on either the console or the API.
For more information on how boosting document attributes work in Amazon Q, see Boosting using document attributes.
", + "union":true + }, + "DocumentAttributeBoostingLevel":{ + "type":"string", + "enum":[ + "NONE", + "LOW", + "MEDIUM", + "HIGH", + "VERY_HIGH" + ] + }, + "DocumentAttributeBoostingOverrideMap":{ + "type":"map", + "key":{"shape":"DocumentAttributeKey"}, + "value":{"shape":"DocumentAttributeBoostingConfiguration"}, + "min":1 + }, "DocumentAttributeCondition":{ "type":"structure", "required":[ @@ -2711,7 +2771,7 @@ }, "value":{"shape":"DocumentAttributeValue"} }, - "documentation":"The condition used for the target document attribute or metadata field when ingesting documents into Amazon Q. You use this with DocumentAttributeTarget
to apply the condition.
For example, you can create the 'Department' target field and have it prefill department names associated with the documents based on information in the 'Source_URI' field. Set the condition that if the 'Source_URI' field contains 'financial' in its URI value, then prefill the target field 'Department' with the target value 'Finance' for the document.
Amazon Q can't create a target field if it has not already been created as an index field. After you create your index field, you can create a document metadata field using DocumentAttributeTarget
. Amazon Q then will map your newly created metadata field to your index field.
The condition used for the target document attribute or metadata field when ingesting documents into Amazon Q. You use this with DocumentAttributeTarget
to apply the condition.
For example, you can create the 'Department' target field and have it prefill department names associated with the documents based on information in the 'Source_URI' field. Set the condition that if the 'Source_URI' field contains 'financial' in its URI value, then prefill the target field 'Department' with the target value 'Finance' for the document.
Amazon Q can't create a target field if it has not already been created as an index field. After you create your index field, you can create a document metadata field using DocumentAttributeTarget
. Amazon Q then will map your newly created metadata field to your index field.
The target document attribute or metadata field you want to alter when ingesting documents into Amazon Q.
For example, you can delete all customer identification numbers associated with the documents, stored in the document metadata field called 'Customer_ID' by setting the target key as 'Customer_ID' and the deletion flag to TRUE
. This removes all customer ID values in the field 'Customer_ID'. This would scrub personally identifiable information from each document's metadata.
Amazon Q can't create a target field if it has not already been created as an index field. After you create your index field, you can create a document metadata field using DocumentAttributeTarget
. Amazon Q will then map your newly created document attribute to your index field.
You can also use this with DocumentAttributeCondition
.
The target document attribute or metadata field you want to alter when ingesting documents into Amazon Q.
For example, you can delete all customer identification numbers associated with the documents, stored in the document metadata field called 'Customer_ID' by setting the target key as 'Customer_ID' and the deletion flag to TRUE
. This removes all customer ID values in the field 'Customer_ID'. This would scrub personally identifiable information from each document's metadata.
Amazon Q can't create a target field if it has not already been created as an index field. After you create your index field, you can create a document metadata field using DocumentAttributeTarget
. Amazon Q will then map your newly created document attribute to your index field.
You can also use this with DocumentAttributeCondition
.
Stores the original, raw documents or the structured, parsed documents before and after altering them. For more information, see Data contracts for Lambda functions.
" } }, - "documentation":"Provides the configuration information for invoking a Lambda function in Lambda to alter document metadata and content when ingesting documents into Amazon Q.
You can configure your Lambda function using PreExtractionHookConfiguration if you want to apply advanced alterations on the original or raw documents.
If you want to apply advanced alterations on the Amazon Q structured documents, you must configure your Lambda function using PostExtractionHookConfiguration.
You can only invoke one Lambda function. However, this function can invoke other functions it requires.
For more information, see Custom document enrichment.
" + "documentation":"Provides the configuration information for invoking a Lambda function in Lambda to alter document metadata and content when ingesting documents into Amazon Q.
You can configure your Lambda function using PreExtractionHookConfiguration if you want to apply advanced alterations on the original or raw documents.
If you want to apply advanced alterations on the Amazon Q structured documents, you must configure your Lambda function using PostExtractionHookConfiguration.
You can only invoke one Lambda function. However, this function can invoke other functions it requires.
For more information, see Custom document enrichment.
" }, "Index":{ "type":"structure", @@ -3744,7 +3804,7 @@ }, "target":{"shape":"DocumentAttributeTarget"} }, - "documentation":"Provides the configuration information for applying basic logic to alter document metadata and content when ingesting documents into Amazon Q.
To apply advanced logic, to go beyond what you can do with basic logic, see HookConfiguration
.
For more information, see Custom document enrichment.
" + "documentation":"Provides the configuration information for applying basic logic to alter document metadata and content when ingesting documents into Amazon Q.
To apply advanced logic, to go beyond what you can do with basic logic, see HookConfiguration
.
For more information, see Custom document enrichment.
" }, "InlineDocumentEnrichmentConfigurations":{ "type":"list", @@ -4567,7 +4627,11 @@ "FACTUALLY_CORRECT", "COMPLETE", "RELEVANT_SOURCES", - "HELPFUL" + "HELPFUL", + "NOT_BASED_ON_DOCUMENTS", + "NOT_COMPLETE", + "NOT_CONCISE", + "OTHER" ] }, "Messages":{ @@ -4582,6 +4646,10 @@ "type":"structure", "required":["indexId"], "members":{ + "boostingOverride":{ + "shape":"DocumentAttributeBoostingOverrideMap", + "documentation":"Overrides the default boosts applied by Amazon Q to supported document attribute data types.
" + }, "indexId":{ "shape":"IndexId", "documentation":"The identifier for the Amazon Q index.
" @@ -4594,6 +4662,28 @@ "max":800, "min":1 }, + "NumberAttributeBoostingConfiguration":{ + "type":"structure", + "required":["boostingLevel"], + "members":{ + "boostingLevel":{ + "shape":"DocumentAttributeBoostingLevel", + "documentation":"Specifies the duration, in seconds, of a boost applies to a NUMBER
type document attribute.
Specifies how much a document attribute is boosted.
" + } + }, + "documentation":"Provides information on boosting NUMBER
type document attributes.
For more information on how boosting document attributes work in Amazon Q, see Boosting using document attributes.
" + }, + "NumberAttributeBoostingType":{ + "type":"string", + "enum":[ + "PRIORITIZE_LARGER_VALUES", + "PRIORITIZE_SMALLER_VALUES" + ] + }, "OAuth2ClientCredentialConfiguration":{ "type":"structure", "required":[ @@ -4985,7 +5075,7 @@ }, "ruleType":{ "shape":"RuleType", - "documentation":"The type fo rule.
" + "documentation":"The type of rule.
" } }, "documentation":"Guardrail rules for an Amazon Q application. Amazon Q supports only one rule at a time.
" @@ -5244,6 +5334,48 @@ "max":2048, "min":1 }, + "StringAttributeBoostingConfiguration":{ + "type":"structure", + "required":["boostingLevel"], + "members":{ + "attributeValueBoosting":{ + "shape":"StringAttributeValueBoosting", + "documentation":"Specifies specific values of a STRING
type document attribute being boosted.
Specifies how much a document attribute is boosted.
" + } + }, + "documentation":"Provides information on boosting STRING
type document attributes.
For STRING
and STRING_LIST
type document attributes to be used for boosting on the console and the API, they must be enabled for search using the DocumentAttributeConfiguration object of the UpdateIndex API. If you haven't enabled searching on these attributes, you can't boost attributes of these data types on either the console or the API.
For more information on how boosting document attributes work in Amazon Q, see Boosting using document attributes.
" + }, + "StringAttributeValueBoosting":{ + "type":"map", + "key":{"shape":"String"}, + "value":{"shape":"StringAttributeValueBoostingLevel"}, + "max":10, + "min":1 + }, + "StringAttributeValueBoostingLevel":{ + "type":"string", + "enum":[ + "LOW", + "MEDIUM", + "HIGH", + "VERY_HIGH" + ] + }, + "StringListAttributeBoostingConfiguration":{ + "type":"structure", + "required":["boostingLevel"], + "members":{ + "boostingLevel":{ + "shape":"DocumentAttributeBoostingLevel", + "documentation":"Specifies how much a document attribute is boosted.
" + } + }, + "documentation":"Provides information on boosting STRING_LIST
type document attributes.
For STRING
and STRING_LIST
type document attributes to be used for boosting on the console and the API, they must be enabled for search using the DocumentAttributeConfiguration object of the UpdateIndex API. If you haven't enabled searching on these attributes, you can't boost attributes of these data types on either the console or the API.
For more information on how boosting document attributes work in Amazon Q, see Boosting using document attributes.
" + }, "SubnetId":{ "type":"string", "max":200, @@ -5396,7 +5528,7 @@ "members":{ "description":{ "shape":"TopicDescription", - "documentation":"A description for your topic control configuration. Use this outline how the large language model (LLM) should use this topic control configuration.
" + "documentation":"A description for your topic control configuration. Use this to outline how the large language model (LLM) should use this topic control configuration.
" }, "exampleChatMessages":{ "shape":"ExampleChatMessages", @@ -5995,5 +6127,5 @@ "member":{"shape":"WebExperience"} } }, - "documentation":"" + "documentation":"
Amazon Q is in preview release and is subject to change.
This is the Amazon Q (for business use) API Reference. Amazon Q is a fully managed, generative-AI powered enterprise chat assistant that you can deploy within your organization. Amazon Q enhances employee productivity by supporting key tasks such as question-answering, knowledge discovery, writing email messages, summarizing text, drafting document outlines, and brainstorming ideas. Users ask questions of Amazon Q and get answers that are presented in a conversational manner. For an introduction to the service, see the Amazon Q (for business use) Developer Guide .
For an overview of the Amazon Q APIs, see Overview of Amazon Q API operations.
For information about the IAM access control permissions you need to use this API, see IAM roles for Amazon Q in the Amazon Q (for business use) Developer Guide.
You can use the following AWS SDKs to access Amazon Q APIs:
The following resources provide additional information about using the Amazon Q API:
" }