DEV Community

Michael Wahl for AWS Community Builders

Posted on

2

Amazon Bedrock + langchain, Retrieving Info from KBs leverage (RAG)

This is a short sample, but it demonstrates the power and capability of AWS Bedrock services using the foundational base model along with a Bedrock KB. This example can be extended even further using AWS Bedrock agents.

Below using a simple Python script, we build a client connection to the AWS Bedrock services, the output we retrieve back can be piped or routed to other upstream processes including AWS Bedrock agents or serverless lambda functions.

Hopefully, this helps get you started experimenting and thinking more about this. Often these short examples become Lego blocks, where you can continue building the bigger or better.

This is a short sample, but it demonstrates the power and capability of AWS Bedrock services using the foundational base model along with a Bedrock KB. This example can be extended even further using AWS Bedrock agents.

Below using a simple Python script, we build a client connection to the AWS Bedrock services, the output we retrieve back can be piped or routed to other upstream processes including AWS Bedrock agents or serverless lambda functions.

Hopefully, this helps get you started experimenting and thinking more about this. Often these short examples become Lego blocks, where you can continue building the bigger or better.
Enter fullscreen mode Exit fullscreen mode

Image of Datadog

The Essential Toolkit for Front-end Developers

Take a user-centric approach to front-end monitoring that evolves alongside increasingly complex frameworks and single-page applications.

Get The Kit

Top comments (0)

Best Practices for Running  Container WordPress on AWS (ECS, EFS, RDS, ELB) using CDK cover image

Best Practices for Running Container WordPress on AWS (ECS, EFS, RDS, ELB) using CDK

This post discusses the process of migrating a growing WordPress eShop business to AWS using AWS CDK for an easily scalable, high availability architecture. The detailed structure encompasses several pillars: Compute, Storage, Database, Cache, CDN, DNS, Security, and Backup.

Read full post