Hardik Bahri

I build AI systems that know when to ask a person.

I'm Hardik Bahri, an AI/ML engineer at Genpact, based in Bengaluru. For 2+ years I've shipped LLM pipelines, RAG, evaluation and guardrails on AWS Bedrock, and measured whether they hold up on real data.

Watch a complaint get routed

ComplaintOps, recorded runs
Goes to a personAnswered
Real outputs from my ComplaintOps project: a DistilBERT classifier answers on its own at 0.8 confidence or above. Below that, the case goes to a person with a note. How it works

What I build at Genpact

AI/ML Engineer, Feb 2025 to now. Agentic AI for a banking client and for Genpact's own AI practice.

Most of my work is taking an LLM idea that looks good in a demo and making it hold up on thousands of real, messy banking emails, with a person in the loop where the model isn't sure.

Multi-agent email triage for a bank

A LangGraph + FastAPI pipeline on AWS Bedrock that reads inbound banking emails, sorts them into 45 intents, pulls details into a 250-field schema and routes low-confidence cases to human review.

LangGraph, FastAPI, AWS Bedrock, Claude, human-in-the-loop

+65%throughput, with handling time down from 10–11 to 3–4 minutes per email
−70%QC cost, part of a $2.5M engagement

RAG from reviewer corrections, and the eval that fixed it

Dynamic few-shot retrieval built from emails that reviewers had corrected (Titan embeddings + pgvector). The evaluation suite I wrote found a similarity threshold that was silently blocking 85% of retrievals. I also added an HNSW index that took p50 retrieval from 279 ms to 2 ms at 50K rows.

Amazon Titan embeddings, PostgreSQL, pgvector, LLM evaluation

69% → 86%intent accuracy after the threshold fix

Choosing the model with real data, not a demo

I benchmarked a TF-IDF + logistic regression classifier against the LLM pipeline. It scored 95% on synthetic emails and 48% on 490 real ones, while the LLM held at 86–89%. That's why the LLM shipped. Then I cut its cost: token tracking, batched inference, and a test showing Claude Haiku + RAG matched Sonnet.

Model benchmarking, LLMOps, batching, cost tracking

2.7×lower cost per email, 3× throughput
1/14the cost: Haiku + RAG at Sonnet's accuracy

An AI Trust Gateway for safe LLM calls

A gateway that sits in front of LLM calls with reversible PII redaction and Responsible AI guardrails, adopted across Genpact's Agentic AI practice. I benchmarked a local Qwen2.5 model against GLiNER for entity extraction and shipped a fine-tuned GLiNER that needs a fraction of the memory and compute.

LangGraph, FastAPI, AWS Bedrock, GLiNER, NER fine-tuning

~0.90 F1on adversarial PII tests

Synthetic finance data to test reconciliation agents

A ~10K-line generator of labelled Record-to-Report data: SAP document chains, 42-table master data, 142 currencies and 15+ injected mismatch types with 63-field validation. It feeds the R2R agent benchmarks and Power BI KPI dashboards. I also built intercompany approval controls on PostgreSQL + FastAPI with 100+ pytest tests.

Python, PostgreSQL, FastAPI, pytest, Power BI

15+mismatch types the agents must catch

ComplaintOps

My own end-to-end ML project, built on 335K public CFPB consumer complaints.

A complaint triage system that knows when not to trust itself

The agent is a LangGraph graph whose tools are called only through an MCP server. Every run is traced in Langfuse, and the complaint text is treated as untrusted data.

Held-out test, weighted F1
0.817 vs 0.776 baseline+0.041 gain, 95% interval +0.038 to +0.044
Served model
67 MB, 91 ms on CPUint8 ONNX, 4× smaller than PyTorch, median for one complaint on 2 threads
Evaluation gate
Blocks weak models automaticallyBootstrap intervals, a per-class recall floor and a 40-case golden set. It blocked a weak model and promoted LoRA.
Drift monitoring
Flagged the newest monthPSI, a text domain classifier (AUC 0.75) and Evidently, no labels needed
Shipping
116 tests in CIGitHub Actions, MLflow registry, Docker, and Kubernetes manifests tested on a local kind cluster
Data
335,499 complaintsSplit by date so the test set is the future: train to 2023-02, test to 2024-05

