New serverless pattern - bedrock-semantic-cache-s3vectors-sam - #3262
Open
manishh-13 wants to merge 4 commits into
Open
New serverless pattern - bedrock-semantic-cache-s3vectors-sam#3262manishh-13 wants to merge 4 commits into
manishh-13 wants to merge 4 commits into
Conversation
Serverless semantic cache for Amazon Bedrock using AWS Lambda and Amazon S3 Vectors. Returns a cached answer when an incoming prompt is semantically similar to a prior one (cosine similarity threshold), with freshness TTL, one-call epoch force-invalidation via SSM Parameter Store, and a negation-parity guard. Cache persists in S3 Vectors (scales to zero); Lambda is stateless. SAM template, Python.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
New serverless pattern: bedrock-semantic-cache-s3vectors-sam
Serverless semantic cache for Amazon Bedrock using AWS Lambda and Amazon S3 Vectors.
An AWS Lambda function sits in front of Amazon Bedrock and returns a cached answer whenever an incoming prompt is semantically similar to one already answered, skipping the LLM call on repeats and near-repeats.
How it works
Correctness features
Notes
Includes README.md, template.yaml (AWS SAM), example-pattern.json, and src/ (Python). Language: Python. Level: 300. Framework: AWS SAM.
Pattern-submission issue: #3263