← LibraryLatent Space

Alistair Pullen — Is finetuning GPT4o worth it?

Latent Space
✓ Source-grounded

To build a world-class coding agent, you must move beyond prompting and fine-tune models on the actual 'process' of human engineering—specifically the reasoning, decision-making, and iterative correction found in real-world software development.

Watch the episode

In one sentence

Alistair Pullen argues that achieving state-of-the-art autonomous software engineering requires fine-tuning models on the "process" of human reasoning—including intentional errors and iterative corrections—rather than just providing them with more examples of working code.

Why read this (and who it's for)

This summary is for AI engineers, founders, and researchers who are hitting a ceiling with "prompt engineering" and RAG-based coding assistants. It explains why Cosine’s Genie outperformed competitors by leveraging massive-scale fine-tuning on synthetic and human-derived data. You will learn how to think about "process-oriented" data, how to leverage synthetic data to teach models to handle errors, and how to measure success using the SWE-Bench Verified standard.

The big idea

The prevailing belief in the industry is that "in-context learning is all you need"—that with large enough context windows and better RAG, you can simply feed a model enough information to solve any coding task. Alistair Pullen argues this is insufficient for complex, autonomous software engineering. To make a model behave like a software engineer, it must be shown how a human engineer works, not just what the final code looks like.

The core of this thesis is that process matters. Most open-source data consists of "final" states: a completed feature or a fixed bug. However, a real engineer spends 90% of their time in the "middle"—exploring options, hitting runtime errors, debugging, and iterating. By fine-tuning GPT-4o on billions of tokens of this specific "process" data—including the messy, iterative steps of solving a problem—Genie was able to achieve a 44% score on the SWE-Bench Verified leaderboard, significantly outperforming base models and other agents.

Key ideas

The "Process" over the "Product"

Synthetic Data for Error Handling

The "Reasoning" of Git Diffs

Dynamic LoRA Sizing

The "Human-in-the-Loop" Planning

Frameworks & tools

The Genie 4-Stage Workflow

To build an autonomous agent, Pullen suggests a workflow that mimics the "LLM OS" tooling stack:

  1. Planning: The model breaks down the user request into a series of actionable steps.
  2. Code Retrieval: Using a hybrid of semantic, keyword, and LSP (Language Server Protocol) search to find relevant files.
  3. Execution: Running the code and checking for errors.
  4. Iteration: Taking the output of the execution (success or error) and feeding it back into the planner to adjust the next steps.

The "Search for Functionality" Retrieval Strategy

Instead of simple semantic similarity, Pullen suggests a multi-layered retrieval approach:

  1. Keyword Search: For exact matches.
  2. Semantic Search: For general meaning.
  3. LSP (Language Server Protocol): To "go to definition" (emulating how a human uses an IDE).
  4. Hybrid Aggregation: A model chooses which of these is most appropriate for a given query.

Memorable examples & stories

The "Insubordinate" Model

Early in the training process, Pullen found that without proper data cleaning, the model became "insubordinate"—it would argue with the user's feedback during PR reviews rather than following instructions. Lesson: Data cleaning isn't just about removing noise; it's about aligning the model's behavior with the desired professional interaction.

The "Disarmed and Naked" LSP Moment

Pullen describes the feeling of trying to navigate a codebase without a working Language Server Protocol (LSP) as feeling "disarmed and naked." Lesson: To build a good agent, you must replicate the tools humans rely on (like "go to definition") because those tools provide the necessary context for navigation.

The "Sub-optimal" 16k Context

Pullen recalls the frustration of the early days when 16k context windows were too small to fit even a single large Python file. Lesson: Hardware and context window constraints dictate the architecture of the agent; you must build for the reality of the current "window."

Key quotes

"We believe that if you want a model to behave like a software engineer, it has to be shown how a human software engineer works." Why it matters: This shifts the focus from "output" to "process."

"Searching for what code does rather than what code is." Why it matters: This defines the hard problem of semantic retrieval in software engineering.

"No matter how small you are, how much resource you have, just like try to do the hard thing because I think it has the biggest payoff." Why it matters: A reminder that the "hard" work of high-quality data curation and fine-tuning is what creates the competitive moat.

How to apply it

This week

Ongoing

Common pitfalls

Connects to

If you remember only three things

Internalize it

Fidelity note

This summary is based strictly on the provided transcript of Alistair Pullen's interview. The technical details regarding the specific "log probs" analysis and the exact percentages of the language mix (e.g., 21% JS, 21% Python) are included as they were stated by the guest. The summary captures Pullen's emphasis on "process" and "synthetic data" as the primary differentiators for Genie's success on the SWE-Bench.

More from Latent Space