relevant_contents
Creates, updates, deletes, gets or lists a relevant_contents resource.
Overview
| Name | relevant_contents |
| Type | Resource |
| Id | aws.qbusiness.relevant_contents |
Fields
The following fields are returned by SELECT queries:
- search_relevant_content
| Name | Datatype | Description |
|---|---|---|
content | string | The actual content of the relevant item. |
document_attributes | array | Additional attributes of the document containing the relevant content. |
document_id | string | The unique identifier of the document containing the relevant content. (pattern: <code>\P{C}*</code>) |
document_title | string | The title of the document containing the relevant content. |
document_uri | string | The URI of the document containing the relevant content. (pattern: <code>(https?|ftp|file)://([^\s]*)</code>) |
score_attributes | object | Attributes related to the relevance score of the content. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
search_relevant_content | select | application_id, region | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
application_id | string | The unique identifier of the Amazon Q Business application to search. |
region | string | AWS region (default: us-east-1) |
SELECT examples
- search_relevant_content
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
;