---
title: "Gemini 4 Carbon on Pydantic AI - Research & deck"
description: "Questioning a founder and writing an eight-slide investor deck from a data room. Tool calling 91.1%, code mode 88.9%; rank 7 of 44."
canonical: https://pydantic.dev/models/list/gemini-4-carbon/research_deck/
---

# Gemini 4 Carbon on Pydantic AI - Research & deck

> Questioning a founder and writing an eight-slide investor deck from a data room. Tool calling 91.1%, code mode 88.9%; rank 7 of 44.
>
> Markdown copy of https://pydantic.dev/models/list/gemini-4-carbon/research_deck/. Index for agents: https://pydantic.dev/models/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://pydantic.dev/models/api/select` with a JSON body such as `{"description": "what the agent does"}`. It returns up to five ranked models with reasons. Format: https://pydantic.dev/models/select.md
- Search models by name: `GET https://pydantic.dev/models/api/search?query=<text>`
- List, filter and sort models: `GET https://pydantic.dev/models/api/models`, for example `?weights=open&max_price=2&sort=efficiency`
- One model in full: `GET https://pydantic.dev/models/api/models/<slug>`
- Any other question about the models: `GET https://pydantic.dev/models/api/ask?query=<question>`

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

About the benchmark: https://pydantic.dev/models/benchmarks/research_deck.md. The model on every Pydantic AI benchmark: https://pydantic.dev/models/list/gemini-4-carbon/pydantic_ai.md

| Mode         | Score | Tasks passed | Cost  | Requests | Tool calls | Time     |
| ------------ | ----- | ------------ | ----- | -------- | ---------- | -------- |
| Tool calling | 91.1% | 1 of 1       | $1.32 | 23       | 70         | 18.5 min |
| Code mode    | 88.9% | 1 of 1       | $1.14 | 28       | 39         | 17.8 min |

Each task was run once per mode.

## Review

Written by an LLM from the runs' transcripts.

#### Overall

One case, two modes: code mode passed (28 requests, $1.14); tool calling failed on the 1200 s time limit (18 requests, $1.10). Research quality was similar in both. The difference was how the deck got written and one very slow provider response.

#### Where it does well

- **Parallel research.** In tool mode it read 22 text files in two turns and 10 images plus a PDF in one. In code mode it used `asyncio.gather`.
- **Founder questions.** Both runs asked two rounds and captured the fixed slide order, the palette (`#1F6F5C`, `#F2A541`), image choices, "no team block" and "cargo-bike sales with the source named".
- **Checking figures.** Both runs recomputed margins, burn and unit counts before writing. Code mode went further with explicit `checks` and `verifications` dicts, and softened two claims after `check_deck` had already returned `ok` (e.g. 24% of UK volume became 18% on fleet bikes only).
- **Spotting conflicts.** Code mode noticed the GreenDrop case study (4 bikes) disagreed with the `orders` table (3) and asked.

#### Mistakes it makes

- **Huge single-shot writes in tool mode.** The 74,324-character `write_file` took 487 s and 36,891 output tokens. After `check_deck` it started re-sending the whole file and was cut off 183 s in.
- **Provider stall.** The 33-token `check_deck` request took 236 s. Without it the rewrite would probably have just finished, so I marked the failure `provider_error`, but the write-everything-twice approach left no margin. What `check_deck` reported is not recorded.
- **Sandbox and tool-argument slips in code mode.** A `pdf_text` call asked for pages past the end (`has 34 pages`), and `int.from_bytes` was unavailable. Each cost one request.
- **Wasteful PDF searching.** About eight code-mode requests went on regex scans of the market PDFs.

#### Tool calling compared with code mode

Code mode suited this task better. Building charts with Python functions and the page with a template kept the final write to a 42 KB script. Fixes were `html.replace(...)` calls followed by `check_deck` in the same script, so iteration cost seconds. Tool mode had to emit the full HTML as a tool argument each time, at about 75 tokens per second, which consumed over half the time budget. Cost was nearly equal; code mode used 10 more requests but finished.

## Runs

### kestrel-cargo

