---
title: "GLM 5.3 Flash on Pydantic AI Geo Analyst"
description: "Spatial questions and SVG maps from raw earthquake, fire and place data in DuckDB. Tool calling 70%, code mode 30%; rank 17 of 20."
canonical: https://models.pydantic.dev/models/glm-5.3-flash/geo_analyst/
---

# GLM 5.3 Flash on Pydantic AI Geo Analyst

> Spatial questions and SVG maps from raw earthquake, fire and place data in DuckDB. Tool calling 70%, code mode 30%; rank 17 of 20.
>
> Markdown copy of https://models.pydantic.dev/models/glm-5.3-flash/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/glm-5.3-flash.md

| Mode         | Score | Tasks passed | Cost  | Requests | Tool calls | Time     |
| ------------ | ----- | ------------ | ----- | -------- | ---------- | -------- |
| Tool calling | 70%   | 7 of 10      | $0.56 | 383      | 614        | 24.6 min |

Each task was run once per mode.

## Review

Written by an LLM from the runs' transcripts.

#### Overall

The model passed 10 of 20 runs across 10 benchmark cases: 7/10 with normal tool calling and 3/10 in code mode. It was strongest on spatial filtering and catalogue matching. A recurring failure was submitting an answer before computing the requested result—or failing to carry a verified result into the final response.

#### Where it does well

- Both modes passed `cross_section` and `pair_map_hypo`, writing SVGs with 25 and 158 features, respectively. The model handled antimeridian geometry and corrected an endpoint filter that initially admitted events beyond the cross-section.
- Normal tool calling correctly found 36 unmatched catalogue B events in `b_only_hypo` and selected the first qualifying magnitude threshold in `b_gof`, returning a b-value of 1.152.
- Code mode alone passed `brazil_nn`: all 27 division counts and medians matched, and all 120 sampled nearest-settlement distances agreed with a brute-force check.

#### Mistakes it makes

- It stopped one computation short. In `local_night`, normal tool calling found nearest-settlement candidates but never ran the local-time count, submitting 1,636 instead of 787. In `world_clusters`, it built and spot-checked 1,874,135 links but never computed connected components, returning no rows instead of 45.
- It lost correct results at submission. Code mode computed the correct `mato_grosso` count of 5 but submitted 1. In `exposed`, it computed all 23 expected IDs, then exhausted retries on unnecessary calls without returning them.
- Repeated reads of truncated documentation, SQL alias errors, and prose sent as Python consumed requests without advancing the calculation. Both modes also added methodology recaps when the map tasks asked only for a feature count.

#### Tool calling compared with code mode

Normal tool calling was more reliable on this benchmark, but used 383 requests at a total reported cost of 0.5614, versus 89 requests and 0.0857 for code mode. Code mode’s lower totals partly reflect early stops: four failures ended after four or fewer requests. Where both modes passed, code mode was more efficient: it used 11 requests for each map task, versus 26 for `cross_section` and 54 for `pair_map_hypo` with normal tool calling.

## Runs

### deep_moment

**Tool calling: passed.** The agent queried catalogue A and returned {"count": 7}, matching the expected answer. A row-level query also listed all seven qualifying events. ($0.019, 38 requests, 49 s)
- Right: The first read_text call targeted /data/DATA.md before any SQL query.
- Right: The successful run_sql count used k = 'T', mk = 3, m >= 500, and z < -70000, with a UTC window from 1 November inclusive to 16 November exclusive. This included events at magnitude 5.0 and excluded depths of exactly 70 km.
- Mistake: Before the first successful count, run_sql tried to read /tmp/nope, an unrelated path; DuckDB denied access.
- Mistake: Repeated read_text calls for the same ranges of /data/DATA.md returned truncated results. Requesting a smaller range around the catalogue A fields would have been more useful.
- Mistake: After run_sql returned 7 and a follow-up query listed the seven events, the agent continued to repeat list_files and read_text calls, reran the count, and issued broader diagnostic queries that did not change the answer.

### mato_grosso

