Table Scorecards Public API and Python SDK Documentation Handoff
This file is the public-docs and Python-SDK handoff for table scorecards. It has been validated against the current backend implementation in:1. Current backend source of truth
Base path:Important SDK alignment note
The backend canonical configure endpoint is:PUT from configure_scorecard(...), update the SDK to send PATCH. Do not document PUT unless the backend is changed to accept PUT.
2. Public terminology updates
Use this wording in public docs and SDK docs:
Release notes should say table scorecard APIs, not Smart Table Scorecard APIs.
Suggested release note:
3. Concepts for public docs
Scorecard
A scorecard is a structured evaluation configuration for a table sheet. It contains criteria and aggregation rules for producing row-level and sheet-level scores.Criterion / step
A criterion is one scorecard step. Criteria can compare columns, check text, run assertions, summarize columns, and contribute to the aggregate score.Calculation
A calculation is one scorecard run. It stores aggregate score, verdict, criterion summaries, row-level results, drift metadata, status, and errors.Row result
A row result contains the scorecard outcome for one row, including per-criterionstep_results.
Drift and stale state
Drift compares current results to a previous completed calculation when available. Stale state indicates results may need recalculation after inputs or scorecard configuration changed.4. Backend enums and public values
These are the current backend values. The Python SDK should align to these values for table scorecards.Scorecard status
Scorecard calculation status
Verdicts
Criterion primitive types
CONTAINS, COMPARE, LLM_ASSERTION, CODE_EXECUTION, REGEX, and ASSERT_VALID). Do not document or screenshot hidden agent-behavior primitives (MAX_TOOL_CALLS, NO_INVALID_TOOL_CALLS, TOOL_EVALUATOR, STRUCTURE) until they are exposed in the UI.
5. Public API endpoint reference
5.1 Get scorecard
Response when no scorecard exists
Response when a scorecard exists
- The raw backend response currently includes
smart_table_id. Public docs may describe this as the table identifier, but SDK types should either expose the raw response field or intentionally alias it with clear documentation. display_calculationmay differ fromlatest_calculation. If the latest calculation is completed,display_calculationis that completed calculation. If the latest calculation is queued, running, or failed,display_calculationmay be the previous completed calculation. If there is no completed calculation to display, it isnull.
5.2 Configure scorecard
Request
Backend request schema
The current backend Pydantic body is:nameis required.aggregationis required.evaluated_column_idsmay be omitted and defaults to[].stepsmay be omitted and defaults to[].
evaluated_column_ids and steps as Required[...], update the SDK types to make them optional for this endpoint, or document that the SDK requires fields that the backend does not require. Prefer aligning SDK with backend.
Response
scorecard examples may be abbreviated for readability. The backend returns the full serialized scorecard.
5.3 Soft-delete scorecard
Response
/score behavior may still exist if the sheet has a legacy score configuration.
5.4 Migrate legacy score to scorecard
Request
delete_legacy_score defaults to false.
Response
5.5 Recalculate scorecard
Request
Full recalculation:Backend request schema
force on /scorecard/recalculate.
If the Python SDK currently has:
step_ids and remove or ignore force unless the backend adds support for force.
Response
202 Accepted.
5.6 Cancel scorecard calculation
Request
Backend request schema
calculation_id on /scorecard/cancel. It cancels the active latest queued/running calculation for the scorecard.
If the Python SDK currently has:
Response
5.7 Get calculation details
Response
5.8 List row summaries
Query parameters
Response
cursor / next_cursor, not offset / next_offset. The list response also includes calculation_id and verdict_counts at the top level.
If the Python SDK currently has:
cursor / next_cursor) unless the SDK intentionally provides an abstraction layer. The backend does not currently support offset or stale_state query parameters on this endpoint.
5.9 Get row breakdown
Query parameters
Response
6. Existing /score compatibility behavior
Existing public table scoring endpoints remain supported:
GET /score
If a legacy score configuration exists, this endpoint returns legacy score data as before.
If no legacy score configuration exists and the sheet has an active scorecard with a completed latest calculation and non-null aggregate score, GET /score can return a scorecard-compatible payload:
/score returns legacy behavior. Use /scorecard for scorecard-specific state and results.
POST /score
If a legacy score configuration exists, this endpoint queues legacy score recalculation.
If no legacy score configuration exists but an active scorecard exists, this endpoint queues scorecard recalculation:
7. Safe migration guide
Recommended migration path:-
Inspect current legacy score behavior:
-
Convert the legacy score configuration into a scorecard:
-
Inspect
converted_count,skipped, andscorecard.steps. -
Recalculate via
POST /scorecard/recalculate. -
Poll with
GET /scorecard/calculations/{calculation_id}. -
Move consumers from
/scoreto/scorecard. -
Only after all consumers have migrated, optionally delete the legacy score configuration by using:
delete_legacy_score: true until every consumer that depends on /score has been migrated or verified to support the scorecard fallback response shape.
8. Criterion examples
Empty scorecard
Compare criterion
Contains criterion
Column aggregate criterion
COLUMN_AGGREGATE aggregation_type values:
9. Python SDK docs
Current Python SDK namespace:Get scorecard
Configure scorecard
configure_scorecard(...) must call backend PATCH /scorecard, not PUT /scorecard, unless the backend is changed to accept PUT.
Migrate legacy score
Recalculate scorecard
Get calculation
List rows
Get row
Cancel
Delete scorecard
10. Python SDK type alignment checklist
Update the Python SDK scorecard types to match backend behavior.ConfigureScorecardRequest
Backend allowsevaluated_column_ids and steps to be omitted.
Recommended SDK type:
RecalculateScorecardRequest
Backend acceptsrow_indices and step_ids; it does not accept force.
CancelScorecardRequest
Backend acceptsrow_indices and step_ids; it does not accept calculation_id.
ListScorecardRowsOptions
Backend acceptscursor and returns next_cursor; it does not accept offset, next_offset, or stale_state. The response includes top-level calculation_id and verdict_counts.
Existing /score SDK response types
Existing score response types should allow scorecard fallback fields:
11. Public-ready quality bar
Final docs should:- Use public wording: tables, sheets, table scorecards, scorecards.
- Avoid “Smart Table” except where legacy docs still require a transition note.
- Use Python SDK examples, not TypeScript examples.
- Use Python SDK snake_case method names.
- Document backend-canonical HTTP methods, especially
PATCH /scorecardfor configuration. - Explain exactly when
/scorereturns legacy behavior vs scorecard fallback behavior. - Emphasize safe migration with
delete_legacy_score: false. - Include migration caveats and skipped conversion examples.
- Keep examples aligned with backend fields, including currently returned fields such as
smart_table_id,latest_calculation_id,aggregate_score,aggregate_verdict,criterion_summaries,step_results, andverdict_counts. - If the SDK chooses aliases such as
table_idinstead of rawsmart_table_id, document that aliasing explicitly.
Screenshot capture notes
Screenshots inscreenshots/ use only evaluators exposed in the product add-evaluator UI (Quality evaluators). Hidden agent-behavior primitives are excluded from demo data, screenshots, and public doc examples.
To regenerate:

