Serverless Rag Demo
Widespread AI adoption is being driven by generative AI models that can generate human-like content. However, these foundation models are trained on general data making it less effective for domain specific tasks. There lies the importance of Retrieval Augmented Generation (RAG). RAG allows augmenting prompts with relevant external data for better domain-specific outputs. With RAG, documents and queries are converted to embeddings, compared to find relevant context, and that context is append...
| Entity Passport | |
| Registry ID | gh-model--aws-samples--serverless-rag-demo |
| Provider | github |
Cite this model
Academic & Research Attribution
@misc{gh_model__aws_samples__serverless_rag_demo,
author = {Aws Samples},
title = {Serverless Rag Demo Model},
year = {2026},
howpublished = {\url{https://github.com/aws-samples/serverless-rag-demo}},
note = {Accessed via Free2AITools Knowledge Fortress}
} π¬Technical Deep Dive
Full Specifications [+]βΎ
Quick Commands
git clone https://github.com/aws-samples/serverless-rag-demo βοΈ Nexus Index V16.5
π¬ Index Insight
The Free2AITools Nexus Index for Serverless Rag Demo aggregates Popularity (P:0), Freshness (F:0), and Completeness (C:0). The Utility score (U:0) represents deployment readiness and ecosystem adoption.
Verification Authority
π What's Next?
Technical Deep Dive
Scalable RAG solutions/Agentic Workflows with Amazon Bedrock and Amazon Opensearch serverless service
Overview
Widespread AI adoption is being driven by generative AI models that can generate human-like content. However, these foundation models are trained on general data making it less effective for domain specific tasks. There lies the importance of Retrieval Augmented Generation (RAG). RAG allows augmenting prompts with relevant external data for better domain-specific outputs. With RAG, documents and queries are converted to embeddings, compared to find relevant context, and that context is appended to the original prompt before being passed to the LLM. Knowledge libraries can be updated asynchronously to provide the most relevant external data for augmenting prompts.
Amazon Opensearch Serverless(AOSS) offers vector engine to store embeddings for faster similarity searches. The vector engine provides a simple, scalable, and high-performing similarity search capability in Amazon OpenSearch Serverless that makes it easy for you to build generative artificial intelligence (AI) applications without having to manage the underlying vector database infrastructure.
[!NOTE] This repository offers a production ready easily deployable Generative AI solution with the below features:
- Document chat
- Multi-Agent collaboration with Strands sdk
- Sentiment Analysis
- PII Redaction
- OCR
[!IMPORTANT] The Older UI is maintained in the v0.0.1(Old-UI) branch.
Demos
Doc Chat/Doc Management (Multi-lingual)
Multi-Agent Demo
PII Redaction
OCR
Sentiment Analysis
Latest project updates
* 10-Jun-2025 Claude 4 support. Ensure you have RPM/TPM quotas to try out Claude-4 * 28-May-2025 Multi-Agent Orchestration now through Strands SDK * 08-Nov-2024 Supports Claude-3.5 Haiku for RAG/OCR/PII Identification/Sentiment Analysis * 29-Oct-2024 Supports Claude-3.5 Sonnet V2/Opus for RAG/OCR/PII Identification/Sentiment Analysis * 1-Sept-204 Document Aware chunking strategy, to answer questions comparing several documents. For example: What did I say in Doc 1 that I contradict in Doc 7 ?Prerequisites
Prerequisites
- An AWS account
- You should have access to Anthropic Claude-3 Haiku/Sonnet models on Amazon Bedrock
- For RAG, you should have access to Cohere English Embed model on Amazon Bedrock
- Amazon Bedrock supported regions
- Amazon Opensearch serverless(AOSS) supported regions
Familiarity with below Services
Architecture
Deploying the Solution to your AWS account with AWS Cloudshell
Section 1: Create an Admin User to deploy this stack
Section 1 - Create an IAM user with Administrator permissions (OPTIONAL: If you're already an Admin role, you may skip this step)
Search for the service IAM on the AWS Console and go the IAM Dashboard and click on βRolesβ tab under βAccess Managementβ and Click on βCreate Roleβ
Select AWS Account and click βNextβ
Under permissions select Administrator access
Give the role a name and create the role
You can now assume this role and proceed to deploy the stack. Click on Switch-Role
Switch role
Proceed to Section 2
Section 2 - Deploy the RAG based Solution (Total deployment time 40 minutes)
Section 2 - Deploy this RAG based Solution (The below commands should be executed in the region of deployment)
Switch to Admin role. Search for Cloudshell service on the AWS Console and follow the steps below to clone the github repository
Git Clone the serverless-rag-demo repository from aws-samples
textgit clone https://github.com/aws-samples/serverless-rag-demo.gitGo to the directory where we have the downloaded files.
textcd serverless-rag-demoFire the bash script that creates the RAG based solution. Pass the environment and region for deployment. environment can be dev,qa,sandbox. Look at Prerequisites to deploy to the correct region.
textsh creator.shPress Enter to proceed with deployment of the stack or ctrl+c to exit

The UI is hosted on AppRunner the link to AppRunner could be found in CloudShell once the script execution is complete, or you could also go to the AppRunner service on the AWS Console and obtain the https url. The UI is authenticated through Amazon Cognito hence the very first time you would have to sign-up and then sign-in to login to the application

On Amazon Bedrock page enable access to the below models
(ADVANCED) Using an existing Bedrock Knowledge base
[!IMPORTANT] You could query your existing Knowledge base created on Amazon Bedrock provided it uses Amazon Opensearch Serverless service.
Steps
Get the Collection ARN and the embedding model used by your Knowledge base on Bedrock

Head to Amazon Opensearch Serverless and search by ARN to fetch Opensearch Endpoint

Modify the configurations of your
bedrock_rag_query_*lambda function. Set the below a. IS_BEDROCK_KB = yes
b. OPENSEARCH_VECTOR_ENDPOINT = <> c. EMBED_MODEL_ID = < >. Find the base model Id from here (https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html) d. VECTOR_INDEX_NAME = < > e. BEDROCK_KB_EMBEDDING_KEY = < >

Get the ARN of the Lambda role

Head to Amazon Opensearch on the AWS Console and click on Data Access Policies. Search for the Data Access Policy attached to your Bedrock KB and click on the
Editbutton
In the principal section add the ARN of your Lambda role and hit save

Now try Document Chat on the UI, it should query from your Amazon Bedrock Knowledge base.
[!IMPORTANT] We do not support indexing to an existing Knowledge base. That can be done through the Amazon Bedrock Console.
π Quick Start
git clone https://github.com/aws-samples/serverless-rag-demo.git
π Limitations & Considerations
- β’ Benchmark scores may vary based on evaluation methodology and hardware configuration.
- β’ VRAM requirements are estimates; actual usage depends on quantization and batch size.
- β’ FNI scores are relative rankings and may change as new models are added.
- β’ Source: Unknown
AI Summary: Based on GitHub metadata. Not a recommendation.
π‘οΈ Model Transparency Report
Verified data manifest for traceability and transparency.
π Identity & Source
- id
- gh-model--aws-samples--serverless-rag-demo
- source
- github
- author
- Aws Samples
- tags
- opensearchragopensearchserverlessanthropicclaudehaikusonnetstrandsstrands-agentspython
βοΈ Technical Specs
- architecture
- null
- params billions
- null
- context length
- null
- pipeline tag
- feature-extraction
π Engagement & Metrics
- likes
- 0
- downloads
- 0
Free2AITools Constitutional Data Pipeline: Curated disclosure mode active. (V15.x Standard)