**Tool calling: passed.** The agent used DuckDB to count high-confidence fire detections within Mato Grosso on 21 November 2026. It returned {"count": 5}, matching the expected answer, so the run passed. ($0.010, 19 requests, 39 s)
- Right: Called read_text on /data/DATA.md first and used run_sql to distinguish Mato Grosso (BRA-602) from Mato Grosso do Sul (BRA-600).
- Right: Filtered fires.parquet to cls='H' and the half-open UTC interval from 21 to 22 November, then used ST_Intersects with the state polygon and ST_Point(lon, lat). The query returned 5, and a later query listed all five detection IDs.
- Mistake: Repeated the same regions.tsv and places.psv previews and fires.parquet DESCRIBE call before the main query; the places data was not needed.
- Mistake: After the first spatial count already returned 5, several optional run_sql checks failed on malformed function names (elemTimESTAMP, elemAt01945, and ep och) or the invalid read_csv option headers=true. The agent also reran the count and made unrelated central-area and place-name checks before submitting.

### b_only_hypo

**Tool calling: passed.** The agent compared 442 magnitude-4.5-or-higher catalogue B events against catalogue A without a class filter, using UTC origin times and depth-aware hypocentre distances. It found 406 matches and returned the expected count of 36 unmatched events. ($0.033, 30 requests, 1.7 min)
- Right: Called read_text on /data/DATA.md first, then loaded both catalogues with run_sql and confirmed unique event IDs (9,566 in A and 839 in B).
- Right: Corrected B's day-of-year and seconds-of-day conversion, decoded hemisphere signs, and used A's signed vertical coordinate and B's positive depth in the 3D distance calculation.
- Right: Applied inclusive 30-second and 50-km thresholds to the same event pair, counted distinct matched B IDs, and verified the unmatched count with a second run_sql query.
- Mistake: The first timestamp-conversion query passed a VARCHAR to epoch() and omitted the conversion of the day-of-year offset to seconds; the corrected run_sql query added the day offset to a DATE before calling epoch().
- Mistake: The matching queries used rounded A coverage endpoints rather than the exact intersection of the catalogue timestamp ranges. This did not affect the answer: the 442 selected B events ranged from 2026-10-26 19:36:16.220 UTC to 2026-11-25 12:08:13.620 UTC, within the exact overlap.
- Mistake: The first matching query referenced c.mag without projecting mag in cand. Later boundary checks also failed on out-of-scope aliases and nonexistent c.lat\_/c.lon\_ columns; corrected queries ran successfully.
- Mistake: Repeated read_text and list_files calls and dozens of profiling queries added little after the data was loaded. The final run_sql call with 'PROCESS COMPLETE' was unnecessary and produced a parser error.

### local_night

**Tool calling: failed.** The agent identified 1,804 magnitude-eligible tectonic events and computed nearest-settlement candidates, but never ran the final local-time count. It submitted 1,636 without a supporting query result; the expected count was 787. ($0.12, 62 requests, 3.8 min)
- Right: Used run_sql to load catalogue A and the places file, then filtered for k='T' and m>=250, matching the documented event class and magnitude encoding.
- Right: Confirmed that t was a TIMESTAMP WITH TIME ZONE and tested DuckDB's timezone conversion with Asia/Kolkata, Pacific/Chatham, and America/St_Johns.
- Right: Used great-circle distances and an antimeridian-aware longitude filter, then broadened the search for 204 events and obtained global nearest-settlement results for the final three.
- Mistake: After the nearest-settlement queries, the agent did not combine the 1,600 first-pass matches, 201 second-pass matches, and three global fallback matches into one settlement time zone per event. It should have joined those assignments to eq25, converted ts with timezone(tz, ts), and counted local times >= 20:00 OR < 06:00.
- Mistake: The final_result call submitted 1,636 even though no preceding run_sql result counted events in the requested night window.
- Mistake: Repeated list_files and read_text calls returned the same inventory or truncated opening sections. The agent should have requested short, targeted excerpts for the settlement and distance conventions rather than repeatedly rereading the beginning. Several SQL calls also failed on missing column aliases or syntax before reaching the nearest-settlement results.

### brazil_nn