**Tool calling: passed.** Researched the data room thoroughly in 16 requests (about 3.5 minutes), asked Maya two rounds of questions, then spent 487 s emitting a 74,324-character deck in one `write_file`. A 33-token `check_deck` request then took 236 s to return, and the run hit the 1200 s limit 183 s into re-emitting the whole deck, with no final note. ($1.32, 23 requests, 18.5 min)
- Right: Batched calls well: 8 `read_file` in one turn, 14 more in the next, then 4 `pdf_text` + 4 `query`, then `view_pdf` + 10 `view_image`.
- Right: Two focused `ask_founder` calls captured the fixed 8-slide order, 'no team block, founders' names on the cover', and 'cargo-bike sales from published reports, source named'.
- Right: Verified figures with SQL before writing: LTM revenue `3085543`, LTM gross margin `36.4`, post-April margin `38.97`, units `721` fleet / `322` consumer, and a COGS decomposition (`cogs - 9 * fleet_bikes_in_service`) that recovered the £2,820 to £2,700 per-bike cost.
- Right: `write_file` succeeded (`wrote 74324 characters to deck/index.html`), so a first deck was on disk by about 13 minutes in.
- Mistake: Request 17 (`write_file`): generated the whole deck in one 36,891-token response that took 487 s, including a provider `CONTINUATION` at 32,768 tokens. That is 40% of the time budget in one step.
- Mistake: Request 18 (`check_deck`, 33 output tokens, 17 thought tokens): the model call took 236 s. This is provider latency, not model work, and it is the step that made the timeout unavoidable.
- Mistake: Request 19: after `check_deck` it began re-sending the entire deck (the provider span shows 29,124 tokens over 345 s starting with the same `<!DOCTYPE html>` header) instead of a small targeted fix; the run was cancelled 183 s in. The `check_deck` result is not in the recorded conversation, so what it reported is unknown.
- Mistake: No final note to the founder was produced; the on-disk deck is the unverified first draft.

**Code mode: passed.** Read the data room with `asyncio.gather` scripts, asked Maya twice, verified every displayed figure in Python, built SVG charts and the HTML in code, and got `check_deck` = `ok` on the first write. It finished in 28 requests with a detailed note to the founder. ($1.14, 28 requests, 17.8 min)
- Right: Built the deck programmatically: SVG charts generated by functions (`build_rev_svg`, `build_gm_burn_split_svg`) from queried rows, then an f-string template written with `pathlib.Path('/deck/index.html').write_text(html)` and `await check_deck()` in the same script; the result was `ok` first time.
- Right: Explicit verification scripts: a `checks` dict (e.g. `fleet_hw_gm` 37.9, `svc_gm` 76.9, `burn_drop_pct` 37.0, `new_inv_pct` 22.6) and a second `verifications` dict before finishing.
- Right: After the check it still tightened claims with `html.replace(...)`: changed '960 bikes/yr ... 24%' of UK volume to '720 fleet bikes/yr ... 18%', replaced a '5.8×' running-cost claim with '82.7% lower (€4,140/yr vs €716/yr)', re-ran `check_deck` (`ok`) and self-audited fonts (`min_css_font_px` 14.0, `min_svg_font_px` 12.0), `has_http` false, `has_script` false.
- Right: Followed Maya's answers: `IMG_2077.jpg` on the cover, `screenshot_2026-11-02.png` on traction, funnel 86 → 31 → 12 as a chart, recall addressed on traction, no team block, prototype not used.
- Right: Noticed a data conflict (case study says GreenDrop started with 4 bikes, `orders` shows 3 in `ORD-0011`) and asked Maya about it.
- Mistake: Request 11: `pdf_text(path='market/kim_cycling_facts_2023.pdf', pages=list(range(23, 55)))` raised `has 34 pages`, losing that script's results; it then discovered the first `pdf_text` calls without `pages` had not returned whole documents (`ema_total` 52 vs 20 seen) and needed a `read_all_pages` loop.
- Mistake: Requests 6 to 14 spent about eight `run_code` calls on regex searches of the market PDFs for 'cargo' and sales figures, several returning 20 KB of overlapping snippets.
- Mistake: Request 22: `int.from_bytes` is not available in the sandbox (`AttributeError`); it rewrote the image-size helper with manual bit shifts, which cost one extra request.
- Mistake: The second `ask_founder` asked again about a team block; reasonable, but together with the GreenDrop question it got 'no strong view' on half of it.
