◆ QUEST LOG / ASKDATA

AskData — the agent that shows its work

2026Solo projectDuckDBKimball star schemascikit-learnLLM agent (from scratch)Streamlit

“A wrong number that looks right is worse than an error message.”

Live demo ↗ Source ↗ Paper (PDF) ↗

01The problem

Text-to-SQL agents demo beautifully. You type “what was our average order value last quarter?”, the model writes SQL, and a number appears. The problem is what happens on question forty-seven, when the model quietly joins the wrong table or filters the wrong date column — and still hands you a confident number. Nobody notices, because the answer looks right.

For analytics, that failure mode is worse than crashing. A stakeholder who gets an error message asks for help; a stakeholder who gets a wrong number makes a wrong decision.

02What I built

AskData is a complete analytics stack on the public Olist dataset — about 100k real Brazilian e-commerce orders — built in three layers:

FIGURE SLOTarchitecture diagram — warehouse → model → agent
Placeholder: end-to-end architecture diagram (coming soon).

03How the verification works

The agent never just returns its first answer. Each question runs through a loop: plan → generate SQL → execute → verify → tag. The verifier re-derives the answer through independent checks — column sanity, row counts, unit checks, and a second pass that asks whether the SQL actually answers the question that was asked, not a lookalike.

Every answer ships with one of three tags: trusted (it passed verification), repaired (the first attempt failed, the agent found and fixed the problem, and the fix passed), or abstained (the agent could not convince itself and says so instead of guessing). Abstaining is a feature, not a failure.

FIGURE SLOTscreenshot — verification report with trusted / repaired / abstained tags
Placeholder: the Streamlit app showing a verified answer (coming soon).

04Results — measured, not vibes

Building the verifier was the easy half. The real work was finding out whether it helps: 150 golden questions across six tiers (from simple lookups to unanswerable traps), run against five models, three runs each, with exact McNemar tests on paired confidently-wrong outcomes.

The one-line pitch: most text-to-SQL projects optimize for the demo. AskData optimizes for the day a real stakeholder trusts it with a decision.

05What I learned

Building the agent without a framework forced me to own every failure mode. The biggest lesson: evaluation design is the hard part. Deciding what “wrong” means, building a question set that can detect it, and measuring honestly taught me more than any amount of prompt tuning. The second lesson: users forgive an agent that says “I’m not sure” far more easily than one that lies confidently — in analytics, humility is a product feature.