CLI-first assistant for local CSV-style data analysis. It profiles a dataset, identifies data-quality issues, generates hypotheses, selects and runs an analysis path, creates chart artifacts, reviews analytical claims, and writes a Markdown report plus JSON artifacts.
Implemented:
- Python package scaffold and pytest setup.
- Domain schemas for runs, dataset profiles, hypotheses, plans, findings, visualizations, reports, and model configuration.
- Runtime/provider configuration for oMLX, OpenAI, and Ollama.
- Live provider preflight against OpenAI-compatible
/modelsendpoints before analysis starts. - User-facing dataset/provider failure messages with suggested actions.
- Dataset loading/profiling helpers with a local CSV size guard.
- Deterministic hypothesis generation, planning, pandas analysis, chart generation, and finding review fallbacks.
- Rationale, evidence, hypothesis/finding/chart traceability, limitation rendering, and unsupported-claim qualification.
- Markdown report and JSON artifact writing helpers.
- Unit, integration, contract, metric, and smoke validation for the MVP stories.
Not implemented yet:
- Full LLM prose generation beyond optional structured seams and deterministic fallback.
- Web UI, persistent database, multi-user workflows, or larger-than-memory dataset support.
python3.11 -m venv .venv
. .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -e '.[dev]'
python -m pytest -qCopy .env.example to .env only for local provider settings. Do not commit real credentials.
Default local oMLX path:
ads-assistant run \
--csv tests/fixtures/titanic_sample.csv \
--goal "Find the strongest drivers of survival" \
--output outputs/smoke-testOpenAI option:
ads-assistant run \
--csv tests/fixtures/titanic_sample.csv \
--goal "Find the strongest drivers of survival" \
--provider openai \
--model gpt-4.1 \
--output outputs/smoke-test-openaiOllama option:
ads-assistant run \
--csv tests/fixtures/titanic_sample.csv \
--goal "Find the strongest drivers of survival" \
--provider ollama \
--model qwen2.5-coder:32b-instruct-q4_K_M \
--output outputs/smoke-test-ollamaExpected successful output:
Analysis completed.
Provider: <provider>
Model: <model>
Report: <output>/report.md
Charts: <output>/charts
Artifacts: <output>/artifacts
<output>/
report.md
charts/
*.png
artifacts/
profile.json
quality_issues.json
hypotheses.json
analysis_plan.json
findings.json
model_config.json
model_config.json contains non-secret provider metadata only. Credentials must remain in environment variables or CLI input and must not be committed.
Common checks:
python -m pytest tests/unit -q
python -m pytest tests/integration -q
python -m pytest tests/contract -q
python -m pytest tests/contract/test_cli_contract.py tests/integration/test_input_limits.py -q
python -m pytest tests/integration/test_quality_metric_suite.py tests/integration/test_hypothesis_relevance_metric.py tests/integration/test_claim_qualification_metric.py -q
python -m compileall -q src testsSmoke run:
ads-assistant run \
--csv tests/fixtures/titanic_sample.csv \
--goal "Find the strongest drivers of survival" \
--output outputs/smoke-test- MVP target: local, single-user CSV-style demo datasets with at least 100 rows and 5 columns.
- Runtime target: representative demo analysis completes within 5 minutes with a reachable configured provider.
- Default CSV size guard: 100 MiB (
ADS_MAX_CSV_BYTESoverride for testing/local policy). - Larger-than-memory datasets are out of scope and should be sampled or reduced before analysis.
Feature docs live under:
specs/001-data-science-assistant/spec.mdspecs/001-data-science-assistant/plan.mdspecs/001-data-science-assistant/tasks.mdspecs/001-data-science-assistant/contracts/cli.mdspecs/001-data-science-assistant/quickstart.md
This project follows .specify/memory/constitution.md: code quality, automated tests, consistent UX, measurable performance, and explainable analytical outputs.