FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
How I Built a Production AI Query Engine on 28 Tables — And Why I Used Both Text-to-SQL and Function Calling
NewsSystems

How I Built a Production AI Query Engine on 28 Tables — And Why I Used Both Text-to-SQL and Function Calling

via Dev.toyanou162h ago

A real production system running on an affiliate marketing ERP — not a demo. The Problem The operations team at an affiliate marketing company I worked with hit a classic wall. They had all the data: Revenue by affiliate Fraud flags Campaign ROI Conversion rates by traffic source All of it live in a 28-table MySQL database. But every non-trivial question required SQL. And the people asking the questions weren’t the ones who could write it. The goal: Let a non-technical operator ask a question in plain English and get a real answer instantly. No dashboards. No SQL. No waiting for a dev. Mistake #1 — I Started with Function Calling On paper, it looks perfect: Structured JSON Controlled schema Safe execution Then I tried a real query: “Compare campaign ROI this month vs last month, by traffic source, excluding fraud flags, grouped by affiliate tier” The schema needed: 15+ nested parameters Time comparison logic Multi-table joins The LLM hallucinated fields. The result was garbage. Reality

Continue reading on Dev.to

Opens in a new tab

Read Full Article
0 views

Related Articles

Agents of Industry: From Signal to Action
News

Agents of Industry: From Signal to Action

Medium Programming • 27m ago

Cracking the Google’ The Big Code Challenge Prelims 2026: The Weighted Meeting Point
News

Cracking the Google’ The Big Code Challenge Prelims 2026: The Weighted Meeting Point

Medium Programming • 30m ago

Android developer verification: Balancing openness and choice with safety
News

Android developer verification: Balancing openness and choice with safety

Lobsters • 43m ago

RHAPSODY OF REALITIES - 19TH MARCH 2026
"Live in the consciousness of your divine origin and…
News

RHAPSODY OF REALITIES - 19TH MARCH 2026 "Live in the consciousness of your divine origin and…

Medium Programming • 51m ago

Stop Using /init for AGENTS.md
News

Stop Using /init for AGENTS.md

Medium Programming • 1h ago

Discover More Articles