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

# GPT-6.2 Sol on Pydantic AI Geo Analyst

> Spatial questions and SVG maps from raw earthquake, fire and place data in DuckDB. Tool calling 90%, code mode 100%; rank 12 of 20.
>
> Markdown copy of https://models.pydantic.dev/models/gpt-6.2-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.2-sol.md

| Mode         | Score | Tasks passed | Cost  | Requests | Tool calls | Time    |
| ------------ | ----- | ------------ | ----- | -------- | ---------- | ------- |
| Tool calling | 90%   | 9 of 10      | $0.37 | 64       | 64         | 6.1 min |

Each task was run once per mode.

## Review

Written by an LLM from the runs' transcripts.

#### Overall

The model passed **19 of 20** runs: 9/10 with tool calling and 10/10 in code mode. Its only failure was `world_clusters` in tools mode, where the computation was correct but the final answer was copied wrongly. Combined, the runs used 125 requests and cost about $0.63.

#### Where it does well

- **It reads DATA.md first in every run** and applies the encoded conventions: `k='T'` for earthquakes, magnitudes stored ×100 (`m>=500`, `m>=250`), depth in signed metres, `mk` scale codes, and the excluded place kinds S/H/Q.
- **Its geometry is correct.** It used 3D hypocentral chord distances (`b_only_hypo`, `exposed`, `pair_map_hypo`), cross-track and along-track projection (`cross_section`), and the antimeridian box `lon>=160 OR lon<=-170` (`pair_map_hypo`).
- **It catches traps.** It chose Anchorage, Alaska over Kentucky (`b_gof`), used integer half-up rounding `floor((m+5)/10)`, and zero-filled empty magnitude bins.
- **It scales to large spatial joins.** It used grid-bucketed nearest-neighbour search with a fallback recheck (`brazil_nn`, 27/27 regions matched). It also found connected components over 680,723 detections (`world_clusters`).
- **It runs some sanity checks.** Examples include no double-assigned fires (93,791 rows = 93,791 distinct fids), no null time zones (`local_night`), and confirming the SVG holds exactly 158 data-ids.

#### Mistakes it makes

- **Transcription error.** In `world_clusters` (tools), it retyped 45 rows by hand and changed 1572 to 1576, which failed the run.
- **Unverified assumptions.** It often relied on DATA.md content that was truncated in the transcript and never checked encodings against sample rows (`deep_moment`, `exposed`, `mato_grosso`). It hardcoded the overlap end `2026-11-25 15:36` without querying the data, in both modes of `b_only_hypo` and `pair_map_hypo`.
- **Wasted calls on errors.** It hit DuckDB syntax and type errors: 3 failed attempts in `cross_section` (tools), an INT32 overflow and a column typo in `b_only_hypo`, and an `ST_PointN` error. In code mode it made Python slips: a SyntaxError (`b_gof`) and an undefined `q=run_sql` (`brazil_nn`).
- **Lost results from multi-statement batches.** Only the last statement's result came back, so the invalid-geometry check in `brazil_nn` was never seen in either mode.
- **Brute-force queries.** In `local_night` (tools), a brute-force cross join timed out. The retry dropped the tie-breaker, which made the result nondeterministic.

#### Tool calling compared with code mode

| Mode      | Passed | Requests | Cost   |
| --------- | ------ | -------- | ------ |
| tools     | 9/10   | 64       | $0.374 |
| code_mode | 10/10  | 61       | $0.255 |

Code mode was more accurate and about 32% cheaper. Most of the cost gap comes from `pair_map_hypo`: $0.163 with tools versus $0.054 in code mode. Without that case, the two modes cost about the same ($0.21 vs $0.20). Code mode was also clearly leaner on `cross_section`, with 4 requests and $0.019 versus 9 requests and $0.050. Both modes made similar small errors, but code mode avoided the copy error that failed `world_clusters`, so its output was more reliable to submit.

## Runs

### deep_moment

