Skip to content

Commit

Permalink
feat(client-qbusiness): This release adds the metadata-boosting featu…
Browse files Browse the repository at this point in the history
…re, 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.
  • Loading branch information
awstools committed Feb 14, 2024
1 parent 424f63d commit 8fe8537
Show file tree
Hide file tree
Showing 12 changed files with 975 additions and 38 deletions.
81 changes: 81 additions & 0 deletions clients/client-qbusiness/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,89 @@

AWS SDK for JavaScript QBusiness Client for Node.js, Browser and React Native.

<note>
<p>Amazon Q is in preview release and is subject to change.</p>
</note>
<p>This is the <i>Amazon Q (for business use)</i> 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 <a href="https://docs.aws.amazon.com/amazonq/latest/business-use-dg/what-is.html">
<i>Amazon Q (for business use) Developer
Guide</i>
</a>.</p>
<p>For an overview of the Amazon Q APIs, see <a href="https://docs.aws.amazon.com/amazonq/latest/business-use-dg/api-ref.html#api-overview">Overview of Amazon Q API operations</a>.</p>
<p>For information about the IAM access control permissions you need to
use this API, see <a href="https://docs.aws.amazon.com/amazonq/latest/business-use-dg/iam-roles.html">IAM roles for Amazon Q</a> in the
<i>Amazon Q (for business use) Developer Guide</i>.</p>
<p>You can use the following AWS SDKs to access Amazon Q APIs:</p>
<ul>
<li>
<p>
<a href="https://docs.aws.amazon.com/sdk-for-cpp">AWS SDK for C++</a>
</p>
</li>
<li>
<p>
<a href="https://docs.aws.amazon.com/sdk-for-go">AWS SDK for Go</a>
</p>
</li>
<li>
<p>
<a href="https://docs.aws.amazon.com/sdk-for-java">AWS SDK for Java</a>
</p>
</li>
<li>
<p>
<a href="https://docs.aws.amazon.com/sdk-for-javascript">AWS SDK for
JavaScript</a>
</p>
</li>
<li>
<p>
<a href="https://docs.aws.amazon.com/sdk-for-net">AWS SDK for .NET</a>
</p>
</li>
<li>
<p>
<a href="https://docs.aws.amazon.com/pythonsdk">AWS SDK for Python
(Boto3)</a>
</p>
</li>
<li>
<p>
<a href="https://docs.aws.amazon.com/sdk-for-ruby">AWS SDK for Ruby</a>
</p>
</li>
</ul>
<p>The following resources provide additional information about using the Amazon Q
API:</p>
<ul>
<li>
<p>
<i>
<a href="https://docs.aws.amazon.com/amazonq/latest/business-use-dg/setting-up.html">Setting up for
Amazon Q</a>
</i>
</p>
</li>
<li>
<p>
<i>
<a href="https://awscli.amazonaws.com/v2/documentation/api/latest/reference/qbusiness/index.html">Amazon Q CLI Reference</a>
</i>
</p>
</li>
<li>
<p>
<i>
<a href="https://docs.aws.amazon.com/general/latest/gr/amazonq.html">Amazon Web Services General Reference</a>
</i>
</p>
</li>
</ul>

## Installing

