Zero PII leaks.
Across all tested queries in the ~100-worker MVP.
- Scope
- MVP · ~100 Workers
- Stack
- LangGraph + BigQuery + Vertex AI
Enable natural language queries over worker data while strictly preventing access to other workers' PII.
Traditional dashboards were too rigid. Open-ended AI systems risked exposing sensitive data. The challenge was to combine the flexibility of a natural language interface with strong data governance and safety guarantees without compromise on either.
The Challenge
Flexibility and safety cannot be a trade-off
Natural Language Interface
Workers needed to ask questions about personal performance, earnings, and regional market trends without using dashboards or SQL.
Strict Data Isolation
The system had to prevent access to other workers' data and block personally identifiable information at every layer.
Safety Guarantees
The assistant needed to avoid hallucination, over-sharing, and data leakage even when users asked open-ended questions.
The Approach
Designed from first principles
Turon AI designed the MVP from the ground up, focusing on three core principles that shaped every architectural decision. Early in development, multiple approaches were explored for text-to-SQL generation, including tools like Vanna.
After evaluation, the team standardised on a ReAct-style agent architecture using LangGraph, which provided better control over reasoning, tool usage, and extensibility than simpler alternatives.
Controlled Data Access via SQL
All data access goes through structured querying: explicit, auditable, and schema-constrained.
Layered Safety Mechanisms
Guardrails are applied before and after generation, not only at one checkpoint.
Built for Extensibility
The architecture can evolve with new agents and capabilities without a redesign.
The Solution
Eight components, one coherent system
User Query
Natural language
Pre-Query Filter
Intent + PII check
ReAct Agent
LangGraph + few-shot
BigQuery
SQL execution
Post-Response Filter
PII scrub + compliance
Safe Response
Chainlit UI
Natural Language to SQL via ReAct Agents
A LangGraph-powered ReAct agent interprets queries, generates and executes SQL against BigQuery, and returns structured, user-friendly responses.
Multi-Layer Safety and Guardrails
Strict data boundaries are enforced through pre- and post-processing filters applied at both ends of every query.
Retrieval-Augmented Few-Shot Learning
Semantic retrieval of few-shot examples via vector search on Vertex AI improved accuracy and reduced hallucinations.
Multi-Agent Extensibility
An experimental supervisor layer supports future multi-domain expansion without architectural redesign.
Multi-LLM Flexibility
The platform can work with OpenAI, Gemini, and other providers, with dynamic switching and no core code changes.
Insight Generation from Structured Data
The system generated proactive automated insights grounded entirely in real data, moving beyond reactive Q&A.
Interactive UI with Chainlit
An interactive chat interface made the system accessible during the MVP phase and fast to iterate.
Observability and Iteration with LangSmith
LangSmith instrumentation gave visibility into agent decisions and supported rapid iteration from real usage.
Deployment & Iteration
Launched to 100 real workers
The system was launched as an MVP to a controlled group of approximately 100 gig workers. This allowed the team to observe real-world usage patterns, identify edge cases and failure modes, and continuously refine the system based on actual behaviour.
Every observation from the field fed directly back into prompt refinements, filter adjustments, and agent behaviour updates.
Observe real-world usage patterns
Monitor how workers naturally phrase questions and what they most want to know.
Identify edge cases and failure modes
Catch query types that expose gaps in SQL generation or filter logic.
Refine prompts, filters, and agent behaviour
Targeted updates based on LangSmith traces and real interaction data.
Outcome
Powerful, private, and production-ready
Natural Language Insights
Workers could access personal performance and regional market data without dashboards or SQL knowledge.
Strict Privacy Boundaries
The system maintained strict data privacy and access boundaries with zero PII leakage and zero cross-user data exposure across all tested queries.
Improved SQL Accuracy
Retrieval-augmented prompting improved query accuracy and reduced hallucinations across varied and complex questions.
Scalable Multi-Agent Foundation
New domains and capabilities can be added without redesigning the core system.
Beyond Fixed Dashboards
A flexible query interface reduced dependency on rigid dashboards by adapting to worker questions.
The result is an AI assistant that answers questions safely, accurately, and within real-world constraints.
“Combining AI capability with system design discipline, grounding generation in structured data, enforcing layered safety, and building for extensibility, is what makes AI assistants both powerful and trustworthy.”
Key takeaway
AI capability and system design discipline
Getting natural language querying right is a model problem, an architecture problem, a safety problem, and an iteration problem at the same time.
By grounding generation in structured data through SQL, enforcing safety through layered guardrails, and designing for extensibility from day one, Turon AI delivered a system that is both powerful and controlled.
The MVP deployment to 100 real workers created the tight feedback loop needed to refine the system rapidly. The result is a foundation that can grow with new agents, new domains, and new capabilities.
Work with us
Have a problem worth publishing?
If it's hard enough to end up in this record, it's the kind of work we want. Tell us what to build, and we'll show ours.