Don't Let the Model Do Joins: Compiler-Enforced Queries to Stop Confident Wrong Numbers
dosco · x · 2026-12-04
Building deeporg, dosco found that pointing a model at raw tables leads it to happily join things that shouldn't be joined and hand back a wrong number with total confidence. His key design decision was taking joins away from the model entirely: it writes GraphQL, and the compiler performs the joins, eliminating that failure mode architecturally.
The quoted post describes a real engagement: a PE firm owning a healthcare billing software company had an AI agent built inside their Azure tenant on real claims data, with no platform rewrite. Their 20-year-old rules engine worked fine, but every hard revenue question waited on one expert hand-writing SQL against the legacy schema. About six weeks in, their CPTO was running real revenue investigations through an ad hoc research agent, with patient data never leaving the tenant. Before kickoff, the team traced a single claim's charge-to-cash journey and built a data dictionary with their data engineer during the schema migration.
More from coding & agent
- Decagon unveils Arcus, a 500B+ in-house LLM beating GPT-6.2 Sol via multi-turn RL — simonguozirui · 2026-12-04
- How an $8K AI project grew into $35K/month across 4 teams — aryanXmahajan · 2026-12-04
- 491B tokens of agent traces released — "someone will pretrain on it by Friday" — AIFlow_ML · 2026-12-04
- Even OpenAI President Greg Brockman Still Runs Agents on His Laptop — kieranklaassen · 2026-12-04
- "Try Again" eval turns any coding benchmark into a multi-turn agent eval — mrdrozdov · 2026-12-04
- Dev says Neon beats Opus 5.5, moves over 60% of tokens to Neon and Carbon — aniketapanjwani · 2026-12-04