LLM Chatbot Playground
This blueprint generates a sample chatbot using the Anthropic company's LLM Claude 2, one of the foundational models provided by Amazon Bedrock for generative AI.
Basic Conversation
![](https://d107sfil7rheid.cloudfront.net/demo.gif)
Bot Personalization
Add your own instruction and give external knowledge as URL or files (a.k.a RAG). The bot can be shared among application users.
![](https://d107sfil7rheid.cloudfront.net/bot_chat.png)
📚 Supported Languages
- English 💬
- 日本語 💬 (ドキュメントはこちら)
- 한국어 💬
- 中文 💬
🚀 Super-easy Deployment
- On us-east-1, open Bedrock Model access >
Manage model access
> Check Anthropic / Claude
, Anthropic / Claude Instant
and Cohere / Embed Multilingual
then Save changes
.
Screenshot
![](https://d107sfil7rheid.cloudfront.net/model_screenshot.png)
Architecture
It's an architecture built on AWS managed services, eliminating the need for infrastructure management. Utilizing Amazon Bedrock, there's no need to communicate with APIs outside of AWS. This enables deploying scalable, reliable, and secure applications.
![](https://d107sfil7rheid.cloudfront.net/arch.png)
Connections and permissions
This blueprint supports the Amazon CodeCatalyst Development Role, which can be created from the AWS console Codecatalyst management application. When clicking "add IAM role", the first option is to create a CodeCatalyst development role. This role can be used across multiple blueprints.
The other option is creating a blueprint specific IAM role, which can be added to the Amazon CodeCatalyst space by selecting "Add an existing IAM role" from the add IAM role options. The IAM role needs to contain the CodeCatalyst trust policy, as well as the following permissions:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"iam:DeleteRole",
"iam:GetRole",
"iam:TagRole",
"iam:CreateRole",
"iam:AttachRolePolicy",
"iam:DetachRolePolicy",
"iam:DeleteRolePolicy",
"cloudformation:*",
"lambda:*",
"apigateway:*",
"ecr:*",
"ssm:PutParameter",
"ssm:DeleteParameter",
"iam:PutRolePolicy",
"s3:*",
"ssm:GetParameter",
"ssm:GetParameters"
],
"Resource": "*"
},
{
"Effect": "Allow",
"Action": [
"sts:AssumeRole"
],
"Resource": [
"arn:aws:iam::*:role/cdk-*"
]
}
]
}
The IAM roles also require the Amazon CodeCatalyst service principals codecatalyst.amazonaws.com
and codecatalyst-runner.amazonaws.com
.
Required IAM role trust policy:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "",
"Effect": "Allow",
"Principal": {
"Service": [
"codecatalyst.amazonaws.com",
"codecatalyst-runner.amazonaws.com"
]
},
"Action": "sts:AssumeRole"
}
]
}
Features and Roadmap
Basic chat features
Customized bot features
RAG features
Admin features
RAG (Retrieval Augmented Generation)
See here.
Authors
License
This library is licensed under the MIT-0 License. See the LICENSE file.
When you create or update a project using a blueprint, CodeCatalyst may generate resources such as source repository, sample source code, CI/CD workflows, build and test reports, secrets, integrated issue tracking tools, etc. You should review the generated artifacts/project before deploying to a production or publicly accessible environment. You are responsible for all activities in your production and publicly accessible environments.