Compare prompts, not code — the exercise is a prompt exercise, and a "solution" here is a prompt that names everything the agent would otherwise have to guess. Read yours against this one and ask: what did I leave to chance?

The table prompt

"Show me a table of all resorts with their total season visitors and revenue, sorted by revenue."

Three decisions, all in one sentence: the columns (visitors, revenue), the aggregation (totals per resort), the order (by revenue). The canonical answer groups by resort, sums, sorts descending, and hands the finished rows to a DataGrid — press Run to see exactly the table that prompt buys:

Notice what sorting by revenue — not footfall — surfaces: St. Moritz out-earns Verbier on fewer visitors. A vaguer ask ("show me the resort data") would have gotten you a 20-row dump and none of that insight.

Why the vague ask fails

Every slot you leave open, the agent fills with a guess. "Show me the resort data" leaves all three open — so you get whatever grouping, whatever columns, whatever order the agent happens to pick, and the interesting fact stays buried. The precise ask costs one sentence and buys a table you can read at a glance.


← Back to the exercises · Module 1

Reconnecting…
The connection to the server was interrupted. Trying to restore it…
Trying again…
The connection could not be restored. Reloading the page…
The server was updated. Reloading the page to pick up the latest version.