๐ง Physics Evolution: How I Built an Agentic System for Automated Scientific EDA
Exploratory Data Analysis (EDA) is often the first and most time-consuming step in scientific machine learning workflows. Itโs where weโฆ
๐ง Physics Evolution: How I Built an Agentic System for Automated Scientific EDA
Exploratory Data Analysis (EDA) is often the first and most time-consuming step in scientific machine learning workflows. Itโs where we discover correlations, patterns, and physical intuition before training any model. But for scientific data โ especially from physics simulations โ EDA can become a repetitive, manual, and error-prone process.
Thatโs why I built Physics Evolution: an agentic system that performs fully automated EDA, learns from previous analyses, and continuously improves over time. See -> teeratornk/agentic_system_for_eda
๐ From Manual Scripts to Autonomous Analysis
Traditional EDA scripts are brittle. They need to be rewritten for every dataset and often lack scientific context โ such as spectral analysis or gradient-based insights that are crucial for physics simulations.
Physics Evolution changes this by introducing a five-agent architecture powered by Azure OpenAI and AG2 (ag2ai/ag2: AG2 (formerly AutoGen): The Open-Source AgentOS. Join us at: https://discord.gg/pAbnFJrkgZ). Each agent has a specialized role and collaborates to deliver a comprehensive, evolving analysis pipeline.
๐งฉ The Multi-Agent Architecture
The system mirrors how a real scientific team might work:
- Data Planner โ The Strategist Coordinates the workflow, loads insights from past analyses, and delegates tasks to other agents as needed. It also reviews outputs and decides when additional analyses are needed.
- Data Validator โ The Gatekeeper Performs quick checks on file integrity and structure before any computation begins. If the dataset is unreadable, the workflow stops early โ saving resources.
- Data Analyzer โ The Powerhouse Runs the full analytical process: basic statistics (mean, std, outliers, missing values), advanced analysis (correlations, FFT, spectral energy, gradient fields), and physics-specific diagnostics for reduced-order modeling (ROM)
- Data Reporter โ The Technical Writer Synthesizes results from JSON statistics into polished, human-readable Markdown reports with summaries, tables, and visualizations. It iterates on feedback from the planner until the report reaches a final consolidated version.
- Executor โ The Operator Safely runs scripts, monitors for errors, and ensures each output is versioned and archived.
This separation of roles ensures clarity, modularity, and fault tolerance โ core design principles for scalable AI systems.
๐ How the System Learns and Evolves
Physics Evolution doesnโt just perform one-off analyses โ it learns from history.
Every completed analysis is stored in a structured history repository, where future runs can:
- Compare new data against old analyses
- Retrieve previous visualizations or statistics
- Automatically refine which analyses to perform next
This means the more you use it, the smarter it gets โ mimicking a human analystโs intuition over time.
๐ Example Use Case: The Burgers Equation Dataset
The included dataset (burgers_data_R10.mat) comes from
Lu Lu et al., A comprehensive and fair comparison of two neural operators (with practical extensions) based on FAIR data, 2022.
It contains high-fidelity solutions of the 1D viscous Burgers equation, a classical benchmark for reduced-order modeling and physics-informed neural networks.
Running one commandโฆ
python eda_system.py data/burgers_data_R10.mat
โฆkicks off the full agentic workflow:
- Validation โ Analysis โ Reporting โ Consolidation
- Generating statistics, figures, and Markdown reports โ automatically versioned and archived.
๐งฎ Whatโs Inside the Analysis
The Data Analyzer runs multi-phase computation tailored for scientific datasets:
Phase 1 โ Basic Statistics
- Min, max, mean, std, quartiles, and outlier detection
- Missing value analysis and memory profiling
Phase 2 โ Advanced Physics Analysis
- Pearson/Spearman correlations
- FFT and spectral-energy analysis
- Gradient-based diagnostics for shock or discontinuity detection
Phase 3 โ Visualization
- Distribution plots, heatmaps, and correlation matrices
- Physics-specific visualizations for spatiotemporal fields
Results are saved in:
eda/
โโโ code/
โโโ stats/statistics.json
โโโ figures/
โโโ reports/
๐งพ Report Evolution and Consolidation
Unlike static reports, Physics Evolution produces an iterative chain of reports (data_report_v1.md, data_report_v2.md, โฆ) that capture how insights evolve.
Finally, the system generates a consolidated report summarizing the entire analytical journey:
## Analysis Evolution
### Version 1 โ Initial Analysis
- Basic statistics computed
- Initial patterns identified
### Version 2 โ Enhanced Analysis
- Added correlation and spectral insights
### Version 3 โ Deep Dive
- Gradient analysis for shock detection
## Consolidated Findings
All discoveries merged into a single narrative.
This provides transparency, traceability, and a record of scientific reasoning over time โ key for reproducible research.
๐งฐ Technical Setup
Requirements
pip install autogen python-dotenv numpy scipy matplotlib seaborn pandas
Set up Azure OpenAI credentials via .env:
AZURE_OPENAI_API_KEY=your_key
AZURE_OPENAI_ENDPOINT=https://your-resource.openai.azure.com/
AZURE_OPENAI_MODEL=gpt-4
Then clone and run:
git clone https://github.com/teeratornk/agentic_system_for_eda.git
cd agentic_system_for_eda
python eda_system.py
Supported formats include .mat, .csv, .json, .npy, and .npz.
๐งช Validation and Testing
A manual validation script (run_full_eda_burgers_R10.py) is provided to cross-check the agentic systemโs outputs.
It ensures that computed statistics, visualizations, and summaries match between human-written and AI-generated analysesโoffering a clear benchmark for accuracy.
โ๏ธ Why This Matters
Scientific machine learning workflows demand:
- Transparency
- Repeatability
- Adaptability
By combining LLM-based reasoning with scientific computing rigor, Physics Evolution brings automation and accountability together. Itโs not just an AI doing statistics โ itโs an autonomous research assistant that learns how to analyze data like a scientist.
Try it here๐ teeratornk/agentic_system_for_eda
If you work with physics simulations, reduced-order modeling, or scientific ML datasets, this system can save hours of manual analysis while maintaining interpretability and rigor.
๋ฉํ๋ฐ์ดํฐ
- post_id
- 6afdbd91c5b5
- slug
- physics-evolution-how-i-built-an-agentic-system-for-automated-scientific-eda-6afdbd91c5b5
- url
- https://medium.com/@tkadeethum/physics-evolution-how-i-built-an-agentic-system-for-automated-scientific-eda-6afdbd91c5b5
- canonical_url
- https://medium.com/@tkadeethum/physics-evolution-how-i-built-an-agentic-system-for-automated-scientific-eda-6afdbd91c5b5
- author_url
- https://medium.com/@tkadeethum
- status
- ok
- fetched_at
- 2026-07-15 23:48:04