Skip to main content

relevant_contents

Creates, updates, deletes, gets or lists a relevant_contents resource.

Overview

Namerelevant_contents
TypeResource
Idaws.qbusiness.relevant_contents

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
contentstringThe actual content of the relevant item.
document_attributesarrayAdditional attributes of the document containing the relevant content.
document_idstringThe unique identifier of the document containing the relevant content. (pattern: <code>\P{C}*</code>)
document_titlestringThe title of the document containing the relevant content.
document_uristringThe URI of the document containing the relevant content. (pattern: <code>(https?|ftp|file):​//([^\s]*)</code>)
score_attributesobjectAttributes related to the relevance score of the content.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
search_relevant_contentselectapplication_id, regionSearches for relevant content in a Amazon Q Business application based on a query. This operation takes a search query text, the Amazon Q Business application identifier, and optional filters (such as content source and maximum results) as input. It returns a list of relevant content items, where each item includes the content text, the unique document identifier, the document title, the document URI, any relevant document attributes, and score attributes indicating the confidence level of the relevance.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
application_idstringThe unique identifier of the Amazon Q Business application to search.
regionstringAWS region (default: us-east-1)

SELECT examples

Searches for relevant content in a Amazon Q Business application based on a query. This operation takes a search query text, the Amazon Q Business application identifier, and optional filters (such as content source and maximum results) as input. It returns a list of relevant content items, where each item includes the content text, the unique document identifier, the document title, the document URI, any relevant document attributes, and score attributes indicating the confidence level of the relevance.

SELECT
content,
document_attributes,
document_id,
document_title,
document_uri,
score_attributes
FROM aws.qbusiness.relevant_contents
WHERE application_id = '{{ application_id }}' -- required
AND region = '{{ region }}' -- required
;