Moving Generative AI from a proof-of-concept sandbox into an enterprise-grade solution requires shifting our engineering focus from what AI can do to what enterprises can trust.
Modern organizations generate immense repositories of institutional knowledge—ranging from complex corporate refund policies to intricate regulatory guidelines. While data availability is rarely the issue, efficiently retrieving it remains a massive operational bottleneck. Workforce productivity drops significantly when employees are forced to manually navigate fragmented, disconnected data silos.
As companies rush to adopt Generative AI to bridge this gap, they encounter a critical barrier: trust and governance. Public, out-of-the-box LLMs operate without internal corporate context and are highly prone to hallucination. For an enterprise, an incorrect or completely fabricated answer introduces unacceptable operational, brand, and regulatory risks.
To solve this, I designed and open-sourced an end-to-end Enterprise Refund AI Assistant. Instead of relying blindly on a foundation model’s pre-trained data, this platform utilizes a robust, decoupled Retrieval-Augmented Generation (RAG) architecture. By separating data ingestion from live inference, the system ensures that every conversational output is strictly anchored, grounded, and fully traceable back to verified, authoritative enterprise documentation.
Rather than provisioning monolithic servers or maintaining idle container clusters, the platform relies on a 100% serverless topology. This structural decision guarantees total operational elasticity: the entire environment automatically scales down to zero when idle, eliminating baseline infrastructure costs.
Instead of a standard service catalog, the system is segmented into functional layers chosen specifically for isolation, security, and low operational overhead.
To maximize throughput while protecting inference latency, the platform completely separates asynchronous document ingestion from synchronous user inference.
S3 Document Upload
│
▼
S3 Event Notification
│
▼
Lambda Processor
│
▼
Titan Text Embeddings V2
│
▼
OpenSearch Serverless
User Question
│
▼
API Gateway
│
▼
Lambda
│
▼
OpenSearch Vector Search
│
▼
Context-Augmented Prompt
│
▼
Amazon Nova Lite
│
▼
Grounded Response
Every AWS resource is provisioned declaratively using Terraform.
Remote state management is implemented using Amazon S3 together with DynamoDB state locking.
terraform {
backend "s3" {
bucket = "enterprise-refund-ai-tfstate"
key = "prod/platform.tfstate"
region = "us-east-1"
dynamodb_table = "enterprise-refund-ai-tflocks"
encrypt = true
}
}
GitHub Actions automates deployment using GitHub OpenID Connect (OIDC), eliminating long-lived AWS credentials and enabling secure, short-lived role assumption.
Note:These benchmark results were obtained in a controlled demonstration environment and are intended to illustrate the platform's performance characteristics.
Problem
API Gateway → Lambda → Bedrock → OpenSearch → Bedrock creates multiple network hops that can increase latency.
Solution
Problem
OpenSearch Serverless separates security, network, and data access policies, making Infrastructure as Code more complex.
Solution
Terraform dynamically provisions IAM execution roles and injects them directly into OpenSearch data access policies during deployment, eliminating manual configuration.
The complete production-ready implementation is available as open source.
https://github.com/Tijani-Abagaro-GenAI-Cloud/enterprise-refund-ai-showcase
I welcome feedback from the AWS and AI community. If you've built enterprise Generative AI systems, I'd love to hear how you're approaching retrieval, grounding, security, and operational scalability.
If you find this project useful, I'd appreciate your feedback, suggestions, or a ⭐ on GitHub.