Skip to content

aws-samples/serverless-genai-examples

GenAI examples using serverless

This repository contains examples of genAI applications using AWS serverless services.

Contents

  1. About this repo
  2. Examples
  3. Learning Resources
  4. License

About this repo

This repo contains code examples of generative AI applications, workflows and patterns using serverless services such as AWS Step Functions, Lambda and EventBridge.

We welcome contributions to this repo - see CONTRIBUTING for more information.

Examples

  • Prompt chaining with human in the loop This example demonstrate the use of prompt chaining to decompose bulk and inefficient prompt in to smaller prompts and using purpose built models. Example also shows how to include a human feedback loop when you need to improve the safety and accuracy of the application.

  • Tool use or Function calling example This example uses Anthropic's Claude Haiku model to show how Tool use or Function calling can be achieved with Step Functions. Amazon Bedrock supports tool use with Bedrock's Converse API, however, this mechanism can also be used with basic inference operations like Bedrock's InvokeModel or InvokeWithResponseStreaming. Tool use is a step above using Agents where the LLM figures out a tool to use but delegates the responsibility to the user to make use of it. This drastically reduces latency, token size, and deterministic characteristic of LLM responses.

  • Book a private jet flight with Tool use This example uses Anthropic's Claude Sonnet 3 model to show how Tool use or Function calling can be achieved with Step Functions for booking a reservation of a private jet with minimal information available.

Learning resources

License

This library is licensed under the MIT-0 License. See the LICENSE file.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors