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

Thinking Eval - LLM Reasoning Process Assessment

Open QuentinAmbard opened this issue 8 months ago • 1 comments

Overview

Evaluate the LLM's reasoning process during skill execution - how well did it think through the problem?

Concept

Given a set of business/functional instructions (e.g., "build a pipeline doing X"), we:

  1. Execute the skill with the instructions
  2. Capture the full execution trace (thinking, tool calls, errors, retries)
  3. Have an LLM judge evaluate the reasoning quality

Test Instructions

Key principle: We maintain a fixed set of detailed markdown instruction files that we always run the same way. This ensures:

  • Reproducible datasets across runs
  • Comparable results between PRs/branches
  • Consistent baseline for regression detection

Instruction Structure

tests/eval_scenarios/
├── 01-data-generation.md      # Always runs first
├── 02-sdp-pipeline.md         # Depends on data gen output
├── 03-unstructured-data.md    # Additional data sources
├── 04-knowledge-assistant.md  # Depends on unstructured data
├── 05-dashboard.md            # Depends on pipeline tables
├── 06-genie-space.md          # Depends on pipeline tables
└── ...                        # Covers all skills

Dependency Chain

Tasks run in sequence with explicit dependencies:

Data Generation → SDP Pipeline → Unstructured Data → KA → Dashboard → Genie → ...
      ↓               ↓                ↓              ↓        ↓
   raw data      bronze/silver/    documents,     config    dashboard
   parquet       gold tables       PDFs, etc.     + index   definition

Each step's output becomes the next step's input. This mirrors real-world usage and tests the full skill chain.

Evaluation Criteria

Criteria Description
Efficiency How many round trips? Tool call failures?
Clarity Did the LLM struggle or show confusion?
Recovery How well did it handle errors?
Completeness Did it complete all required steps?
Corrections What had to be manually corrected?

Implementation

  • Execute skills in dependency order with fixed instructions
  • Log full conversation trace for each step
  • Parse trace for metrics (tool calls, errors, retries)
  • Send to LLM judge with evaluation rubric
  • Produce structured scores per step and overall

Deliverable

A Python tool/script that:

  1. Runs skills in sequence with predefined markdown instructions
  2. Captures execution trace for each step
  3. Evaluates reasoning quality via LLM judge
  4. Outputs scores and observations per step
  5. Saves metrics to MLflow

Acceptance Criteria

  • [ ] Fixed instruction files created for each skill
  • [ ] Dependency chain execution implemented
  • [ ] Execution trace capture implemented
  • [ ] LLM judge prompt for thinking eval created
  • [ ] MLflow metrics logging implemented

QuentinAmbard avatar Apr 01 '26 18:04 QuentinAmbard

Migrated to databricks/databricks-agent-skills#233 — closing here.

Consolidated with #406 and #408 into one proposal in the repo that now holds the skills. Details and rationale for grouping them are in that issue.

Your thinking-eval level maps onto a failure mode that's already showing up over there: databricks/databricks-agent-skills#232 is a case where every individual skill is correct but the agent routes to the wrong one (a GPU-library request getting CPU serverless compute). Static analysis of skill text can't catch that — it needs exactly the execution-trace judgement this level describes.

The fixed-instruction-set/reproducibility constraint from your write-up is carried over as the load-bearing part.

jacksandom avatar Aug 05 '26 18:08 jacksandom