What didn't work, and what I changed

An LLM picking the label for unsure cases

On the hardest complaints it was right 39% of the time against 43% for the classifier, and it called itself high-confidence on 99% of answers.

So the LLM now only writes a note for the reviewer and never sets a label.

XGBoost with Optuna tuning

13 Optuna trials and five engineered text features did not beat TF-IDF + logistic regression, and took 33 minutes of GPU training against 16.

That pointed to a model that reads context, which is where the LoRA fine-tune came from.

I wrote up the LLM experiment in full: My LLM was confident 99% of the time. It was right 39% of the time.

Other projects

Earlier builds outside ML: event-driven systems, algorithms and full-stack work.

  • Event-driven flight alerts

    When a flight's status changes in the airport database, MongoDB change streams on a replica set catch the write and publish it to a Kafka topic. A consumer then finds every passenger booked on that flight and date and emails them, and the web app shows the change and a push notification without a reload. The database write alone sets off the whole chain.

    Python, Flask, Kafka, MongoDB change streams and replica sets, React, SMTP Alerts serviceFlight info service
  • Multi-driver delivery route planner

    Plans routes for several drivers at once in four stages: Floyd–Warshall for shortest paths between every pair of stops, K-means to split the stops between drivers, job sequencing to put high-priority orders first, and a greedy TSP to order each driver's route.

    C++, graph algorithms, clustering, scheduling View on GitHub
  • Blockchain messaging between vehicles

    A connected-vehicle network simulation where a roadside unit and 11 cars send messages as Ethereum smart-contract transactions, so a message can't be altered after it's sent. Each car carries a trust score based on its past behaviour, and the app checks how reliable each message is.

    Solidity, Hardhat, MetaMask, React, Express, MongoDB View on GitHub

Experience

2+ years in industry, plus internships at Coforge and Max Life.

  1. AI/ML Engineer at Genpact, remote

    Agentic AI, RAG, guardrails and LLM evaluation on AWS Bedrock for a banking client. Technical point of contact for the SVP, product head and VPs.

  2. Python Developer at Wishfin, Noida

    Built the end-to-end loan disbursal journey (Django app, Flask lender APIs and callbacks) and automated KYC, eSign, Account Aggregator and DigiLocker flows.

  3. Intern at Coforge

    Built an employee management dashboard that cut leave processing time by 42%.

  4. Intern at Max Life Insurance

B.Tech, Computer Science

Jaypee Institute of Information Technology, 2020–2024

AWS Certified Cloud Practitioner

Amazon Web Services, May 2025

CURIOUS Innovation Award

Genpact, presented by the Senior Vice President

Tools I use

LLMs and agents
LangGraph, LangChain, RAG, multi-agent systems, human-in-the-loop, MCP, tool calling, prompt engineering, LLM evaluation, Langfuse, guardrails and PII redaction, Ollama
Machine learning
PyTorch, Hugging Face Transformers, LoRA/PEFT fine-tuning, scikit-learn, XGBoost, Optuna, NER, text classification, ONNX quantization
MLOps
MLflow, evaluation gates, drift monitoring (Evidently, PSI), Docker, Kubernetes, GitHub Actions
Cloud and data
AWS (Bedrock, S3, Lambda), PostgreSQL, pgvector, SQL, pandas
Backend
Python, FastAPI, Django, Flask, REST APIs, pytest, C++

Building something with LLMs that has to work on real data?

I'm happy to talk about AI/ML, GenAI and agentic AI work. Email is the fastest way to reach me.

hardik.bahri@gmail.com