**Tool calling: passed.** The agent read DATA.md, ran a single DuckDB query on quakes_a.jsonl filtering class T, magnitude scale code 3, m>=500, z\<-70000 and UTC dates 1–15 November, got 7, and submitted {"count": 7}, which matched the expected answer. ($0.011, 4 requests, 7 s)
- Right: Read DATA.md before querying and applied its conventions: class 'T' for earthquakes and mk=3 for moment magnitude of any variant.
- Right: Treated the 1–15 November range as inclusive by using a half-open upper bound of < 2026-11-16 00:00 UTC.
- Right: Applied the scaled units correctly: m>=500 for magnitude 5.0 and z < -70000 for more than 70 km below sea level, which implies z is in metres and negative downward.
- Right: Answered with one query and no wasted calls.
- Mistake: The second read_text started at line 60, so the shortened transcript does not show the agent viewing the catalogue A key table. Its encoding assumptions (m×100, z in signed metres, t format) were not checked against sample rows. They proved correct, but the query also hard-cast m and z to INTEGER without inspecting the data first.

### mato_grosso

**Tool calling: passed.** The agent read DATA.md, then ran one spatial SQL query counting fire rows with cls='H' and t inside 21 November 2026 that fall within the Mato Grosso polygon from regions.tsv. It got 5, which matches the expected answer. ($0.010, 3 requests, 7 s)
- Right: Read DATA.md before writing any query.
- Right: Did the whole job in one query: filtered on cls='H' and an epoch time range for 21 Nov, then tested each point against the Mato Grosso polygon with ST_Intersects.
- Right: Filtered the region on both country='BRA' and name='Mato Grosso' so the right state polygon was used.
- Right: Used ST_Point(lon, lat), the correct coordinate order.
- Mistake: The transcript does not show the agent confirming from DATA.md how the confidence code is stored (cls='H') or what the t field's units and time zone are. It may have read this in the truncated part of DATA.md, but the transcript gives no evidence of it, so the result is partly unverified, if correct.

### b_only_hypo

**Tool calling: passed.** The agent read DATA.md, loaded both catalogues into DuckDB, and in one SQL query counted catalogue B events with magnitude 4.5 or more inside the overlap window that had no catalogue A event within ±30 s and within 50 km straight-line hypocentral distance. It answered 36, which matches the expected answer. ($0.025, 6 requests, 22 s)
- Right: Read DATA.md before querying, including the code tables for magnitude scales and event classes.
- Right: Computed a true 3-D hypocentral distance: the chord formula combines radius from depth with the great-circle angle, compared against 50² = 2500 km².
- Right: Did not filter catalogue A by event class, matching the question's 'event of any class'.
- Right: Converted B's hemisphere suffixes (N/S/E/W) into signed coordinates, and built B times from year-day plus seconds of day.
- Right: Limited B events to the period both catalogues cover rather than all of B, which starts 12 October.
- Right: Recovered quickly from the two SQL errors.
- Mistake: The first run_sql failed with an INT32 overflow because it multiplied seconds by 1,000,000 before building the interval. The second failed on a typo, writing column00 instead of column0. Together that is two wasted calls.
- Mistake: The overlap bounds were hardcoded as 2026-10-26 16:00 to 2026-11-25 15:36 without any visible query of the actual min/max times in each catalogue. They may come from the truncated part of DATA.md, but the transcript does not show where they came from.
- Mistake: It never sanity-checked the parsed data, for example row counts, time ranges, or the units and sign of A's depth z versus B's depth, before submitting the final query.

### local_night

**Tool calling: passed.** The agent read DATA.md and loaded catalogue A filtered to k='T' and m>=250 (magnitude stored in hundredths), 1804 events. It assigned each quake the time zone of the nearest populated place (excluding kinds S, H, Q) using a 3D unit-vector dot-product cross join, and counted events with local time from 20:00 up to but not including 06:00. Result 787, which matches the expected answer. ($0.016, 5 requests, 48 s)
- Right: Read DATA.md first and applied its conventions: magnitude in hundredths (m>=250), a kind filter k='T', and excluding certain place kinds.
- Right: Found the nearest place correctly by taking arg_max of the dot product of unit vectors, which is equivalent to great-circle distance.
- Right: Converted each instant to local time with timezone(tz, instant) and used the half-open night window (>=20:00 OR \<06:00).
- Right: Checked for duplicate IDs (1804 unique out of 1804) and for missing tz values (none) before computing.
- Mistake: The first nearest-place query timed out after 30 seconds because of the ORDER BY p.pid tie-breaker inside arg_max. The retry dropped it, so ties between equidistant places are broken arbitrarily. That probably made no difference here, but the result is no longer deterministic.
- Mistake: The 1804×162k cross join is brute force. It finished, but a spatial prefilter or index would have been safer against the time limit.

