AI Automation that actually works: $100M, messy data, zero surprises - Tanmai Gopal, Hasura/PromptQL
TL;DR This presentation introduces an AI automation solution, PromptQL, designed to tackle the complex and costly problem of appointment scheduling and procedure code selection within a large public healthcare company. Currently, call center operators spend 12-15 minutes per call navigating a nightmarish UI and deciphering intricate, often inconsistent, medical codes and regulations. This inefficiency costs millions, with every 3 minutes saved equating to a $50 million impact. The core issue is an "automation paradox": business users understand the rules but can't code, while developers can code but don't grasp the nuanced business logic. PromptQL proposes enabling non-technical administrators to "vibe code" business logic in natural language. The solution addresses key challenges like translating business language to AI intent, defining SDLC for non-technical users, and ensuring security. It works by training a domain-specific AI model to generate deterministic "company QL" plans that can be tested and deployed by business users, bypassing developers. This approach has already demonstrated a $100M+ impact by streamlining procedure code and appointment selections.
Information Mind Map
- Context: Large public healthcare company specializing in software for radiologists/clinics.
- Current Process: Patients call operators to schedule appointments.
- Operators collect patient data (age, gender, symptoms, insurance, vendor).
- Operators must determine the correct procedure code.
- Operators perform extensive data entry and schedule appointments.
- Inefficiency & Cost:
- Call duration:
12-15 minutes. - Financial Impact: Every
3 minutesreduced saves$50 million.- Increased call volume (more appointments scheduled).
- Reduced capital cost (less operator training/retraining).
- Call duration:
- Complexity for Operators:
- UI Nightmare: "Worst most complicated enterprise UI screen" with
15+ tabsrequiring constant switching and data entry. - Procedure Code Selection:
- Highly complex and contextual.
- Dependent on: patient symptoms, age, gender, medical history (previous visits).
- Influenced by: State, Federal, and Local regulations.
- Impacted by: Specific clinic rules (e.g., "clinic doesn't work after 3 PM").
- Explosive Permutations: Number of combinations is "explosive."
- Inconsistent Codes: No universal agreement on procedure codes across clinics.
- Example: Some clinics have
250 codesfor mammograms, others5.
- Example: Some clinics have
- UI Nightmare: "Worst most complicated enterprise UI screen" with
- Key Players:
- Operator: Takes calls, performs data entry, determines codes. (Jobs targeted for replacement)
- Developer: Builds complex software to handle edge cases via configurations (e.g.,
timing block). - Administrator (Non-technical): Knows all clinic rules but cannot code.
- Resulting Problems:
- Configuration Explosion: Developers encode every edge case into configurations.
- Training Burden: Increased configuration requires more operator training.
- Uncoded Business Logic: Many rules remain uncoded (e.g., "clinic in Chicago doesn't like to work on a Friday").
- Negative ROI for New Rules: Encoding new rules becomes more expensive than the benefit derived, leading to offloading training to operators.
- The Automation Paradox:
- People who understand the rules cannot code the automation.
- People who can code the automation cannot/will not understand the rules.
- Core Proposal: What if non-technical people could write and update algorithms in natural language?
- Goal: Cut developers out of the loop; enable admins to "vibe code in production."
- 1. The Language Problem:
- Business users have their own obvious domain language.
- Stock LLMs speak programming languages (
React,Rust,JavaScript,TypeScript), not specific business terminology. - Translating business algorithms into AI intent is challenging.
- Risk: Misinterpretation could lead to severe consequences (e.g., "MRI machines catching fire" - hyperbole, but highlights the risk).
- 2. The DevOps Problem:
- Defining
SDLC(Software Development Life Cycle) for non-technical users is complex. - Concepts like
review,staging,production,fixing,troubleshootingare alien to non-technical users.
- Defining
- 3. The Security Problem:
- Allowing non-technical users to write business logic on the fly poses a massive data breach or security leak risk.
- Requires opinionated solutions to prevent system shutdown.
- Current Developer Workflow: Developers + Tribal Knowledge -> Foundation Model + Tooling -> Programs.
- PromptQL's Proposed Workflow:
- Non-technical user speaks to a domain-specific model.
- This model is "taught the language of your domain."
- Generates a "plan" in a language called
company QL(revealed as PromptQL). PromptQLplan is a deterministic artifact (program).- This artifact is then programmatically executed.
- Hard Part: Encoding domain-specific practices (procedural semantics, ontologies, entities, specifics) into the model so it generates business-sensible outputs.
- Objective: Dynamically reassign GitHub issue supporters based on business rules.
- Steps for Business User:
- Initial Request: "Given an issue description like 'data pipelines are not working', find the most relevant file using AI, then find the top contributor."
- System Response: Identifies
analytics_pipeline.pyand a top contributor. - Introduce
automationsPrimitive: Convert the logic into an automation.- Define
input(e.g.,description) andoutput(e.g.,name). - System converts, runs tests, fixes issues in background.
- Define
- Testing & Iteration:
- Test with more inputs (e.g., "database is down," "pods are not scaling down").
- Refinement: If results are unsatisfactory (e.g., "Tom doesn't sound like the right guy"), modify rules.
- Example: "Show me all users and their emails." -> Discover Tom is from an external company.
- Add rule: "Remove somebody else from an external company."
- Deployment: Once satisfied, hit "deploy" button (non-technical action).
- Adding More Complex Rules:
- Example: "In case there's a generic request, assign to a default person." (Exclusion rule)
- Example: "In case no relevant files are found, assign to this person."
- User Confidence: Business user gains confidence that logic works, system guarantees execution.
- Security:
- The
PromptQLplan runs strictly in user space, not data space. - Data layer keeps it "real" and handles multi-tenant authorization rules.
- Allows "vibe coding" on higher layers without compromising data.
- The
- Impact:
- The solution for procedure code selection and appointment selection has a $100 million+ impact for the healthcare company, already being realized.
- Shift in Development: Instead of developers building software, the future is building "vibe coding platforms" unique to each organization.
- Key Takeaway: Empowering non-technical users to directly define and deploy business logic is the next frontier in automation.