Polylingual AI Support Agent
Evidence-first French/English support automation platform that escalates instead of guessing.
Test the Grounded Support Agent Live
[INTERACTIVE IPHONE DEMO // SCROLL & CLICK TO TEST REAL-TIME CASE ANALYSIS]
THE STORY
Customer support teams struggle with hallucinatory chatbot responses that erode brand trust. Polylingual was engineered to guarantee strict grounding: every customer answer retrieves sources from a pgvector knowledge base, calculates confidence metrics, and routes low-confidence cases to human agents.
MY CONTRIBUTIONS
- Architected FastAPI service with dual hybrid lexical + pgvector semantic retrieval.
- Configured NVIDIA NIM GLM 5.2 structured tool calling with automatic French/English language detection.
- Designed strict confidence gating mechanism (78% threshold) triggering human escalation queues.
- Provisioned AWS infrastructure via Terraform (CloudFront, S3 static frontend, ECS Fargate backend, RDS PostgreSQL).
- Built operational telemetry dashboard with Prometheus metrics and Grafana monitoring.
Solution highlights
Polylingual replaces ungrounded chatbot responses with an auditable decision pipeline. Every ticket incoming via Slack, Zendesk, or Email undergoes semantic retrieval, confidence scoring, and explicit human-in-the-loop fallback.
- Automatic language detection preserving customer language (French/English).
- pgvector similarity search combined with BM25 lexical ranker.
- NVIDIA NIM GLM 5.2 schema-validated model round trips.
- Real-time execution cost tracking and latency telemetry.
The problem
Traditional LLM support bots frequently make up policy details, quote wrong return windows, or provide contradictory advice. When customer service bots guess, support costs increase due to secondary escalations.
The insight
Confidence is not an answer. By treating low confidence as a first-class routing event rather than an edge case, we can achieve high automation rates without sacrificing accuracy.
Explorations & iterations
Iterated through vector-only search, graph RAG, and hybrid rankers before settling on a lightweight dual-rank pipeline that delivers sub-second retrieval accuracy.

Artifact 01: Operations Overview & Metrics

Artifact 02: Case Intake Terminal
Up close: Architecture & data flow
The CloudFront CDN routes API requests to ECS Fargate backend. Vector embeddings are generated via sentence-transformers and queried against pgvector. GLM 5.2 validates responses against exact source documents.
Under the hood
The core Fast-API resolution engine enforces atomic execution bounds, logging trace IDs and token metrics to Prometheus.
def evaluate_ticket_confidence(retrieved_docs, score_threshold=0.78):
top_score = max([doc.score for doc in retrieved_docs]) if retrieved_docs else 0.0
if top_score < score_threshold:
return Decision(action="ESCALATE_TO_HUMAN", confidence=top_score)
return Decision(action="AUTO_RESOLVE", confidence=top_score)Failure modes & guardrails
If the NVIDIA NIM endpoint experiences latency exceeding 35 seconds, the engine gracefully defaults to a grounded human-handoff payload with pre-populated context notes.
Measurable impact
Achieved 88% auto-resolution rate on routine tickets with 0% unsourced claims in production evaluations.
Reflection / what I learned
Building for production RAG is 20% prompt design and 80% data hygiene, strict schema validation, and operational fallback engineering.