---
title: "GPT-6.1 Sol on Pydantic AI Geo Analyst"
description: "Spatial questions and SVG maps from raw earthquake, fire and place data in DuckDB. Tool calling 100%, code mode 100%; rank 1 of 20."
canonical: https://models.pydantic.dev/models/gpt-6.1-sol/geo_analyst/
---

# GPT-6.1 Sol on Pydantic AI Geo Analyst

> Spatial questions and SVG maps from raw earthquake, fire and place data in DuckDB. Tool calling 100%, code mode 100%; rank 1 of 20.
>
> Markdown copy of https://models.pydantic.dev/models/gpt-6.1-sol/geo_analyst/. Index for agents: https://models.pydantic.dev/llms.txt

**Agents: use the API for model information.** It answers a question in one request, where the pages need several.

- Choose a model for an agent: `POST https://models.pydantic.dev/api/select` with a JSON body such as `{"description": "what the agent does"}`. It returns up to five ranked models with reasons. Format: https://models.pydantic.dev/select.md
- Search models by name: `GET https://models.pydantic.dev/api/search?query=<text>`
- List, filter and sort models: `GET https://models.pydantic.dev/api/models`, for example `?weights=open&max_price=2&sort=efficiency`
- One model in full: `GET https://models.pydantic.dev/api/models/<slug>`

Add `intent=<intent>&stack=<stack>&harness=<harness>` to the query string of the first three. An `OPTIONS` request to any endpoint returns its schema. The same four are tools of the MCP server at `https://models.pydantic.dev/mcp`. More: https://models.pydantic.dev/usage.md

About the benchmark: https://models.pydantic.dev/benchmarks/geo_analyst.md. The model on every Pydantic AI benchmark: https://models.pydantic.dev/models/gpt-6.1-sol.md

| Mode         | Score | Tasks passed | Cost  | Requests | Tool calls | Time    |
| ------------ | ----- | ------------ | ----- | -------- | ---------- | ------- |
| Tool calling | 100%  | 10 of 10     | $0.40 | 61       | 59         | 7.5 min |

Each task was run once per mode.

## Review

Written by an LLM from the runs' transcripts.

#### Overall

The model passed all 20 runs: 10 cases each in tools and code mode. Totals were similar across modes. Tools used 61 requests for $0.396, and code mode used 60 requests for $0.247. Almost all of that cost gap comes from one case, `pair_map_hypo`. No failures had a root cause recorded.

#### Where it does well

- **Reads DATA.md first and applies its conventions.** In every case it used the event class `k='T'`, magnitudes in hundredths, depth `z` in metres, the VIIRS satellites VJ1/VJ2, and excluded place kinds S/H/Q.
- **Geodesy.**
  - It used 3D hypocentral chord distances in `b_only_hypo`, `exposed` and `pair_map_hypo`.
  - It used orthonormal great-circle projections in `cross_section`.
  - It handled the antimeridian correctly in `pair_map_hypo`.
  - It picked the Alaska Anchorage over the Kentucky one in `b_gof`.
- **Numerically careful SQL.**
  - It rounded half-up with integers in `b_gof` and compared squared thresholds instead of taking square roots in `exposed`.
  - It used half-open time windows in `deep_moment` and `mato_grosso`.
  - It converted to local time with DST awareness in `local_night`.
- **Scalable approaches.**
  - In `brazil_nn` it used bounding-box nearest-neighbour searches with a safety check.
  - In `world_clusters` it used grid-bucket joins and recursive or label-propagation connected components across 680,723 detections.
- **Short runs.** Simple counts took only 3–4 requests.

#### Mistakes it makes

- **Unverified assumptions.** DATA.md output was often truncated. The model then relied on conventions that never appear in the transcript, or hardcoded values without checking them:

  - units and codes in `deep_moment`, `mato_grosso`, `exposed` and tools `world_clusters`
  - overlap-window bounds in both `b_only_hypo` runs and code `pair_map_hypo`

  The answers were correct, but the reviewers flagged some runs as "partly lucky".

- **Small syntax slips.**

  - It used the reserved word `by` as an alias in tools `cross_section` and tools `world_clusters`.
  - It left an extra parenthesis in code `pair_map_hypo`.

- **Multi-statement `run_sql` calls hid intermediate output** in tools `brazil_nn` and tools `local_night`.

- **Brute-force first attempts hit 30 s timeouts** in code `local_night` and code `world_clusters`.

- **Unrequested extra work.** In `pair_map_hypo` it built a coastline or basemap in both modes. In tools mode it also skipped writing a general greedy matcher, relying on there being no conflicting pairs.

#### Tool calling compared with code mode

|                                | Tools  | Code mode |
| ------------------------------ | ------ | --------- |
| Pass rate                      | 10/10  | 10/10     |
| Requests                       | 61     | 60        |
| Cost                           | $0.396 | $0.247    |
| Cost excluding `pair_map_hypo` | $0.177 | $0.204    |

