Tuning the query results based on document attribute relevancy
Important
This section assumes that you understand document attributes and metadata controls in Amazon Q Business.
Note
If you are already using metadata boosting, please contact AWS Support to migrate to the new version.
Relevancy tuning in Amazon Q Business is only available if you use an Amazon Q native retriever. If you use an Amazon Kendra retriever, you must configure boosting for document attributes in Amazon Kendra.
Relevance tuning or boosting is the ability for the admins to provide their preference based on document attributes that can guide the retrieval and response generation in Amazon Q Business. Choosing to boost document attributes doesn't by itself cause Amazon Q Business to include or exclude a document in the chat response. A boosted document attribute is only one of the factors that Amazon Q Business uses to determine the relevance of a document. You can provide preferences on recency of the documents or the data sources where the documents are stored using the metadata fields.
For more information, see Understanding boosting in Amazon Q Business
Recency
Recency is the preference when the documented was created or last updated. To tune
for the results for recency, enable this preference. In Recency
type, choose either the _created_at
or
_last_updated_at
document attribute to indicate which metadata
field to use to guide Amazon Q Business. After choosing a document attribute, set the time
period in Boosting duration over which the boost applies to the
DATE
type document attribute. You can pick either the last three,
six, nine, or 12 months to apply the boost.
For example, if you set boosting duration to the last three months for the
_created_at
reserved attribute, documents created within the last
three months will be get a higher preference than documents created more than three
months ago.
Generally, all documents inside the boosting duration will be given more importance over documents outside the boosting duration. Within the boosting duration, documents with more recent dates will be given more importance over documents with less recent dates. Outside the boosting duration, the documents will not get be any additional preference or boost.
Sources
Sources is the preference where the document is stored. This preference allows you
to boost chat responses based on _data_source_id
document attribute
that helps you rank sources that are more authoritative than other sources in your
application environment. You can select up to five data sources.
For example, you have a two data sources—Sharepoint and an S3 bucket. If you want Amazon Q Business to respond based on documents in S3 (if available) first and then look at documents stored in Sharepoint, rank S3 higher than Sharepoint.
If you enable both preferences, you can also set the rank order of the Recency and Sources preferences. For example, if where the document is stored is more important than when the document was created or updated, drag Source to have a higher priority than Recency.
Rank order
If you enable both preferences, you can also set the rank order of the Recency and Sources preferences. For example, if where the document is stored is more important than when the document was created or updated, drag Source to have a higher priority than Recency.