Prerequisites
Bot creation requires membership in the
CreatingBotAllowed Cognito user group. Administrators can add users to this group via the AWS Console or CLI.- Navigate to Amazon Cognito in the AWS Console
- Select your user pool (find the ID in CloudFormation outputs:
AuthUserPoolIdxxxx) - Add users to the
CreatingBotAllowedgroup
Creating a Bot
Basic Information
Every bot requires:- Title: A clear, descriptive name
- Description: What the bot does (shown in bot store)
- Instruction: System prompt that defines bot behavior and personality
Instruction Best Practices
Instruction Best Practices
- Be specific about the bot’s role and expertise
- Define the tone and style of responses
- Include any constraints or guidelines
- Specify output format if needed
- Keep instructions concise but comprehensive
Generation Parameters
Customize how the bot generates responses:Conservative
Low temperature (0.1-0.3) for factual, consistent responses. Good for support bots.
Balanced
Medium temperature (0.5-0.7) for general-purpose bots with some creativity.
Creative
High temperature (0.8-1.0) for brainstorming and creative content generation.
Extended Thinking
Higher budget_tokens (10K-64K) for complex reasoning tasks with Claude 3.7.
Knowledge Integration
Enhance your bot with domain-specific knowledge using RAG (Retrieval-Augmented Generation). See the Knowledge Bases page for detailed information.Agent Capabilities
Enable your bot to use tools and perform actions. See the Agents page for details on:- Internet search
- Knowledge base queries
- Calculator functions
- Custom tool development
Model Selection
Control which models users can choose when using your bot:By default, all globally available models are enabled. Use this setting to restrict models for cost control or specific requirements.
Conversation Quick Starters
Provide example prompts to help users get started:Visibility and Sharing
Control who can access your bot:Private (Default)
- Only you can access the bot
- Not visible in bot store
- Ideal for personal assistants
Partial Sharing
- Share with specific users or groups
- Requires Cognito user IDs or group names
- Good for team or department bots
Public
- Available to all users in bot store
- Can be pinned by administrators
- Required for API publishing
Only bots with
shared_scope = "all" can be published as APIs.Guardrails
Apply content filters and safety controls using Amazon Bedrock Guardrails:- Content Filters: Block harmful content categories
- Denied Topics: Prevent discussion of specific subjects
- Word Filters: Block or redact specific words/phrases
- Sensitive Information: Detect and redact PII
- Contextual Grounding: Reduce hallucinations for RAG bots
Prompt Caching
Reduce costs and latency for bots with large system prompts or knowledge:- Automatically caches processed instruction prompts
- Significant savings for frequently used bots
- Enabled by default (can be disabled)
How Prompt Caching Works
How Prompt Caching Works
When prompt caching is enabled:
- The bot’s instruction and knowledge context are sent to Bedrock
- Bedrock caches the processed prompt for ~5 minutes
- Subsequent requests reuse the cached prompt
- You pay reduced rates for cached tokens
Sync Status
Bots with knowledge bases or guardrails require synchronization:- QUEUED: Waiting to process knowledge or guardrails
- RUNNING: Currently processing
- SUCCEEDED: Ready to use
- FAILED: Error occurred (check status reason)
The bot is fully functional only when sync status is SUCCEEDED.
Bot Updates
Modify bot settings at any time:Updating knowledge sources triggers a new sync. The bot remains usable with old knowledge until sync completes.
Usage Analytics
Track bot usage and performance:- Usage count per bot
- Last used timestamp
- User analytics (admin only)
- Total conversations per bot
- Token usage and costs
- Popular bots and trends
Example Bot Configurations
Customer Support Bot
Customer Support Bot
Creative Writing Assistant
Creative Writing Assistant
Data Analysis Bot
Data Analysis Bot
Best Practices
Clear Instructions
Write clear, specific instructions. Include examples of desired behavior and format.
Test Thoroughly
Test your bot with various inputs before sharing. Iterate on instructions based on results.
Organize Knowledge
Structure knowledge documents clearly. Use descriptive filenames and organize by topic.
Monitor Usage
Review usage analytics to understand how users interact with your bot and optimize accordingly.
Next Steps
Add Knowledge
Enhance your bot with RAG and custom documents
Enable Agents
Give your bot tools to perform actions
Share in Store
Make your bot available to other users
Publish API
Create a standalone API endpoint