- **Cost per case:** Tools was cheaper in 8 of the 10 cases.
- **`pair_map_hypo`:** Code mode clearly did better: 9 requests for $0.043, against 13 requests for $0.219 in tools mode, where the model copied coastline paths by hand.
- **Request counts:** Code mode used fewer requests in 5 cases and more in `local_night` (7 vs 6) and `world_clusters` (14 vs 7). Both of those increases came from timeouts.
- **Recommendation:** Accuracy is the same in both modes. Code mode is the safer choice for long, output-heavy tasks. Tools mode is slightly cheaper for routine queries.

## Runs

### deep_moment

**Tool calling: passed.** The agent read DATA.md and ran one DuckDB query on quakes_a.jsonl filtering class T, magnitude code 3, m >= 500, z < -70000 and a 1–15 November UTC window. It returned 7, which matches the expected answer. ($0.011, 4 requests, 9 s)
- Right: It read DATA.md before querying, including a second read of lines 60+ that held the magnitude-scale and event-class code tables.
- Right: It limited the count to earthquakes (k = 'T') and moment magnitude (mk = 3), following the documented conventions.
- Right: It used a half-open date window, >= 1 Nov and < 16 Nov, so all of 15 November was included.
- Right: It answered with a single query and no wasted calls.
- Mistake: The visible transcript shows the first read of DATA.md truncated ("[3070 more characters]"), and the part describing quakes_a units (m as 0.01-magnitude integers, z in metres with negative meaning below sea level) is not shown. So it cannot be confirmed here that the agent saw those units before scaling the thresholds to m >= 500 and z < -70000. The correct result suggests it read them correctly.
- Mistake: It assumed the field t casts directly to TIMESTAMPTZ and did not check the timestamp format or time zone in the sample data. This worked, but it was not verified.

### mato_grosso

**Tool calling: passed.** The agent read DATA.md, ran a single DuckDB query joining fires.parquet to the Mato Grosso polygon in regions.tsv, filtered to high-confidence detections in the 21 November 2026 UTC day window, got 5, and submitted {"count": 5}, which matched the expected answer. ($0.011, 4 requests, 11 s)
- Right: Read /data/DATA.md before querying, including a second call at line 61 to get the fire-detection section.
- Right: Answered with one point-in-polygon query: ST_Covers on the regions.tsv WKT for country='BRA' AND name='Mato Grosso', with cls='H' and an epoch range for 21 November.
- Right: Used a half-open time interval (>= 21 Nov 00:00, < 22 Nov 00:00), which avoids double-counting at the day boundary.
- Right: Used ST_Covers rather than ST_Contains, so detections exactly on the border are kept.
- Mistake: The visible transcript cuts off the fires section of DATA.md ('6598 more characters'). Nothing shown confirms the column names (cls, t, wkt), the 'H' confidence code, whether 'day' means UTC or local time, or whether duplicate detections across the four satellites need handling. The agent ran no schema check or sanity query, so its correctness depends on having read those conventions properly.
- Mistake: It did not cross-check the result, for example by counting rows without the class filter or confirming that exactly one regions.tsv row matched Mato Grosso. A cheap check like this would have caught a silent mismatch.

### b_only_hypo

**Tool calling: passed.** The agent read DATA.md, loaded catalogue A (9,566 events) and catalogue B (839 events), and parsed B's year-day dates and hemisphere-suffixed coordinates. It limited B to events with magnitude 4.5 or more inside an overlap window, then counted those with no A event within ±30 s and a 3D hypocentral distance of 50 km or less. The result was 36, which matches the expected answer. ($0.015, 4 requests, 18 s)
- Right: Read DATA.md first and followed its conventions: A's z in metres (converted to km and added to the Earth radius) and B's depth subtracted from the radius.
- Right: Parsed B's '%Y-%j' day plus seconds-of-day time format and the N/S/E/W coordinate suffixes correctly.
- Right: Used a true 3D hypocentral distance (chord law of cosines in radius/haversine form) rather than epicentral distance alone.
- Right: Restricted the count to the overlap period of the two catalogues.
- Right: Did not filter A by event class, which matches 'any class' in the question.
- Right: Finished efficiently in just three SQL calls.
- Mistake: The overlap window bounds (2026-10-26 16:00 to 2026-11-25 15:36 UTC) were hardcoded without a query showing where they came from. They presumably came from the part of DATA.md cut off in the shown output, but this is not visible, so the window is unverified in the transcript.
- Mistake: The window was applied only to B events. B events within 30 s of the window edges could have matched A events just outside it, but A was not filtered, so this is only a minor boundary point.

### local_night

