Skip to content

Instantly share code, notes, and snippets.

@Jarvis-Legatus
Created August 11, 2025 14:01
Show Gist options
  • Select an option

  • Save Jarvis-Legatus/2d1b634a1182f5b11c371ebe77f50b90 to your computer and use it in GitHub Desktop.

Select an option

Save Jarvis-Legatus/2d1b634a1182f5b11c371ebe77f50b90 to your computer and use it in GitHub Desktop.
Mind map for YouTube video: AI Automation that actually works: $100M, messy data, zero surprises - Tanmai Gopal, Hasura/PromptQL

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

🧠 AI Automation for Complex Business Logic: PromptQL's Approach

πŸ”‘ The Problem: Healthcare Appointment Scheduling & Procedure Codes

  • 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 minutes reduced saves $50 million.
      • Increased call volume (more appointments scheduled).
      • Reduced capital cost (less operator training/retraining).
  • Complexity for Operators:
    • UI Nightmare: "Worst most complicated enterprise UI screen" with 15+ tabs requiring 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 codes for mammograms, others 5.

πŸ”‘ Organizational Challenges: The "Automation Paradox"

  • 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.

πŸ”‘ The AI Idea: Natural Language Automation for Non-Technical Users

  • 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."

πŸ”‘ Key Challenges for AI Implementation

  • 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, troubleshooting are alien to non-technical users.
  • 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.

πŸ”‘ PromptQL's Solution Architecture

  • 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).
    • PromptQL plan 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.

πŸ”‘ Demo Walkthrough (GitHub Issue Assignment Example)

  • Objective: Dynamically reassign GitHub issue supporters based on business rules.
  • Steps for Business User:
    1. Initial Request: "Given an issue description like 'data pipelines are not working', find the most relevant file using AI, then find the top contributor."
    2. System Response: Identifies analytics_pipeline.py and a top contributor.
    3. Introduce automations Primitive: Convert the logic into an automation.
      • Define input (e.g., description) and output (e.g., name).
      • System converts, runs tests, fixes issues in background.
    4. 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."
    5. 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 & Impact

  • Security:
    • The PromptQL plan 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.
  • Impact:
    • The solution for procedure code selection and appointment selection has a $100 million+ impact for the healthcare company, already being realized.

πŸ”‘ Future Vision

  • 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment