Hr ops · Production

PayU builds a secure enterprise AI assistant using Amazon Bedrock with RAG and text-to-SQL agents

The problem

PayU employees were relying on public generative AI tools for tasks like troubleshooting, email drafting, and content refinement, creating risks of sensitive financial data—including proprietary system information and regulated documentation—being transmitted to external third-party providers, which conflicted with their compliance requirements as a Central Bank-regulated institution in India.

Workflow diagram · grounded in source
1
Employee submits query via Open WebUI
trigger
“employees can access FMs and agents through the Open WebUI interface. They have the option to choose either an FM or an agent from a dropdown menu”
2
Route to FM or specialized agent
routing
“When a user selects an FM, their question is answered directly using the model's pre-trained knowledge, without involving an agent. If an agent is selected, the corresponding agent is invoked to handle the request”
3
Bedrock agent orchestrates workflow
ai_action
“an instruction prompt is given to the Amazon Bedrock agent. The agent interprets this prompt and manages the workflow by delegating specific actions to the underlying LLM”
4
RAG query for HR policy
ai_action
“hr-policy-agent uses RAG, querying a vectorized knowledge base in Amazon OpenSearch Service”
5
Text-to-SQL for business data
ai_action
“credit-disbursal-agent uses a text-to-SQL pipeline, translating natural language queries into structured SQL commands to extract insights from an Amazon Simple Storage Service (Amazon S3) based data lake”
6
SQL syntax validation and fix
validation
“while invoking actions for the text-to-SQL agent, it has been instructed to check syntaxes first and fix the query by reading the error then only execute the final query”
7
Lambda executes SQL via Athena
integration
“The Lambda function serves as the execution engine, running SQL queries and connecting with Athena to process data”
8
Deliver context-aware response
output
“These approaches provide precise, context-aware responses while maintaining data governance”
Reported outcome

After rollout, internal estimates showed a 30% improvement in business analyst productivity, with multiple business workflows added to the application, reduced turnaround times, and collaboration between business units accelerating digital transformation.

Reported metrics
Business analyst productivity30%
Analyst turnaround timereduced turnaround times
generative AI adoption across PayUsignificant interest in generative AI within PayU
Reported stack
Amazon BedrockAmazon Bedrock AgentsAmazon Bedrock Knowledge BasesAmazon Bedrock GuardrailsOpen WebUIAccess GatewayAmazon RDSAmazon EKSAmazon OpenSearch ServiceAmazon S3AWS PrivateLinkApache SparkRAG
Source
https://aws.amazon.com/blogs/machine-learning/how-payu-built-a-secure-enterprise-ai-assistant-using-amazon-bedrock?tag=soumet-20
Read source ↗

Frequently asked questions

What did this team achieve with this AI workflow?

After rollout, internal estimates showed a 30% improvement in business analyst productivity, with multiple business workflows added to the application, reduced turnaround times, and collaboration between business unit…

What tools did this team use?

Amazon Bedrock, Amazon Bedrock Agents, Amazon Bedrock Knowledge Bases, Amazon Bedrock Guardrails, Open WebUI, Access Gateway, Amazon RDS, Amazon EKS, Amazon OpenSearch Service, Amazon S3.

What results were reported?

Business analyst productivity: 30%; Analyst turnaround time: reduced turnaround times; generative AI adoption across PayU: significant interest in generative AI within PayU (source-reported, not independently verified).

How is this hr ops AI workflow structured?

Employee submits query via Open WebUI → Route to FM or specialized agent → Bedrock agent orchestrates workflow → RAG query for HR policy → Text-to-SQL for business data → SQL syntax validation and fix → Lambda executes SQL via Athena → Deliver context-aware response.