**Tool calling: passed.** The agent read DATA.md and loaded catalogue A and places. It kept class-T events with m>=250 (1804 events) and populated places excluding kinds S/H/Q. It found each quake's nearest place by maximising the 3D unit-vector dot product, converted the timestamps to that place's time zone and counted local hours >=20 or \<6, getting 787, which matches the expected answer. ($0.015, 6 requests, 22 s)
- Right: Read DATA.md first and applied its conventions: earthquakes are class 'T', and magnitude is stored in hundredths (m>=250 means 2.5).
- Right: Excluded non-settlement place kinds (S, H, Q) before searching for the nearest settlement.
- Right: Found the nearest place by maximising the dot product of 3D unit vectors, which gives the same ordering as great-circle distance and avoids planar-distance errors.
- Right: Used timezone(tz, t) on the TIMESTAMPTZ column to get local civil time, which handles DST correctly, and applied the night window as hour >=20 OR hour \<6.
- Right: Finished in few calls: the whole computation ran in one query.
- Mistake: Its first run_sql call joined several statements, so only the DESCRIBE output came back and it had to rerun the count query. This was a small waste of one call.
- Mistake: The nearest-place search is a brute-force correlated subquery over 162k places for each of 1804 quakes. It worked, but it is inefficient.
- Mistake: The transcript only shows the first 60 lines of DATA.md before the jump to line 60 onward, so it is not visible whether the place 'kind' exclusions were checked against the documented codes. The result was still correct.

### brazil_nn

