🤖 Amazon Bedrock is a fully managed service that makes leading foundation models (FMs) from Amazon and third-party providers accessible via an API. It enables developers to:
✨ Key Features:
🎯 Key capabilities include:
🚀 Foundation models available through Bedrock include:
🔧 Enterprise features:
Retrieval-Augmented Generation (RAG) is the process of optimizing the output of a large language model, so it references an authoritative knowledge base outside of its training data sources before generating a response. In this workshop we will use this technical to create an customer service agent based on our faqs document.
Improved Accuracy: RAG helps reduce hallucinations by grounding responses in verified knowledge sources
Up-to-date Information: Allows models to access current information beyond their training cutoff date
Domain Expertise: Can incorporate specialized knowledge bases and documentation for domain-specific responses
Cost Efficiency: More efficient than fine-tuning models since only the knowledge base needs to be updated
Data Privacy: Keeps sensitive data in controlled knowledge bases rather than embedding it in model weights
Verifiable Sources: Responses can be traced back to source documents for validation
Customization: Easy to customize model outputs by modifying the knowledge base
Reduced Training: No need to retrain or fine-tune models when information changes
Scalability: Knowledge bases can be updated independently of the model
Compliance: Better control over information sources for regulatory compliance
Prompt engineering is the art of designing and refining prompts to elicit the desired response from an AI model. A prompt template will be:
Role: {specify the role/persona}
Context: {provide relevant background}
Task: {clear instruction of what to do}
Format: {specify output format}
Constraints: {list any limitations}
Examples: {provide sample input/output}
Example:
Role: Act as a technical documentation writer specializing in cloud computing
Context: Writing AWS service documentation for a beginner audience
Task: Create a step-by-step guide explaining how to launch an EC2 instance
Format: Numbered steps with bullet points for sub-steps, include relevant AWS console screenshots
Constraints:
- Keep language simple and beginner-friendly
- Maximum 10 main steps
- Include security best practices
- Focus only on Linux instances
Examples:
Input: Need instructions for launching EC2
Output:
1. Sign in to AWS Console
• Navigate to console.aws.amazon.com
• Enter your credentials
2. Open EC2 Dashboard
• Click "Services" dropdown
• Select "EC2" under Compute
[etc...]
For more complex, you can add an history chat with an user to the prompt, but this required more token. In this workshop, for simple i just create an simple prompt to do something and then response via email.
6.1. Request models
6.2. Create Knowledge base
6.3. Create Agent Alias