Home/
Part XII — Building Real Products (End-to-End Projects)/36. Project 5: Data-to-Insights Analyst Tool/36.3 Schema inference and validation
36.3 Schema inference and validation
Overview and links for this section of the guide.
On this page
Resolving Ambiguity
If the CSV has columns `sales_jan` and `sales_feb`, and the user asks "Show me sales," the model should ask: "Do you mean January, February, or total?"
This is the Schema Inference step. The model looks at the prompt and the schema, and if the mapping isn't 1:1, it raises a flag.
Validating the Code
Before running the generated Python, scan it.
- Allowed imports: `pandas`, `numpy`, `matplotlib`.
- Banned imports: `os`, `sys`, `subprocess`, `requests`.
This is a basic safety layer. The real safety comes from the execution sandbox.