**Tool calling: passed.** The agent read DATA.md and loaded Brazilian regions, places with pop >= 10,000 (excluding certain kinds) and VIIRS fires (VJ1/VJ2) in DuckDB. It then spatially joined the fires to regions and computed haversine nearest-settlement distances, using a 2-degree bounding-box pass with an exact fallback, and returned medians that match the expected answer for all 27 divisions. ($0.025, 6 requests, 34 s)
- Right: Read DATA.md before loading anything and applied the filters it describes: VIIRS satellites VJ1/VJ2, pop>=10000, and excluding non-settlement kinds S/H/Q.
- Right: Used ST_Covers for point-in-polygon assignment to the 27 BRA regions.
- Right: Made the nearest-neighbour search efficient with a 2-degree expanded-box join. It then checked which results might be wrong (no candidate, or nearest distance at least the box's guaranteed radius) and recomputed those 458 fires exactly with a CROSS JOIN against all settlements.
- Right: Used DuckDB median, which averages the two middle values for even counts as required, and rounded to 1 decimal.
- Right: Completed in just five tool calls.
- Mistake: The third run_sql call bundled several statements, so only the final SELECT's output came back. The intermediate count/max check was never seen; this was minor and did not change the result.

### exposed

**Tool calling: passed.** The agent read DATA.md, loaded places and catalogue A, and ran one SQL join. The join used a squared 3D chord distance to the hypocentre, depth z in metres and magnitude m in hundredths, with the threshold squared as 10^(m/100-1.4). It returned 23 place ids that match the expected answer exactly. ($0.014, 5 requests, 19 s)
- Right: Read DATA.md before querying, including the second chunk with the magnitude, event-class and place-kind codes.
- Right: Kept only class 'T' events, since the data dictionary defines an earthquake as class T in both catalogues.
- Right: Measured to the hypocentre rather than the epicentre with a correct 3D chord formula, d² = dz² + 4R(R+z)·hav, with depth converted from metres to km.
- Right: Converted the magnitude scaling (m/100) and squared the threshold to avoid a sqrt: (10^(0.5M-0.7))² = 10^(M-1.4).
- Right: Applied pop >= 500000, excluded non-settlement place kinds, and used DISTINCT to avoid duplicate ids.
- Right: Efficient: finished in a few calls.
- Mistake: The transcript shows no check of the units or encodings it relied on (z in metres, m in hundredths, excluded kinds S/H/Q). It presumably took them from the truncated parts of DATA.md, so these were not independently verified, though the result was correct.

### b_gof

**Tool calling: passed.** The agent read DATA.md and found Anchorage, Alaska (61.218, -149.900). It filtered catalogue A to local-magnitude events within 300 km using haversine and rounded the magnitudes as integer tenths with half-up flooring. It then ran the goodness-of-fit Mc search in one SQL query and got Mc=2.0 with b=1.152, which matches the expected answer. ($0.017, 5 requests, 20 s)
- Right: Picked the Alaska Anchorage (America/Anchorage tz) over the Kentucky one with the same name.
- Right: Rounded with integer tenths, floor((m+5)/10), which gives half-up rounding without floating-point trouble.
- Right: Took candidates from the lowest rounded magnitude upward and used a LEFT JOIN with coalesce so magnitude bins with no events count as 0 observed.
- Right: Computed a, b, the predicted bin counts and R exactly as the formulas in the task state, then took the lowest candidate with R >= 85 (Mc=2.0, b=1.152134).
- Mistake: The transcript does not show the filters k='T' AND mk=1 being checked against DATA.md; the text there was truncated. They presumably encode event type and the local-magnitude type, and the correct answer suggests they were right.
- Mistake: Only rows with R >= 85 were printed, so the output does not show that no candidate below 2.0 also qualified. The ORDER BY mc LIMIT does ensure 2.0 is the lowest qualifying candidate.

### world_clusters

**Tool calling: passed.** The agent filtered the fires to VIIRS satellites (VJ1, VJ2) and projected points to 3D Cartesian coordinates. It built 1 km / 12 h edges using a 1 km grid-bucket join, found connected components with a recursive CTE, and reported the 45 clusters of 300 or more detections. All 45 match the expected answer, so the run passed. ($0.030, 7 requests, 49 s)
- Right: Read DATA.md first and filtered to VIIRS satellites VJ1/VJ2, giving 680,723 detections.
- Right: Used an efficient spatial bucketing scheme: 3D unit-km cells with a 27-neighbour join, which avoids an O(n^2) pair search.
- Right: Used the exact chord distance equivalent to a 1 km great-circle distance (12742\*sin(1/12742)).
- Right: Applied the 12-hour time window as abs(t diff) \<= 43200 s, treating t as seconds.
- Right: Converted frp_kw to MW (/1000) and rounded to one decimal place.
- Right: Used a recursive CTE with USING KEY for connected-component labelling, which worked in one pass and gave 221,298 components.
- Mistake: A minor parser error from using the reserved word `by` as an alias cost one extra call.
- Mistake: The agent assumed t was in seconds and that frp_kw needed /1000 without visibly checking DATA.md beyond the first 200 lines. The result was correct, but the units were not verified in the transcript.

### cross_section

**Tool calling: passed.** The agent read DATA.md and loaded catalogue A. In a single SQL query it projected tectonic events that have a magnitude onto the great-circle section using 3D vector math, then wrote an SVG with 25 circles. These matched the expected ids and coordinates exactly, and the run passed. ($0.040, 7 requests, 44 s)
- Right: Read DATA.md and applied its conventions: kept only class k='T' events with a non-null magnitude, and treated z as metres (divided by 1000 for km).
- Right: Used a correct spherical projection: the along-track angle came from atan2 against an orthonormal basis, and the cross-track distance from asin of the dot product with the pole vector, times 6371 km.
- Right: Filtered on along BETWEEN 0 AND arc and cross distance \<= 150 km, which produced exactly the expected 25 events.
- Right: The SVG met every format requirement: width and height attributes set, circles of radius 4, data-id only on the circles, and coordinates matching the expected answer to 3 decimals.
- Mistake: The first run_sql failed because `by` was used as a column alias and it is a reserved word. The agent fixed it right away by renaming it to b_y, so only one call was lost.

### pair_map_hypo

**Tool calling: passed.** The agent loaded both catalogues and filtered them to the overlapping period and the antimeridian-crossing box. It built 67 candidate pairs with distinct endpoints, so all were accepted, then computed great-circle midpoints and projected 158 features (67 pairs, 67 unmatched A, 24 unmatched B M4.5+). It wrote an SVG with a coastline backdrop and its features matched the expected coordinates; the run passed. ($0.22, 13 requests, 3.7 min)
- Right: Read DATA.md first and decoded both formats correctly: A depth as -z/1000 and magnitude as m/100; B as year-day plus seconds with N/S/E/W hemisphere suffixes.
- Right: Applied the overlap window (catalogue A start 26 Oct 16:00 to 25 Nov 15:36) and k='T' filtering, which reproduced the expected feature set exactly.
- Right: Handled the antimeridian correctly in both the selection (lon>=160 OR lon\<=-170) and the projection (adding 360 to negative longitudes, x=(lon-160)\*30).
- Right: Computed hypocentral distance from Earth-centred Cartesian coordinates at radius 6371-depth, and the pair midpoint from the vector sum, so it is a proper great-circle midpoint.
- Right: Checked count(DISTINCT aid/bid) = 67 = count of candidates, which showed the greedy step was trivially satisfied.
- Right: Circle coordinates match the expected answer (e.g. us6000uc4v at 336.978, 440.988), and only the circles carry data-id.
- Mistake: It never implemented the greedy one-to-one acceptance in general; it relied on the observation that no event appears in two candidate pairs. That is valid here but would not generalise.
- Mistake: It spent several calls on the optional coastline layer (ST_Affine, simplification, chunked printing of path strings to copy by hand into write_file), which the task did not require and which risked output errors.
- Mistake: The timestamp filter mixed TIMESTAMPTZ for catalogue A with a naive TIMESTAMP for catalogue B; this worked, but only because the session timezone was presumably UTC.
