โ† Back to list

๐Ÿง  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โ€ฆ

Meen ยท 2025-10-30 23:21 ยท 2 claps ยท 3.3 min read
#sciml #data-analysis #multiagent-system #llm #azure
Open on Medium โ†—
Wiki topics: LLM ยท Large Language Models AGT ยท AI Agents FT ยท Fine-tuning & Adaptation ML ยท Machine Learning EDU ยท Education & Learning โ˜๏ธ ยท DevOps & Cloud โš›๏ธ ยท Physics ๐Ÿ”ฌ ยท Science ยท General

๐Ÿง  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:

  1. 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.
  2. 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.
  3. 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)
  4. 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.
  5. 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