bedrock-claude-chat
bedrock-claude-chat copied to clipboard
[Feature Request] Frontend for Bedrock Knowledge Base
#428, #139
Frontend Implementation Policy
Implementation Location
- Frontend code should be implemented under
src/features/bot-kb.
Configuration Options
- In the cdk.json settings, the
useBedrockKnowledgeBaseForRag: booloption will be used to allow the use of either Knowledge Base (KB) or pgvector, but not both. - By default,
useBedrockKnowledgeBaseForRagis set to false.
UI Switching
- When
useBedrockKnowledgeBaseForRagis true, all knowledge-related UI elements in the bot creation screen will be replaced with those fromfeatures/bot-kb. - When
useBedrockKnowledgeBaseForRagis false, KB features will not be accessible from the frontend.
Future Direction for v2 Release
Changes in v2
- The default value for
useBedrockKnowledgeBaseForRagwill be changed to true, and the use of pgvector will be deprecated. - After the v2 release, deploying Postgres will be optional, and KB will be the default.
- If users wish to maintain Postgres, they will need to explicitly specify the option in
cdk.json.
Handling of Existing Bots
- After the v2 release, existing bots will be treated as read-only and cannot be updated or edited.
- The UI for creating new bots will only utilize KB.
Request example:
{
"id": "kb-test-bot",
"title": "kb-test-bot",
"instruction": "",
"description": "",
"embeddingParams": null, // Ignored on KB
"generationParams": null,
"searchParams": null, // Ignored on KB
"agent": {
"tools": [
]
},
"knowledge": {
"sourceUrls": [], // Ignored on KB
"sitemapUrls": [], // Ignored on KB
"filenames": [],
"s3Urls": ["s3://example-bucket/1/"] // Newly added. Need to end with slash
},
"displayRetrievedChunks": true, // // Ignored on KB
"conversationQuickStarters": [],
"bedrockKnowledgeBase": { // newly added
"embeddingsModel": "titan_v1",
"openSearch": {
"analyzer": {
"characterFilters": ["icu_normalizer"],
"tokenizer": "kuromoji_tokenizer",
"tokenFilters": [
"kuromoji_baseform",
"ja_stop"
]
}
},
"searchParams": {
"maxResults": 20,
"searchType": "hybrid"
},
"chunkingStrategy": "fixed_size",
"maxTokens": 500,
"overlapPercentage": 10,
}
}
Is there any way to migrate our data from the postgres to the KB once V2 releases, or will data automatically be migrated to the KB and knowledge linked to their respective bots? Or will bots have to be recreated with their 'new' knowledge?
@DTheunis
After the v2 release, existing bots will be treated as read-only and cannot be updated or edited. The UI for creating new bots will only utilize KB.