Menu

How I Built an Automated LLM Evaluation Harness to Eliminate AI Math Hallucinations on CSVs
πŸ“°

How I Built an Automated LLM Evaluation Harness to Eliminate AI Math Hallucinations on CSVs

DEV Community: fastapiΒ·Nirmana HerathΒ·13 days ago
#oZNGr9uy
#devtofastapi#devto#dev#prompt#pandas
Long article (659 words) β€” no AI summary yet.
Reading 0:00
15s threshold

The Problem With "Chat With Your CSV" Apps

Most AI spreadsheet tools do one of two scary things:

Paste your private CSV rows directly into an LLM prompt and pray it doesn't hallucinate the math , or

Let the LLM write arbitrary Python code and run exec() on the server β€” a massive Remote Code Execution (RCE) risk.

While building AskGrid ( "Don't Scroll, Just Ask." ) solo on a \$0 budget with Python 3.12, FastAPI, Pydantic v2, and Pandas, I locked down two non-negotiable rules :

Zero raw rows ever go to the LLM (only column names + inferred data types).

Zero LLM math and zero exec() β€” the LLM's only job is to act as a Natural-Language Intent Router , outputting a strict Pydantic JSON AnalysisIntent .…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.