Expand Down
85 changes: 83 additions & 2 deletions clients/client-qbusiness/src/QBusiness.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1030,8 +1030,89 @@ export interface QBusiness {

/**
* @public
* <p>
* </p>
* <note>
* <p>Amazon Q is in preview release and is subject to change.</p>
* </note>
* <p>This is the <i>Amazon Q (for business use)</i> 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 <a href="https://docs.aws.amazon.com/amazonq/latest/business-use-dg/what-is.html">
* <i>Amazon Q (for business use) Developer
* Guide</i>
* </a>.</p>
* <p>For an overview of the Amazon Q APIs, see <a href="https://docs.aws.amazon.com/amazonq/latest/business-use-dg/api-ref.html#api-overview">Overview of Amazon Q API operations</a>.</p>
* <p>For information about the IAM access control permissions you need to
* use this API, see <a href="https://docs.aws.amazon.com/amazonq/latest/business-use-dg/iam-roles.html">IAM roles for Amazon Q</a> in the
* <i>Amazon Q (for business use) Developer Guide</i>.</p>
* <p>You can use the following AWS SDKs to access Amazon Q APIs:</p>
* <ul>
* <li>
* <p>
* <a href="https://docs.aws.amazon.com/sdk-for-cpp">AWS SDK for C++</a>
* </p>
* </li>
* <li>
* <p>
* <a href="https://docs.aws.amazon.com/sdk-for-go">AWS SDK for Go</a>
* </p>
* </li>
* <li>
* <p>
* <a href="https://docs.aws.amazon.com/sdk-for-java">AWS SDK for Java</a>
* </p>
* </li>
* <li>
* <p>
* <a href="https://docs.aws.amazon.com/sdk-for-javascript">AWS SDK for
* JavaScript</a>
* </p>
* </li>
* <li>
* <p>
* <a href="https://docs.aws.amazon.com/sdk-for-net">AWS SDK for .NET</a>
* </p>
* </li>
* <li>
* <p>
* <a href="https://docs.aws.amazon.com/pythonsdk">AWS SDK for Python
* (Boto3)</a>
* </p>
* </li>
* <li>
* <p>
* <a href="https://docs.aws.amazon.com/sdk-for-ruby">AWS SDK for Ruby</a>
* </p>
* </li>
* </ul>
* <p>The following resources provide additional information about using the Amazon Q
* API:</p>
* <ul>
* <li>
* <p>
* <i>
* <a href="https://docs.aws.amazon.com/amazonq/latest/business-use-dg/setting-up.html">Setting up for
* Amazon Q</a>
* </i>
* </p>
* </li>
* <li>
* <p>
* <i>
* <a href="https://awscli.amazonaws.com/v2/documentation/api/latest/reference/qbusiness/index.html">Amazon Q CLI Reference</a>
* </i>
* </p>
* </li>
* <li>
* <p>
* <i>
* <a href="https://docs.aws.amazon.com/general/latest/gr/amazonq.html">Amazon Web Services General Reference</a>
* </i>
* </p>
* </li>
* </ul>
*/
export class QBusiness extends QBusinessClient implements QBusiness {}
createAggregatedClient(commands, QBusiness);
85 changes: 83 additions & 2 deletions clients/client-qbusiness/src/QBusinessClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -445,8 +445,89 @@ export interface QBusinessClientResolvedConfig extends QBusinessClientResolvedCo

/**
* @public
* <p>
* </p>
* <note>
* <p>Amazon Q is in preview release and is subject to change.</p>
* </note>
* <p>This is the <i>Amazon Q (for business use)</i> 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 <a href="https://docs.aws.amazon.com/amazonq/latest/business-use-dg/what-is.html">
* <i>Amazon Q (for business use) Developer
* Guide</i>
* </a>.</p>
* <p>For an overview of the Amazon Q APIs, see <a href="https://docs.aws.amazon.com/amazonq/latest/business-use-dg/api-ref.html#api-overview">Overview of Amazon Q API operations</a>.</p>
* <p>For information about the IAM access control permissions you need to
* use this API, see <a href="https://docs.aws.amazon.com/amazonq/latest/business-use-dg/iam-roles.html">IAM roles for Amazon Q</a> in the
* <i>Amazon Q (for business use) Developer Guide</i>.</p>
* <p>You can use the following AWS SDKs to access Amazon Q APIs:</p>
* <ul>
* <li>
* <p>
* <a href="https://docs.aws.amazon.com/sdk-for-cpp">AWS SDK for C++</a>
* </p>
* </li>
* <li>
* <p>
* <a href="https://docs.aws.amazon.com/sdk-for-go">AWS SDK for Go</a>
* </p>
* </li>
* <li>
* <p>
* <a href="https://docs.aws.amazon.com/sdk-for-java">AWS SDK for Java</a>
* </p>
* </li>
* <li>
* <p>
* <a href="https://docs.aws.amazon.com/sdk-for-javascript">AWS SDK for
* JavaScript</a>
* </p>
* </li>
* <li>
* <p>
* <a href="https://docs.aws.amazon.com/sdk-for-net">AWS SDK for .NET</a>
* </p>
* </li>
* <li>
* <p>
* <a href="https://docs.aws.amazon.com/pythonsdk">AWS SDK for Python
* (Boto3)</a>
* </p>
* </li>
* <li>
* <p>
* <a href="https://docs.aws.amazon.com/sdk-for-ruby">AWS SDK for Ruby</a>
* </p>
* </li>
* </ul>
* <p>The following resources provide additional information about using the Amazon Q
* API:</p>
* <ul>
* <li>
* <p>
* <i>
* <a href="https://docs.aws.amazon.com/amazonq/latest/business-use-dg/setting-up.html">Setting up for
* Amazon Q</a>
* </i>
* </p>
* </li>
* <li>
* <p>
* <i>
* <a href="https://awscli.amazonaws.com/v2/documentation/api/latest/reference/qbusiness/index.html">Amazon Q CLI Reference</a>
* </i>
* </p>
* </li>
* <li>
* <p>
* <i>
* <a href="https://docs.aws.amazon.com/general/latest/gr/amazonq.html">Amazon Web Services General Reference</a>
* </i>
* </p>
* </li>
* </ul>
*/
export class QBusinessClient extends __Client<
__HttpHandlerOptions,
Expand Down
4 changes: 2 additions & 2 deletions clients/client-qbusiness/src/commands/CreateIndexCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ export interface CreateIndexCommandOutput extends CreateIndexResponse, __Metadat
* <p>To determine if index creation has completed, check the <code>Status</code> field
* returned from a call to <code>DescribeIndex</code>. The <code>Status</code> field is set
* to <code>ACTIVE</code> when the index is ready to use.</p>
* <p>Once the index is active, you can index your documents using the <a href="https://docs.aws.amazon.com/enterpriseq/latest/APIReference/API_BatchPutDocument.html">
* <p>Once the index is active, you can index your documents using the <a href="https://docs.aws.amazon.com/amazonq/latest/api-reference/API_BatchPutDocument.html">
* <code>BatchPutDocument</code>
* </a> API or the <a href="https://docs.aws.amazon.com/enterpriseq/latest/APIReference/API_CreateDataSource.html">
* </a> API or the <a href="https://docs.aws.amazon.com/amazonq/latest/api-reference/API_CreateDataSource.html">
* <code>CreateDataSource</code>
* </a> API.</p>
* @example
Expand Down
21 changes: 21 additions & 0 deletions clients/client-qbusiness/src/commands/CreateRetrieverCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,27 @@ export interface CreateRetrieverCommandOutput extends CreateRetrieverResponse, _
* configuration: { // RetrieverConfiguration Union: only one key present
* nativeIndexConfiguration: { // NativeIndexConfiguration
* indexId: "STRING_VALUE", // required
* boostingOverride: { // DocumentAttributeBoostingOverrideMap
* "<keys>": { // DocumentAttributeBoostingConfiguration Union: only one key present
* numberConfiguration: { // NumberAttributeBoostingConfiguration
* boostingLevel: "NONE" || "LOW" || "MEDIUM" || "HIGH" || "VERY_HIGH", // required
* boostingType: "PRIORITIZE_LARGER_VALUES" || "PRIORITIZE_SMALLER_VALUES",
* },
* stringConfiguration: { // StringAttributeBoostingConfiguration
* boostingLevel: "NONE" || "LOW" || "MEDIUM" || "HIGH" || "VERY_HIGH", // required
* attributeValueBoosting: { // StringAttributeValueBoosting
* "<keys>": "LOW" || "MEDIUM" || "HIGH" || "VERY_HIGH",
* },
* },
* dateConfiguration: { // DateAttributeBoostingConfiguration
* boostingLevel: "NONE" || "LOW" || "MEDIUM" || "HIGH" || "VERY_HIGH", // required
* boostingDurationInSeconds: Number("long"),
* },
* stringListConfiguration: { // StringListAttributeBoostingConfiguration
* boostingLevel: "NONE" || "LOW" || "MEDIUM" || "HIGH" || "VERY_HIGH", // required
* },
* },
* },
* },
* kendraIndexConfiguration: { // KendraIndexConfiguration
* indexId: "STRING_VALUE", // required
Expand Down
21 changes: 21 additions & 0 deletions clients/client-qbusiness/src/commands/GetRetrieverCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,27 @@ export interface GetRetrieverCommandOutput extends GetRetrieverResponse, __Metad
* // configuration: { // RetrieverConfiguration Union: only one key present
* // nativeIndexConfiguration: { // NativeIndexConfiguration
* // indexId: "STRING_VALUE", // required
* // boostingOverride: { // DocumentAttributeBoostingOverrideMap
* // "<keys>": { // DocumentAttributeBoostingConfiguration Union: only one key present
* // numberConfiguration: { // NumberAttributeBoostingConfiguration
* // boostingLevel: "NONE" || "LOW" || "MEDIUM" || "HIGH" || "VERY_HIGH", // required
* // boostingType: "PRIORITIZE_LARGER_VALUES" || "PRIORITIZE_SMALLER_VALUES",
* // },
* // stringConfiguration: { // StringAttributeBoostingConfiguration
* // boostingLevel: "NONE" || "LOW" || "MEDIUM" || "HIGH" || "VERY_HIGH", // required
* // attributeValueBoosting: { // StringAttributeValueBoosting
* // "<keys>": "LOW" || "MEDIUM" || "HIGH" || "VERY_HIGH",
* // },
* // },
* // dateConfiguration: { // DateAttributeBoostingConfiguration
* // boostingLevel: "NONE" || "LOW" || "MEDIUM" || "HIGH" || "VERY_HIGH", // required
* // boostingDurationInSeconds: Number("long"),
* // },
* // stringListConfiguration: { // StringListAttributeBoostingConfiguration
* // boostingLevel: "NONE" || "LOW" || "MEDIUM" || "HIGH" || "VERY_HIGH", // required
* // },
* // },
* // },
* // },
* // kendraIndexConfiguration: { // KendraIndexConfiguration
* // indexId: "STRING_VALUE", // required
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export interface PutFeedbackCommandOutput extends __MetadataBearer {}
* messageCopiedAt: new Date("TIMESTAMP"),
* messageUsefulness: { // MessageUsefulnessFeedback
* usefulness: "USEFUL" || "NOT_USEFUL", // required
* reason: "NOT_FACTUALLY_CORRECT" || "HARMFUL_OR_UNSAFE" || "INCORRECT_OR_MISSING_SOURCES" || "NOT_HELPFUL" || "FACTUALLY_CORRECT" || "COMPLETE" || "RELEVANT_SOURCES" || "HELPFUL",
* reason: "NOT_FACTUALLY_CORRECT" || "HARMFUL_OR_UNSAFE" || "INCORRECT_OR_MISSING_SOURCES" || "NOT_HELPFUL" || "FACTUALLY_CORRECT" || "COMPLETE" || "RELEVANT_SOURCES" || "HELPFUL" || "NOT_BASED_ON_DOCUMENTS" || "NOT_COMPLETE" || "NOT_CONCISE" || "OTHER",
* comment: "STRING_VALUE",
* submittedAt: new Date("TIMESTAMP"), // required
* },
Expand Down
21 changes: 21 additions & 0 deletions clients/client-qbusiness/src/commands/UpdateRetrieverCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,27 @@ export interface UpdateRetrieverCommandOutput extends UpdateRetrieverResponse, _
* configuration: { // RetrieverConfiguration Union: only one key present
* nativeIndexConfiguration: { // NativeIndexConfiguration
* indexId: "STRING_VALUE", // required
* boostingOverride: { // DocumentAttributeBoostingOverrideMap
* "<keys>": { // DocumentAttributeBoostingConfiguration Union: only one key present
* numberConfiguration: { // NumberAttributeBoostingConfiguration
* boostingLevel: "NONE" || "LOW" || "MEDIUM" || "HIGH" || "VERY_HIGH", // required
* boostingType: "PRIORITIZE_LARGER_VALUES" || "PRIORITIZE_SMALLER_VALUES",
* },
* stringConfiguration: { // StringAttributeBoostingConfiguration
* boostingLevel: "NONE" || "LOW" || "MEDIUM" || "HIGH" || "VERY_HIGH", // required
* attributeValueBoosting: { // StringAttributeValueBoosting
* "<keys>": "LOW" || "MEDIUM" || "HIGH" || "VERY_HIGH",
* },
* },
* dateConfiguration: { // DateAttributeBoostingConfiguration
* boostingLevel: "NONE" || "LOW" || "MEDIUM" || "HIGH" || "VERY_HIGH", // required
* boostingDurationInSeconds: Number("long"),
* },
* stringListConfiguration: { // StringListAttributeBoostingConfiguration
* boostingLevel: "NONE" || "LOW" || "MEDIUM" || "HIGH" || "VERY_HIGH", // required
* },
* },
* },
* },
* kendraIndexConfiguration: { // KendraIndexConfiguration
* indexId: "STRING_VALUE", // required
Expand Down
Loading

0 comments on commit 8fe8537

Please sign in to comment.