Skip to content

Commit

Permalink
edit AI docs with service names (#8101)
Browse files Browse the repository at this point in the history
  • Loading branch information
aspittel authored Nov 19, 2024
1 parent d57e3ee commit 98fd4b3
Show file tree
Hide file tree
Showing 3 changed files with 2,117 additions and 1,561 deletions.
2 changes: 1 addition & 1 deletion next-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information.
10 changes: 5 additions & 5 deletions src/pages/[platform]/ai/conversation/knowledge-base/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,18 @@ export function getStaticProps(context) {
};
}

[Bedrock knowledge bases](https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base.html) are a great way to implement Retrieval Augmented Generation, or RAG for short. RAG is a common pattern in building generative AI applications that involves storing a lot of content, like documentation, in a vector database like Postgres with pg_vector or OpenSearch.
[Amazon Bedrock knowledge bases](https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base.html) are a great way to implement Retrieval Augmented Generation, or RAG for short. RAG is a common pattern in building generative AI applications that involves storing a lot of content, like documentation, in a vector database like Postgres with pg_vector or OpenSearch.


<Callout warning>

The default setup for a Bedrock knowledge base is OpenSearch Serverless which has a default cost whether or not you use it. You can get a large AWS bill if you are not careful. If you are just testing this out make sure to turn off the OpenSearch Serverless instance when you are done.
The default setup for an Amazon Bedrock knowledge base is OpenSearch Serverless which has a default cost whether or not you use it. You can get a large AWS bill if you are not careful. If you are just testing this out make sure to turn off the OpenSearch Serverless instance when you are done.

</Callout>

## Create a knowledge base

To integrate Bedrock knowledge base with your conversation route, first [create a Bedrock knowledge base](https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base-create.html) in the console, CLI, or with CDK.
To integrate Bedrock knowledge base with your conversation route, first [create an Amazon Bedrock knowledge base](https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base-create.html) in the console, CLI, or with CDK.

## Create a custom query and tool

Expand Down Expand Up @@ -77,9 +77,9 @@ const schema = a.schema({
})
```

## Write an AppSync resolver
## Write an AWS AppSync resolver

Then you'll need to create a JavaScript AppSync resolver to connect the query to the knowledge base. You'll need to know the ID of the knowledge base you want to use, which you can find in the Bedrock console or with the AWS CLI.
Then you'll need to create a JavaScript AWS AppSync resolver to connect the query to the knowledge base. You'll need to know the ID of the knowledge base you want to use, which you can find in the Amazon Bedrock console or with the AWS CLI.

```javascript title="amplify/data/resolvers/kbResolver.js"
export function request(ctx) {
Expand Down
Loading

0 comments on commit 98fd4b3

Please sign in to comment.