Scoring¶
Deterministic gates and the audit record.
score
¶
Scoring a run: deterministic gates first, human or auditor judgement second.
Gates are computed in Python from the trace and cannot be negotiated with: did every node actually execute, did the evaluation node produce a valid number, did nodes that claim tool usage make verified tool calls, and were artifacts produced. A run that fails a gate scores 0.0.
compute_gates
¶
Computes all deterministic integrity gates against a completed run trace.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
trace
|
Trace
|
The completed Trace record. |
required |
workflow
|
Workflow
|
The Workflow specification that was executed. |
required |
Returns:
| Type | Description |
|---|---|
list[Gate]
|
A list of Gate results. |
Source code in python/src/science_adk/score.py
score_run
¶
Constructs the deterministic score structure for a completed run.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
trace
|
Trace
|
The completed Trace. |
required |
workflow
|
Workflow
|
The Workflow specification. |
required |
target_metric
|
str
|
The metric name being targeted. |
''
|
target_value
|
float | None
|
The target value threshold. |
None
|
Returns:
| Type | Description |
|---|---|
Score
|
A populated Score instance. |
Source code in python/src/science_adk/score.py
record_audit
¶
Records audit judgements and rationale onto a Score object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
score
|
Score
|
The target Score object to augment. |
required |
pillars
|
dict[str, float]
|
Dictionary mapping SCORE_PILLARS to scores in [0.0, 1.0]. |
required |
rationale
|
str
|
Written explanation supporting the evaluation. |
required |
Returns:
| Type | Description |
|---|---|
Score
|
The updated Score instance. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If pillars are unknown, missing, or rationale is empty. |
Source code in python/src/science_adk/score.py
summarize
¶
Generates a formatted human-readable summary string of the score verdict.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
score
|
Score
|
The Score object to summarize. |
required |
Returns:
| Type | Description |
|---|---|
str
|
Formatted multi-line summary string. |