IDD#
Instruction quality scoring using the Intent-Driven Development rubric.
inspect_coco.idd
#
IDD (Intent-Driven Development) instruction scoring.
IDDScore(total, goal, requirements, constraints, output, ambiguity_count, specificity)
dataclass
#
Composite IDD score with per-criterion breakdown.
score_instruction(text)
#
Score an instruction.md against IDD criteria.
Performs heuristic analysis (no LLM call) checking for the presence of Goal, Requirements, Constraints, and Output/Success criteria.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text
|
str
|
The instruction markdown content. |
required |
Returns:
| Type | Description |
|---|---|
IDDScore
|
IDDScore with 0.0-1.0 total and per-criterion breakdown. |
Source code in src/inspect_coco/idd/scorer.py
explain_score(score, threshold=0.6)
#
Generate explanatory teaching feedback for an IDD score.
Produces per-criterion feedback showing what's present, what's missing, and concrete suggestions for improvement. Designed to teach users how to write better instructions through use.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
score
|
IDDScore
|
The IDDScore to explain. |
required |
threshold
|
float
|
The passing threshold for display purposes. |
0.6
|
Returns:
| Type | Description |
|---|---|
str
|
Formatted string with explanatory feedback. |