How abekoki/ai_analysis_engine_sample works
Project Type and Purpose
• This is a Python-based AI analysis engine for anomaly detection.
• It is delivered as a CLI tool/library (src/ai_analysis_engine) that drives an AI agent (LangChain + OpenAI) and integrates with a Jupyter Notebook server to generate visual, beginner-friendly anomaly reports (HTML or Notebook).
File‐Structure Analysis
• Top‐level
• src/ai_analysis_engine/ – core modules and CLI entry point
• templates/ – HTML templates for report generation
• samples/ – example CSV data, specs, sources, and expectations
• output/ – generated reports
• Config: pyproject.toml, uv.lock
• Key Modules
• cli.py & __main__.py – parses CLI args, loads config, instantiates AI agent
• expectation_parser.py – converts natural-language expectations into structured constraints
• data_analyzer.py – ingests CSV with Pandas, identifies candidate anomalies
• hypothesis_generator.py – leverages LangChain/OpenAI to generate root-cause hypotheses
• report_generator.py – applies Jinja2 templates to produce HTML/Notebook report
• External Integrations
• Jupyter Notebook server via MultiServerMCPClient
• OpenAI API (GPT models)
• RAG-based retrieval for spec/source code search
Insights from README
User → AI Agent → NLP + Notebook → Anomaly Detection → Cause Analysis → Report Creation → User
• Tech stack: LangChain, OpenAI, Pandas/NumPy, Matplotlib/Seaborn, Jupyter Notebook