# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added

- **Interactive Chatbot**: Web-based chatbot for exploring diagnosis results through conversation
  - FastAPI backend with REST API endpoints (`/api/chat`, `/api/report`, `/api/welcome`)
  - React + Vite frontend with bundled static files
  - Single-port architecture (serves both API and frontend on port 8000)
  - Conversation history tracking with clear/reset capability
  - Context-aware responses using ChatAgent with diagnosis report context
  - Automatic browser launch via `launch_chatbot()` function
  - Welcome message generation based on detected issues
- `ChatAgent` class for managing LLM-powered conversations about diagnosis results
- Chatbot dependencies now included by default (FastAPI, Uvicorn, python-multipart)
- Example script (`tests/example_diagnose.py`) demonstrating complete workflow with chatbot
- Frontend components: ChatInterface, MessageList, MessageBubble, DiagnosisPanel

### Changed

- Chatbot dependencies (FastAPI, Uvicorn, python-multipart) moved from optional to required
- Test file renamed from `test_diagnose.py` to `unit_test_diagnose.py`

## [0.1.1] - 2025-01-28

### Added

- Initial release of sklearn-diagnose
- Core `diagnose()` function for model failure diagnosis
- LLM-driven architecture:
  - Signal extractors for deterministic statistics
  - LLM-powered hypothesis generation (failure mode detection with confidence/severity)
  - LLM-powered recommendation generation
  - LLM-powered summary generation
- Detection of 7 failure modes:
  - Overfitting
  - Underfitting
  - High variance
  - Label noise
  - Feature redundancy
  - Class imbalance
  - Data leakage (suspicious patterns)
- Support for any fitted scikit-learn estimator or Pipeline
- Support for both holdout validation and cross-validation results
- Actionable recommendations generated by LLM
- LLM integration (OpenAI, Anthropic) for all generation tasks
- Read-only guarantee (never modifies estimator or data)
- Comprehensive test suite (23 tests)

### Security

- Data leakage detection between train/validation sets
- Input validation and fail-fast for unfitted models
