feat: Phase 11 — Component Diagnosis#28
Merged
Merged
Conversation
- Add diagnosis/ module with FailureMode enum (8 failure modes), BlameAttribution, ChunkingQualityAnalyzer, and DiagnosisAnalyzer orchestrator - Add exceptions/diagnosis.py with DiagnosisError, DiagnosisExecutionError, BlameAttributionError hierarchy - Add CLI command 'oaeval diagnose' for analyzing evaluation reports - Add 62 unit and integration tests for blame attribution, chunking analysis, and the full diagnosis pipeline - Blame attribution analyzes retrieval scores, generation scores, and context quality to determine which component (retrieval, generation, or chunking) caused failures - Chunking analyzer detects overlapping chunks, inconsistent sizes, empty chunks, and content gaps - DiagnosisReport includes blame summary, failure summary, chunking issues, and actionable recommendations
| from __future__ import annotations | ||
|
|
||
| from openagent_eval.diagnosis.analyzer import DiagnosisAnalyzer | ||
| from openagent_eval.diagnosis.models import BlameTarget, DiagnosisReport |
| import json | ||
| from pathlib import Path | ||
|
|
||
| import pytest |
Comment on lines
+17
to
+22
| from openagent_eval.diagnosis.models import ( | ||
| BlameTarget, | ||
| ComponentScores, | ||
| DiagnosisReport, | ||
| FailureMode, | ||
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements the Component Diagnosis system (Phase 11) that attributes blame when RAG evaluations fail — telling the user WHERE it failed: retrieval, generation, or chunking.
Motivation
90% of production RAG failures are retrieval problems, but teams don't know which component caused the failure. This module provides blame attribution with actionable recommendations, saving hours of guesswork.
Files Modified
New files:
Modified files:
Tests:
Architectural Decisions
Testing
Remaining TODOs