scorecard_table()
Render a scorecard as a polished Great Table.
Usage
scorecard_table(source)Takes the output of EvalResults.to_scorecard() (a dict or JSON file) and produces a publication-ready table with color-coded score cells.
Parameters
source: str | Path | dict[str, Any]- Path to a scorecard JSON file, or a scorecard dict returned by EvalResults.to_scorecard().
Returns
gt.GT-
A formatted Great Table ready for display,
.save("file.html"), or embedding in a Quarto document.
Raises
ImportError- If great_tables or pandas is not installed.
Examples
From a file:
import talk_box as tb
table = tb.scorecard_table("scorecards/code_reviewer/2025-05-07.json")
table # renders in notebook / QuartoFrom an in-memory scorecard:
results = tb.eval_suite("code_reviewer", models=[...], judge=...)
table = tb.scorecard_table(results.to_scorecard())
table.save("scorecard.html")