### brazil_nn

**Tool calling: passed.** The agent loaded the Brazilian regions, the VIIRS fires (VJ1/VJ2) inside a Brazil bounding box and the places with pop>=10000, excluding some kinds. It assigned fires to regions with ST_Intersects and computed nearest-place haversine distances using a 3-degree grid, with a widened fallback for distant fires. The submitted counts and medians match the expected answer for all 27 divisions. ($0.031, 10 requests, 38 s)
- Right: Read DATA.md before querying, which told it the satellite codes and the place-kind codes to exclude.
- Right: Applied the population threshold (pop>=10000) and searched places from any country, as the question asked.
- Right: Made the nearest-neighbour search efficient with a 3-degree grid join.
- Right: Rechecked fires whose grid-based nearest distance was >=250 km against a wider ±3.5° latitude band, so the grid could not miss a closer place.
- Right: Checked how many fires matched more than one region (93,791 rows and 93,791 distinct fids, so no double-assignment).
- Mistake: The run_sql batches returned only the last statement's result. The bounds/validity query had to be rerun, and the BRA-1294 ST_MakeValid count check never showed its result, so the invalid polygon was never verified.
- Mistake: The ±3.5° fallback band limited only latitude, not longitude. It was correct because it scanned every longitude, but it was not a tight bound and happened to be adequate.
- Mistake: Excluding place kinds S/H/Q depended on its reading of DATA.md conventions. That choice is not visible in the shortened output, but it matched the expected answer.

### exposed

**Tool calling: passed.** The agent read DATA.md, then ran a single DuckDB query that joined places of 500,000 or more people (excluding kinds S/H/Q) with catalogue A tectonic events. It computed the straight-line distance from each place to the hypocentre, accounting for depth, compared it with 10^(0.5M−0.7) km, and returned 23 place ids that match the expected answer. ($0.014, 4 requests, 10 s)
- Right: Read DATA.md before querying and applied its conventions: only class 'T' events count as earthquakes, the place kinds S/H/Q are excluded, and pid is read as VARCHAR so ids are not mangled.
- Right: Converted the units in the formula (pow(10, 0.005\*m - 0.7) and z/1000 for km), which suggests magnitude stored in hundredths and z in metres, per the dictionary.
- Right: Measured hypocentral distance as a 3D chord combining the haversine surface term with depth, not just epicentral distance.
- Right: Added a cheap pre-filter, abs(z/1000) < lim, before the full distance calculation, which keeps the cross join small.
- Right: Finished in one query and submitted the result directly, with no wasted calls.
- Mistake: The middle of DATA.md (the catalogue A field definitions, about 3,000 characters) was cut off in the first read_text result, and the agent never re-read those lines on its own; it skipped ahead to line 61. The unit choices turned out correct, but they were not visibly checked against the text.

### b_gof

**Tool calling: passed.** The agent read DATA.md, found the Alaska Anchorage record (pid 5879400) in places, and ran one DuckDB query that filtered catalogue A to local-magnitude events within 300 km, rounded the magnitudes half-up, and computed the goodness-of-fit R and b for every candidate Mc. It returned b = 1.152, which matches the expected answer. ($0.020, 4 requests, 11 s)
- Right: Told apart the two places named Anchorage (Kentucky with pop 2420 versus Alaska with pop 289600) and used the Alaska one.
- Right: Did the half-up rounding on integer tenths, floor((m+5)/10) with m apparently stored as an integer, which avoids floating-point rounding errors.
- Right: Built a full grid of magnitude bins with zero-filled gaps, so empty bins still count in both N and the residual sum.
- Right: Used the haversine formula with R=6371 km, computed b and a as specified, and finished everything in a single query.
- Mistake: The filter conditions q.k='T', q.mk=1 and the kind exclusion rest on DATA.md conventions that the shortened transcript does not show. They seem to have been right, given that the run passed.
- Mistake: The decisive rows of the output (the first Mc with R≥85) were cut off in the shown result, so the chosen Mc cannot be checked here. The agent could have filtered to R>=85 and returned only the first row, which would make the selection explicit.

