SlideShare a Scribd company logo
1 of 22
xebia.com
Amazon Bedrock in Action
Krzysztof Kąkol
Chief of Data Engineering @ Xebia Poland
xebia.com
Krzysztof Kąkol
Chief of Data Engineering and
Solutions Architect in Xebia Poland
AWS Community Builder & AWS Ambassador
https://www.linkedin.com/in/krzysztofkakol/
Other stuff:
Classical and jazz pianist
PhD in AI-driven sound processing
xebia.com
Access a range of leading FMs
through a single API
Extend the power of LLMs
with your data using retrieval
augmented generation (RAG)
Privately customize FMs with
your own data
Amazon Bedrock
Build agents that execute
complex business tasks by
dynamically invoking APIs
Get the best price
performance without
managing infrastructure
Enable data security and
compliance
xebia.com
Layer 1
Content generation
xebia.com
Content generation
xebia.com
Content generation
boto3_bedrock = boto3.client('bedrock-runtime')
response = boto3_bedrock.invoke_model(
body = '{"inputText": "Create short email from John Smith to SuperHotels requesting for special offers of hotels in San Francisco."}',
modelId = 'amazon.titan-tg1-large'
)
response_body = json.loads(response.get('body').read())
print(response_body.get('results')[0].get('outputText'))
Dear SuperHotels,
I hope this email finds you well. I am reaching out to inquire about any special offers or discounts available at your hotels in
San Francisco. As a frequent traveler, I value quality accommodations and great value. I would be delighted to learn about
any current promotions or packages that you have to offer.
Thank you for your attention to this matter.
I look forward to hearing back from you soon.
Best regards,
John Smith
xebia.com
Layer 2
Custom knowledge
xebia.com
Retrieval Augmented Generation
xebia.com
Retrieval Augmented Generation
CONTEXT
xebia.com
Retrieval Augmented Generation
xebia.com
Demo
Knowledge Base
(RAG) in Bedrock
xebia.com
Retrieval Augmented Generation
xebia.com
Retrieval Augmented Generation
client = boto3.client('bedrock-agent-runtime’)
response = client.retrieve_and_generate(
input={
'text’:”Who is Andy Dufresne?”,
},
retrieveAndGenerateConfiguration={
'type': 'KNOWLEDGE_BASE',
'knowledgeBaseConfiguration': {
'knowledgeBaseId': ’ABC12345',
'modelArn': 'arn:aws:bedrock:us-east-1::foundation-model/anthropic.claude-v2'
}
},
)
"output": { "text": ”...”},
"citations": [{
"generatedResponsePart": {
"textResponsePart": { "text": ”...", "span": { "start": 0, "end": 198 } }
},
"retrievedReferences": [ {
"content": { "text": ”..." },
"location": {
"type": "S3",
"s3Location": { "uri": "s3://test-bedrock-kb-texts/shawshank_redemption.pdf"
}
}
...
xebia.com
Layer 3
Automation (agents)
xebia.com
Agents
xebia.com
Demo
Agents in
Bedrock
xebia.com
Travel Agency agent
xebia.com
Agents
client = boto3.client('bedrock-agent-runtime’)
response = client.invoke_agent(
agentAliasId='AJJCWRSIB2',
agentId='3LZHTSX13Q',
inputText='Can you show the offers list?',
sessionId='abc123’
)
completion = ""
for event in response.get("completion"):
chunk = event["chunk"]
completion = completion + chunk["bytes"].decode()
Here are the available destinations/offers:
- Egypt, Hurghada
- Italy, Venice
- Mexico, Cancun
xebia.com
• Amazon Bedrock gives access to plenty of different foundation models
• You can easily orchestrate potentially difficult tasks (like RAGs or agents), all the heavy lifting is done
by Bedrock
• Bedrock enables high-level API which simplifies implementing even sophisticated LLM-related scenarios
Summary
xebia.com
Questions?
https://www.linkedin.com/in/krzysztofkakol/
Rate this session
xebia.com
Thank you!
kkakol@xebia.com

More Related Content

Similar to Amazon Bedrock in Action - presentation of the Bedrock's capabilities

San Francisco Java User Group
San Francisco Java User GroupSan Francisco Java User Group
San Francisco Java User Group
kchodorow
 
There's more than web
There's more than webThere's more than web
There's more than web
Matt Evans
 
Arkadiy Pilguk - Real-world application of computer vision and machine
Arkadiy Pilguk - Real-world application of computer vision and machineArkadiy Pilguk - Real-world application of computer vision and machine
Arkadiy Pilguk - Real-world application of computer vision and machine
OdessaJS Conf
 

Similar to Amazon Bedrock in Action - presentation of the Bedrock's capabilities (20)

Redis Streams plus Spark Structured Streaming
Redis Streams plus Spark Structured StreamingRedis Streams plus Spark Structured Streaming
Redis Streams plus Spark Structured Streaming
 
Getting Started with MongoDB and NodeJS
Getting Started with MongoDB and NodeJSGetting Started with MongoDB and NodeJS
Getting Started with MongoDB and NodeJS
 
Vert.x using Groovy - Simplifying non-blocking code
Vert.x using Groovy - Simplifying non-blocking codeVert.x using Groovy - Simplifying non-blocking code
Vert.x using Groovy - Simplifying non-blocking code
 
Building Social Enterprise with Ruby and Salesforce
Building Social Enterprise with Ruby and SalesforceBuilding Social Enterprise with Ruby and Salesforce
Building Social Enterprise with Ruby and Salesforce
 
오픈소스 게임 서버 엔진 스터디 캠프 - CloudBread
오픈소스 게임 서버 엔진 스터디 캠프 - CloudBread오픈소스 게임 서버 엔진 스터디 캠프 - CloudBread
오픈소스 게임 서버 엔진 스터디 캠프 - CloudBread
 
AWS EC2
AWS EC2AWS EC2
AWS EC2
 
Ubiquitous Encryption on AWS - Level 300
Ubiquitous Encryption on AWS - Level 300Ubiquitous Encryption on AWS - Level 300
Ubiquitous Encryption on AWS - Level 300
 
Integrating Ansible Tower with security orchestration and cloud management
Integrating Ansible Tower with security orchestration and cloud managementIntegrating Ansible Tower with security orchestration and cloud management
Integrating Ansible Tower with security orchestration and cloud management
 
BDA 301 An Introduction to Amazon Rekognition, for Deep Learning-based Comput...
BDA 301 An Introduction to Amazon Rekognition, for Deep Learning-based Comput...BDA 301 An Introduction to Amazon Rekognition, for Deep Learning-based Comput...
BDA 301 An Introduction to Amazon Rekognition, for Deep Learning-based Comput...
 
Ruby on Rails: The good parts - Boris Dinkevich, 500Tech
Ruby on Rails: The good parts - Boris Dinkevich, 500TechRuby on Rails: The good parts - Boris Dinkevich, 500Tech
Ruby on Rails: The good parts - Boris Dinkevich, 500Tech
 
San Francisco Java User Group
San Francisco Java User GroupSan Francisco Java User Group
San Francisco Java User Group
 
Carlos Conde : AWS Game Days - TIAD Paris
Carlos Conde : AWS Game Days - TIAD ParisCarlos Conde : AWS Game Days - TIAD Paris
Carlos Conde : AWS Game Days - TIAD Paris
 
What Is Happening At The Edge
What Is Happening At The EdgeWhat Is Happening At The Edge
What Is Happening At The Edge
 
Deep learning-based image recognition: Intro to Amazon Rekognition:
Deep learning-based image recognition: Intro to Amazon Rekognition: Deep learning-based image recognition: Intro to Amazon Rekognition:
Deep learning-based image recognition: Intro to Amazon Rekognition:
 
There's more than web
There's more than webThere's more than web
There's more than web
 
Arkadiy Pilguk - Real-world application of computer vision and machine
Arkadiy Pilguk - Real-world application of computer vision and machineArkadiy Pilguk - Real-world application of computer vision and machine
Arkadiy Pilguk - Real-world application of computer vision and machine
 
Auto scaling with Ruby, AWS, Jenkins and Redis
Auto scaling with Ruby, AWS, Jenkins and RedisAuto scaling with Ruby, AWS, Jenkins and Redis
Auto scaling with Ruby, AWS, Jenkins and Redis
 
Kube-AWS
Kube-AWSKube-AWS
Kube-AWS
 
MongoDB Stitch Introduction
MongoDB Stitch IntroductionMongoDB Stitch Introduction
MongoDB Stitch Introduction
 
Super-NetOps Source of Truth
Super-NetOps Source of TruthSuper-NetOps Source of Truth
Super-NetOps Source of Truth
 

Recently uploaded

Recently uploaded (20)

Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
WSO2Con2024 - Navigating the Digital Landscape: Transforming Healthcare with ...
WSO2Con2024 - Navigating the Digital Landscape: Transforming Healthcare with ...WSO2Con2024 - Navigating the Digital Landscape: Transforming Healthcare with ...
WSO2Con2024 - Navigating the Digital Landscape: Transforming Healthcare with ...
 
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdf
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdfAzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdf
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdf
 
WSO2CON 2024 - Lessons from the Field: Legacy Platforms – It's Time to Let Go...
WSO2CON 2024 - Lessons from the Field: Legacy Platforms – It's Time to Let Go...WSO2CON 2024 - Lessons from the Field: Legacy Platforms – It's Time to Let Go...
WSO2CON 2024 - Lessons from the Field: Legacy Platforms – It's Time to Let Go...
 
WSO2CON 2024 - Software Engineering for Digital Businesses
WSO2CON 2024 - Software Engineering for Digital BusinessesWSO2CON 2024 - Software Engineering for Digital Businesses
WSO2CON 2024 - Software Engineering for Digital Businesses
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
WSO2CON 2024 - Unlocking the Identity: Embracing CIAM 2.0 for a Competitive A...
WSO2CON 2024 - Unlocking the Identity: Embracing CIAM 2.0 for a Competitive A...WSO2CON 2024 - Unlocking the Identity: Embracing CIAM 2.0 for a Competitive A...
WSO2CON 2024 - Unlocking the Identity: Embracing CIAM 2.0 for a Competitive A...
 
Evolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI EraEvolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI Era
 
WSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - Keynote
 
WSO2Con2024 - Organization Management: The Revolution in B2B CIAM
WSO2Con2024 - Organization Management: The Revolution in B2B CIAMWSO2Con2024 - Organization Management: The Revolution in B2B CIAM
WSO2Con2024 - Organization Management: The Revolution in B2B CIAM
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
 
WSO2CON 2024 - Not Just Microservices: Rightsize Your Services!
WSO2CON 2024 - Not Just Microservices: Rightsize Your Services!WSO2CON 2024 - Not Just Microservices: Rightsize Your Services!
WSO2CON 2024 - Not Just Microservices: Rightsize Your Services!
 
WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...
WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...
WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...
 
WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...
WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...
WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...
 
WSO2Con2024 - Software Delivery in Hybrid Environments
WSO2Con2024 - Software Delivery in Hybrid EnvironmentsWSO2Con2024 - Software Delivery in Hybrid Environments
WSO2Con2024 - Software Delivery in Hybrid Environments
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 

Amazon Bedrock in Action - presentation of the Bedrock's capabilities