How to Let an LLM Query Your Data Without Running Arbitrary Code
Schovia
0:00 / 0:00
How to Let an LLM Query Your Data Without Running Arbitrary Code
125 просмотров · 3 недели назад
Schovia
1,07 тыс. подписчиков
125 просмотров · 3 недели назад
Would you let an AI generate and execute code directly on your data?
LLMs can easily generate Python or pandas code to answer questions about a dataset. But that creates two important design problems: how much of your data does the model actually need to see, and how much execution power should the AI be given?
In this first video of the series, we explore an architecture that separates AI reasoning from execution. Instead of allowing an LLM to generate arbitrary Python, the model produces a constrained analysis request that can be validated before trusted, deterministic code executes it.
We also see this pattern working with a real open-source repository from the command line.
🧠In this video:
✅Why sending an entire dataframe to an LLM doesn't scale
✅The risks of allowing AI-generated Python to execute directly on your data
✅How to separate probabilistic AI reasoning from deterministic execution
✅How structured analysis requests can be validated before execution
✅How a compact data profile can replace thousands of raw records
✅A live demonstration of the architecture using an open-source repository
💻 Open-Source Repository:
https://github.com/sindhug/mcp-datafr...
🔗 Explore the interactive MCP DataFrame QA demo:
https://github.com/sindhug/mcp-datafr...
📺 MCP video series:
Part 1 — Would You Let AI Write Code on Your Data? (this video)
Part 2 — How Much of Your Data Should an AI See? (how to build the profile)
Part 3 — What If AI Never Wrote Code At All? (how to create the analysis plan)
Part 4 — The Question That Gets Rejected (how the plan is validated)
Part 5 — From Plan to Answer: Where Nothing Gets to Surprise You (executer and results)
Part 6 — The Last Piece: Using MCP to Turn This Into a Tool AI Can Use (how server.py works)
Part 7 — How to make this work on your own data
Part 8 — Wrapping up
⏱️Chapters:
00:00 — Would you let AI write code on your data?
01:25 — Separating AI reasoning from execution
02:06 — The dataframe example
02:35 — Problem 1: Giving the LLM too much data
03:18 — Problem 2: Executing AI-generated Python
03:55 — A safer architectural approach
04:36 — How the guarded execution pattern works
05:21 — What this architecture doesn't solve
06:01 — Seeing the repository in action
06:22 — Reasoning without the entire dataframe
06:51 — Running a natural-language query
07:14 — Constrained requests and deterministic execution
07:36 — Returning structured table results
08:00 — What's next in the series
At Schovia, we make AI concepts feel like everyday ideas. Subscribe for clear visual explanations of machine learning, LLMs, and modern AI systems.
#ArtificialIntelligence #LLM #AIEngineering #MachineLearning #DataScience #Python #MCP #AI agents #GenerativeAI