### world_clusters

**Tool calling: failed.** The agent built a 3D grid-cell spatial join over the VIIRS detections, made edges for pairs within 1 km and 12 h, and found connected components with recursive SQL. Its query output matched the expected answer, but when it wrote final_result by hand it changed cluster 13634's count from 1572 to 1576, so the run failed. ($0.035, 9 requests, 37 s)
- Right: Read DATA.md and limited the data to the VIIRS satellites (VJ1, VJ2).
- Right: Used an efficient 3D-cartesian 1 km grid with the chord-length equivalent of 1 km great-circle distance, plus a time filter of 43200 s.
- Right: Found connected components in two stages: a parent forest, then label propagation on the remaining root-to-root edges. Every count and FRP total matched the expected values.
- Right: Converted FRP correctly from kW to MW.
- Mistake: In the final_result call the agent transcribed cluster 13634 as [1576, 14870.2], but the run_sql result just before it said 1572. This copy error is the most likely reason the run failed.
- Mistake: It retyped the 45 rows by hand instead of copying the query output exactly. It also did no sanity checks, such as confirming that the component labels covered every detection.

### cross_section

**Tool calling: passed.** The agent read DATA.md, computed the along-section and cross-track distances for catalogue A tectonic events with a magnitude in a single DuckDB query using 3D unit vectors, wrote 25 circles to /out/map.svg and replied 25. The run passed, and the ids and coordinates match the expected answer. ($0.050, 9 requests, 43 s)
- Right: Read DATA.md, including the code tables, and applied the earthquake definition (k='T') and the magnitude-present filter (m IS NOT NULL).
- Right: Used proper spherical geometry: the cross-track angle came from asin(p·n), and the along-track angle came from atan2 against the start point. The filters were 0 ≤ along ≤ span and cross_km ≤ 150.
- Right: Converted the stored depth units correctly (y = -z/1400) and clamped radii to 2–6 px. The cx/cy values match the expected answer to about 1e-3.
- Right: Put data-id only on the circles; the background, grid and label elements carry none.
- Mistake: Three SQL attempts failed on DuckDB syntax before one succeeded: list_cross_product does not exist, and the old lambda arrow syntax is deprecated.
- Mistake: One run_sql call held two statements, so only the last result (length_km) came back. The printf query had to be run again to get the circle markup.
- Mistake: The depth units and magnitude scaling (z/1400, m/100) were applied without a visible check of the raw values. They turned out correct, presumably based on DATA.md.

### pair_map_hypo

**Tool calling: passed.** The agent read DATA.md and loaded both catalogues in DuckDB, keeping class T events inside the common time window and the dateline-crossing box. It did greedy one-to-one matching with a recursive CTE, using 3D hypocentre distance, then computed great-circle midpoints and projected all positions to 900x900 pixels. It wrote an SVG with country polygons and 158 features, and the run passed. ($0.16, 10 requests, 2.3 min)
- Right: Read DATA.md before querying and used the overlap window starting 26 Oct (catalogue A's start).
- Right: Handled the box across the 180° meridian with lon>=160 OR lon\<=-170, and shifted negative longitudes by +360 when projecting.
- Right: Took the hypocentre distance as 3D Euclidean distance between depth-adjusted unit vectors (r = 6371 − depth), not just epicentral distance.
- Right: Computed the great-circle midpoint by summing the unit vectors, which matches the expected coordinates.
- Right: Did the greedy matching faithfully with a recursive CTE over candidates ordered by dt, distance, A id, B id.
- Right: Included only B events of magnitude 4.5 or more among the unmatched B features: 24 of them, matching the expected answer.
- Right: Clipped and simplified the country basemap with the antimeridian shift and gave it no data-id attributes.
- Mistake: Minor: the window end was hardcoded as '2026-11-25 15:36:00+00' rather than taken from the data; it did not affect the result.
- Mistake: Minor: the first basemap query failed with a ST_PointN type error that needed an extra call; the agent did not re-read or check the written SVG.
