Templates/AI Chatbot with Retrieval
AWS
AI & ML
advanced

AI Chatbot with RetrievalAWS Architecture Template

Authenticated chat API where a Lambda orchestrator augments a SageMaker-hosted LLM with document retrieval, history, and caching.

Chat APIUser AuthChat OrchestratorKnowledge DocsDoc EncryptionLLM EndpointChat HistoryResponse CacheLatency & Cost Metrics

Why this architecture works

  • Retrieval-augmented prompts ground responses in your S3 knowledge base, reducing hallucination
  • The orchestrator pattern isolates prompt assembly and guardrails from the model, so either evolves independently
  • Chat history in DynamoDB gives stateless Lambdas durable multi-turn context
  • ElastiCache short-circuits repeated questions, cutting inference cost and latency
  • Cognito authentication plus KMS-encrypted documents keep conversations and sources private per user

What's inside (9 resources)

Chat API
aws-api-gateway
User Auth
aws-cognito
Chat Orchestrator
aws-lambda
Knowledge Docs
aws-s3
Doc Encryption
aws-kms
LLM Endpoint
aws-sagemaker
Chat History
aws-dynamodb
Response Cache
aws-elasticache
Latency & Cost Metrics
aws-cloudwatch

From template to running infrastructure

  1. Open this template in the CloudForge visual designer (free account, no credit card).
  2. Customize resources, names, and connections on the drag-and-drop canvas — or ask Vani, the AI architect, to adapt it.
  3. Generate production-ready Terraform or CloudFormation in one click.
  4. Review the plan diff and security scan, then deploy with human approval.

Related architecture templates