ai-dev-kit icon indicating copy to clipboard operation
ai-dev-kit copied to clipboard

Implement AI Dev Kit Test Framework and Evaluation Skill

Open QuentinAmbard opened this issue 8 months ago • 2 comments

Milestone: AI Dev Kit Test Framework

Overview

Build a comprehensive test and evaluation framework for AI Dev Kit skills and tools, with an orchestrating skill that ties everything together and enables continuous improvement.

Vision

A complete testing pyramid that validates skills at multiple levels, from basic unit tests to sophisticated LLM-based evaluations, all integrated into the development workflow.

Test Levels

Level Type What It Tests Tool
1 Unit Tests Individual functions, classes pytest
2 Integration Tests Complete workflows, API interactions pytest + Databricks
3 Static Skill Eval Skill quality without execution LLM Judge
4 Thinking Eval LLM reasoning during execution LLM Judge
5 Output Eval Final artifacts vs source of truth LLM Judge
6 Self-Improvement Loop Iterative fixes based on eval feedback Orchestration Skill

Architecture

┌─────────────────────────────────────────────────────────────────┐
│                    Test Framework Skill                          │
│  (Orchestrates all test types, saves results, suggests fixes)   │
├─────────────────────────────────────────────────────────────────┤
│                                                                  │
│  ┌──────────┐  ┌──────────┐  ┌──────────┐  ┌──────────┐  ┌──────────┐
│  │  Unit    │  │Integration│  │ Static   │  │ Thinking │  │ Output   │
│  │  Tests   │  │  Tests    │  │ Eval     │  │ Eval     │  │ Eval     │
│  └────┬─────┘  └────┬─────┘  └────┬─────┘  └────┬─────┘  └────┬─────┘
│       │             │             │             │             │
│       └─────────────┴─────────────┴─────────────┴─────────────┘
│                                   │
│                           ┌───────▼───────┐
│                           │   MLflow      │
│                           │   Metrics     │
│                           └───────────────┘
└─────────────────────────────────────────────────────────────────┘

Workflow

On-Demand PR Testing

  1. PR is opened/updated
  2. Test framework runs all relevant tests
  3. Results saved to MLflow with branch/commit tags
  4. Compare against previous runs (main branch baseline)
  5. LLM grades each test and provides summary
  6. Self-improvement suggestions generated

Chained Evaluation Flow

For complex evaluations (thinking + output), tests follow a consistent pattern:

  1. Data Generation: Execute data gen skill with test instructions
  2. Downstream Task: Execute dependent skill (pipeline, dashboard, etc.)
  3. Evaluate Both: Assess thinking and output at each step

MLflow Integration

Each test run logs:

  • Run metadata: branch, commit, timestamp, PR number
  • Metrics: pass/fail counts, scores per criteria, execution times
  • Artifacts: full traces, comparison reports, recommendations

Enables:

  • Historical trend analysis
  • PR vs main comparison
  • Regression detection

Self-Improvement Loop (This Issue)

The final piece: an orchestrating skill that:

  1. Runs all test types
  2. Aggregates results
  3. Identifies patterns in failures
  4. Generates fix suggestions
  5. Can iteratively apply fixes and re-test

Skill Capabilities

skill: test-framework
commands:
  - run-all: Execute full test suite
  - run-unit: Execute unit tests only
  - run-integration: Execute integration tests only
  - run-evals: Execute all LLM evaluations
  - compare-pr: Compare current branch to main
  - suggest-fixes: Generate improvement recommendations
  - auto-fix: Apply suggestions and re-test (with approval)

Deliverables

  1. Python tools: One script per test type (reusable, composable)
  2. Test Framework Skill: SKILL.md that orchestrates everything
  3. MLflow schema: Standardized metrics and artifacts
  4. Documentation: How to add tests, create expectations, interpret results

Acceptance Criteria

  • [ ] All 5 test types implemented (#404-#408)
  • [ ] Orchestrating skill created
  • [ ] MLflow integration complete
  • [ ] PR workflow documented
  • [ ] Self-improvement loop functional
  • [ ] Can compare any PR to main baseline

QuentinAmbard avatar Apr 01 '26 18:04 QuentinAmbard

We definitely have a static and thinking eval in place in .test/scripts/evaluate.py we would just need to add the Unit and Integration test

auschoi96 avatar Apr 01 '26 19:04 auschoi96

Migrated — closing here, with the pyramid split across both repos as the levels themselves divide.

Levels 3–5 (static, thinking, output eval) → databricks/databricks-agent-skills#233, consolidated into one proposal since skill-content evaluation has to live where the skills do.

Level 6 (self-improvement loop) → recorded as a comment on that same issue, so it isn't lost. I noted there that a loop optimising against a judge will overfit to the judge without a held-out set the optimizer never sees.

Levels 1–2 (unit and integration tests) stay in this repo with the MCP server and databricks-tools-core, and remain tracked by #404 and #405, both still open.

The pyramid framing was the right model — it's just that half of it now points at a different repo.

jacksandom avatar Aug 05 '26 18:08 jacksandom