**Tool calling: failed.** The agent used DuckDB to assign 93,791 VIIRS detections to Brazil’s 27 first-level divisions and built a table of nearest-place distances. It submitted all 27 correct detection counts, but every reported median differed from the reference at one decimal place. ($0.027, 32 requests, 1.9 min)
- Right: The fire query selected both VIIRS satellites (`VJ1` and `VJ2`), and the `map` query assigned pixel centers to Brazilian divisions with `ST_Intersects`. The resulting table had 93,791 rows and 93,791 distinct detection IDs, and every division count matched the reference.
- Right: The distance search imposed no country-code filter and used a worldwide fallback for the 299 detections with no candidate in the initial search box.
- Mistake: After creating `nd`, the agent queried only its overall row count, non-null count, minimum, and maximum. No `run_sql` call in the transcript computes the per-division medians submitted to `final_result`. For example, it submitted 112.5 km for BRA-576 instead of 48.6 km, and 34.2 km for BRA-600 instead of 78.8 km. It should have verified the eligible place types against the complete data conventions, then run `SELECT rid, count(*), round(median(dmin), 1) FROM nd GROUP BY rid ORDER BY rid` on the verified distances and reported those results.
- Mistake: The `settle` query excluded `S`, `H`, and `Q`, but the relevant data-dictionary output was truncated and the transcript does not establish that this predicate matches the benchmark’s definition of a settlement. Rereading the same truncated lines did not verify it. The transcript does not establish whether this filter accounts for any of the median discrepancies.

### exposed

**Tool calling: passed.** The agent used DuckDB to compare 3D hypocentral distances against the magnitude-dependent cutoff and found 24 qualifying earthquake–settlement pairs across 13 earthquakes. It returned all 23 distinct place IDs, matching the expected set, so the run passed. ($0.026, 30 requests, 78 s)
- Right: Called read_text on /data/DATA.md before querying the data, then used catalogue A, filtered to tectonic events (k='T') with known magnitude, converted m/100.0 and -z/1000.0, and applied the population cutoff of 500,000.
- Right: Used a 3D chord distance that accounts for earthquake depth, compared it with the strict cutoff distance < power(10, 0.5\*mag - 0.7), and checked the result with a second chord formula. That check also confirmed the closest near miss, Shihezi, was outside the cutoff (44.8928 km versus 44.6684 km).
- Right: Returned each qualifying place ID once; numeric ordering differed from the expected ordering, but the ID set matched exactly.
- Mistake: The first run_sql count against the quakes table referenced m after it had been projected as mag, causing a BinderException. The retry used mag.
- Mistake: The first run_sql attempt to build hits used p.lat and p.lon without selecting those columns in the places CTE, causing a BinderException. The retry projected both coordinates as DOUBLE.
- Mistake: A later run_sql place lookup ended with stray closing characters after the IN list, causing a ParserException. The corrected lookup removed them.
- Mistake: Repeated list_files calls returned the same inventory, and many read_text calls returned the same truncated opening of DATA.md. Targeted line ranges would have been more useful for checking the remaining conventions.

### b_gof

**Tool calling: passed.** The agent filtered catalogue A for local-magnitude earthquakes within 300 km of Anchorage and found that Mc = 2.0 was the first candidate to reach the 85% fit threshold. It returned the correct b-value of 1.152, and the run passed. ($0.077, 59 requests, 1.9 min)
- Right: The `read_csv` lookup distinguished Anchorage, Alaska (61.21806, -149.90028) from Anchorage, Kentucky; the `run_sql` distance and catalogue filters retained 1,613 events.
- Right: The fit calculation included zero-count bins and found R = 83.7986% at Mc = 1.9 and R = 89.5235% at Mc = 2.0. The final targeted `run_sql` query confirmed N = 616 and b = 1.152133509 at Mc = 2.0.
- Mistake: The fit query generated candidates with `SELECT DISTINCT t10 FROM hist` rather than testing every 0.1 step. It skipped empty candidate bins at 3.8 and 4.0, but both were above the first qualifying threshold, so the answer was unaffected.
- Mistake: Three follow-up `run_sql` attempts to calculate b and R at Mc = 2.0 failed with parser errors. The already-working fit query could have been filtered to return the first qualifying row with its b-value.
- Mistake: The agent repeatedly called `list_files` and reread the same truncated opening of `DATA.md`, ran several constant-only SQL queries, and wrote an unrelated `/out/x.txt` file before submitting.

### world_clusters

