Turn two rows of operational data into a transparent calculation. This guide is for someone who can review counts and formulas. Complete the workflow setup first: Sonny 0.12.7 on Linux, a configured model and review-work.yaml. Python 3 is needed only for the independent arithmetic check.

Keep the input small and explicit

The entire synthetic dataset is:

week,requests,within_one_day
1,40,30
2,50,35

within_one_day counts requests answered within a day; it is a subset of requests. The fixture contains no case types, customer satisfaction, missing values or personal records. Preserve the source counts when deriving a result.

Request the table and interpretation

The complete analysis prompt includes that CSV, so no file-reading tool is needed:

curl --fail --location https://sonny.sh/examples/cookbook/analysis.txt --output analysis.txt
sonny run --file ./review-work.yaml --new --no-tools --no-trace --prompt "$(cat analysis.txt)"

This creates a fresh session and sends only the supplied text and instructions to the configured model. Tools are disabled; this command does not run a spreadsheet, query a database or change a source file. Provider usage and local history still apply. Expect a table, formulas and a short interpretation, not an external report or a changed dataset.

Reproduce the arithmetic independently

Download the CSV and the read-only checker . Inspect the small Python program, then run it:

curl --fail --location https://sonny.sh/examples/cookbook/pilot.csv --output pilot.csv
curl --fail --location https://sonny.sh/examples/cookbook/check-rates.py --output check-rates.py
python3 check-rates.py pilot.csv

This checker reads the named CSV, uses exact fractions internally and prints JSON. It does not call a model or write a file. Compare the result with the model’s table:

QuantityFormulaChecked result
Week 1 rate30 / 4075%
Week 2 rate35 / 5070%
Percentage-point change70 − 75−5
Combined rate(30 + 35) / (40 + 50)65/90, approximately 72.2%

The unweighted average, 72.5%, gives the two differently sized weeks equal weight. It is not the combined rate. Keep the exact total 65/90 alongside a rounded percentage. Neither the lower rate nor the larger request count establishes a cause or a satisfaction result.

Handle invalid inputs and failures

The checker refuses missing/wrong columns, a row count other than two, non-integer counts, non-positive request totals, or an answered count outside zero through total requests. To see that boundary, make a separate CSV copy with within_one_day greater than requests: the checker must exit with an error, not print a plausible rate. Keep pilot.csv unchanged.

If the model disagrees with the independently checked values, correct the draft and record the calculation. A model response is not the arithmetic authority. If Sonny fails before responding, inspect the configured category, account and diagnostic ; do not substitute an imagined analysis.

For larger data, configure a suitable approved data tool and restrict its input scope. Record filters, missing-value decisions and transformations, preserve the source, and write derived outputs separately. This example qualifies a pasted CSV and a local checker, not access to an arbitrary database or spreadsheet. Next, export a reviewed brief or prepare proposed actions .