Command Palette

Search for a command to run...

0

Golden Data-Driven Automatic Evaluation Pipeline

Automatic evaluation is the foundation of optimization — without evaluation, optimization is like a blind man groping an elephant.

Automatic evaluation is the foundation of optimization — without evaluation, optimization is like a blind man groping an elephant.

1. Golden Data-Driven

data/eval/
├─ tickets_eval.csv          # Evaluation tickets (query + metadata)
├─ golden_expectations.csv   # Expected results (intent + risk + severity)
└─ golden_sag.csv            # Expected retrieval results (query → relevant_doc_ids)

2. Evaluation Dimensions

DimensionMetricDescription
Intentaccuracy, F1 per class8-class intent classification accuracy
Severityaccuracy, macro-F1Severity grading (LOW/MEDIUM/HIGH)
RiskF1, precision, recall6-class risk label detection
SAGrecall@k, MRRRetrieval recall for relevant documents
No-auto-sendaccuracyIdentification of tickets that should not be auto-sent
Compositeweighted scoreComposite score (0-1)

3. Evaluation → Optimization Loop

Golden Data
    │
    ▼
Evaluate (intent + severity + risk + SAG)
    │
    ▼
Diagnose (which cases failed? what is the pattern?)
    │
    ├─→ Rule Fix (keyword/threshold adjustment)
    ├─→ ML Fix (FastText retraining)
    ├─→ LLM Fix (rule mutation suggestions)
    │
    ▼
Verify (full regression test)
    │
    ├─→ Pass → Apply
    └─→ Fail → Rollback
    │
    ▼
Record (evaluation results persisted to JSON)
    │
    └─→ Next optimization round (resume with --resume)

4. Full Data Flow

┌──────────────────────────────────────────────────────────────┐
│                    User Request                                │
└──────────────────────┬───────────────────────────────────────┘
                       │
                       ▼
┌──────────────────────────────────────────────────────────────┐
│  SAG Retrieval (RAG)                                         │
│  ├─ Structural Recall (entity matching + expansion)          │
│  ├─ Vector Recall (embedding cosine)                         │
│  ├─ Fusion (both_boost)                                      │
│  └─ Thompson Sampling ranking                                │
└──────────────────────┬───────────────────────────────────────┘
                       │ top-k skills
                       ▼
┌──────────────────────────────────────────────────────────────┐
│  Skill Injection (SAG)                                       │
│  ├─ principle → behavioral guidance                          │
│  ├─ common_mistakes → negative guidance                      │
│  └─ when_to_apply → context matching                         │
└──────────────────────┬───────────────────────────────────────┘
                       │ augmented prompt
                       ▼
┌──────────────────────────────────────────────────────────────┐
│  LLM Generation + Task Execution                            │
└──────────────────────┬───────────────────────────────────────┘
                       │ outcome
                       ▼
┌──────────────────────────────────────────────────────────────┐
│  Feedback Loop                                                │
│  ├─ .usage.json (success_rate updates)                        │
│  ├─ failure_log.jsonl (failure records)                       │
│  ├─ compound.sh reflect (reflection judgment)                 │
│  └─ skill evolution (failure-driven evolution)                │
└──────────────────────┬───────────────────────────────────────┘
                       │
                       ▼
┌──────────────────────────────────────────────────────────────┐
│  Auto-Evaluation Pipeline                                     │
│  ├─ Golden data matching                                     │
│  ├─ Intent/Severity/Risk/SAG evaluation                      │
│  ├─ Diagnose → Fix → Verify → Apply                          │
│  └─ Optimizers (Rules → FastText → NSGA-II → LLM)           │
└──────────────────────────────────────────────────────────────┘