**Tool calling: failed.** The agent built and spot-checked a graph of 1,874,135 qualifying links among 680,723 VIIRS detections, but submitted `{"rows": []}` immediately after initializing its component tables. It never computed the connected components or aggregated their detections and fire radiative power, so it missed all 45 expected rows. ($0.085, 33 requests, 3.7 min)
- Right: Used `run_sql` to select all 680,723 VJ1/VJ2 detections, then used spatial and temporal buckets to avoid an all-pairs join. Applied the inclusive 43,200-second limit and a haversine distance test when building `e`.
- Right: Checked the bucketed edge query against brute-force joins in three subsets: both methods returned 2,495, 16,700, and 11,168 links, respectively.
- Mistake: Repeated broad `read_text` calls that returned truncated excerpts of `/data/DATA.md`, along with repeated `list_files` calls. It should have requested the dictionary in smaller line ranges to inspect the fire fields and distance conventions.
- Mistake: The first `ta` and `tb` queries referred to `j.j` and `c.c` even though their columns were named `zz`; a later diagnostic also queried nonexistent `e1` and `e2` columns in `e`. These binder errors were corrected.
- Mistake: The last `run_sql` call only initialized `nodes`, `fmap`, and `cur` for 555,036 linked nodes. Instead of calling `final_result` with no rows, it should have propagated minimum component labels over the links until convergence (or used union-find), joined the labels back to `v`, and grouped by component to get the minimum detection ID, count, and sum of `frp_kw`. It then needed to keep counts of at least 300 and convert the sums to MW, rounded to one decimal as requested. Isolated detections could safely be omitted because they form singleton clusters.

### cross_section

**Tool calling: passed.** The run passed: the agent used DuckDB to select and project 25 catalogue A earthquakes onto the great-circle section, then wrote a 1000 × 500 SVG to /out/map.svg. It reported the correct count, but added a methodology summary the user did not ask for. ($0.024, 26 requests, 88 s)
- Right: Read /data/DATA.md before querying the catalogue and used the documented class T and non-null magnitude filters.
- Right: Caught the overly broad endpoint filter after inspecting the 34 candidates: the maximum computed along-track distance was 9,378.3 km on a 1,069.0 km section. Replaced it with the two nonnegative projection-coefficient tests for the minor arc, yielding 25 events.
- Right: Used write_file to save all 25 circles with the requested coordinate scaling, radii within 2–6 px, and event IDs in data-id attributes; no other SVG element carried data-id.
- Mistake: The first two CREATE OR REPLACE TABLE sel calls repeated the same parser error because they referenced the reserved word by as an unquoted column name. Several diagnostic queries followed before the agent renamed the vector components; using nonreserved names from the start would have avoided the detour.
- Mistake: The initial pa >= 0 AND pb >= 0 condition tested membership in overlapping endpoint hemispheres, not whether the projection was on the minor arc. The agent corrected this before writing the SVG.
- Mistake: The final reply called the spot check a haversine verification, but the SQL used the spherical law of cosines and compared it with a planar approximation. The displayed check covered five events and showed the approximation for endpoint A, not a 0.1 km verification at both endpoints for every event.
- Mistake: After write_file succeeded, the agent gave a multi-bullet explanation instead of replying with just the requested feature count, 25.

### pair_map_hypo

**Tool calling: passed.** The run passed: the agent matched the two earthquake catalogues, wrote the 900 × 900 SVG to `/out/map.svg`, and correctly reported 158 features. ($0.14, 54 requests, 7.3 min)
- Right: Read `/data/DATA.md` before loading the catalogues with `run_sql`, then applied the documented common coverage period and handled the antimeridian by wrapping longitudes into the 160°–190° range.
- Right: Found 67 candidate pairs with 67 distinct A ids and 67 distinct B ids, so the requested greedy ordering could not change which pairs were accepted. An independent distance calculation returned the same pair set.
- Right: Computed great-circle midpoints from summed unit vectors and produced 67 matched circles, 67 A-only circles, and 24 B-only circles. `write_file` confirmed that it wrote `/out/map.svg`.
- Mistake: Several `run_sql` calls failed on avoidable syntax or binding errors, including the initial `a_sel` query, unsupported `cosd`/`sind`, reserved aliases `by` and `at`, and missing aliases in the near-miss query. The agent recovered before building the final feature table.
- Mistake: The first pre-period B count queried `b_sel`, which had already been filtered to the common period, so its zero was uninformative. The corrected query against `qb2` found 62 excluded events.
- Mistake: Optional coastline work consumed many calls: a clipping rewrite returned only 47 chunks before the sign correction restored 153, and two further queries failed because `i` was not carried through every CTE. Fetching chunks in batches of up to 40 still produced truncated tool responses.
- Mistake: The final reply gave a long methodology summary even though the user asked for the number of features once the map was written.
