# Pinterest LLM agent edits recommender weights directly, lifting retrieval recall 24%

Pinterest engineers had an AI coding agent change a recommender model's internal numbers by hand rather than retrain it. Offline recall rose by about a quarter, and a week-long online test raised saves from the edited source by up to 11%.

- Category: Agents
- Readiness level: II (Benchmarked) on Science Underway's four-step scale, as proposed
- Published: 2026-11-24
- Editor: Stefan Perdal
- URL: https://scienceunderway.com/articles/pinterest-llm-agent-edits-recommender-weights-directly-lifting-retrieval-recall

## The study

Weight Coding: Evolving Web-Scale Recommenders through Direct Weight Edits with LLM Agents (preprint, not peer reviewed). arXiv 2611.29613. https://arxiv.org/abs/2611.29613

## At a glance

- What it shows: Pinterest used an AI agent to adjust a small number of settings inside a trained recommendation model, without retraining it. The model found relevant images noticeably more often, and real users saved more of what it suggested.
- What it does not show: It does not show that this can replace training, that the edits survive the next model update, or that whole-site engagement improved. Everything ran on Pinterest's own private models and data.
- Why it matters: Retraining a large recommender takes days and many computer hours. A faster, inspectable way to tune a model already in service could change how companies maintain these systems.

## What the study shows

Recommender models are usually improved by changing their data or objective and then retraining. The authors, all at Pinterest, propose another route they call weight coding. An AI coding agent, a large language model that can write and run code, looks inside a trained model and edits its weights directly. Weights are the learned numbers that set how the model behaves.

The agent works in a loop. It tries single edits, discards ones whose effect flips on another day of data, then searches for good values and combines edits. A cached engine re-runs only the parts of the model that change, so each edit is checked in seconds. Engineers set the goals and decide what goes to users.

The main test was Pinterest's Image Search retriever, a 147M-parameter model that picks candidate Pins for a query. The authors report that recall@10, how often a relevant Pin lands in the top ten, rose by up to 15 percentage points on held-out days. That is about 24% more than the production model. Resetting just 128 normalisation values, which control the scale of signals inside the model, gave about 10 points on its own.

The best result took four agent loops, about a quarter of the computer time of one standard fine-tune. In a further test, the authors wiped a 13.6M-parameter part of the model back to random values. Tuning only 2,448 numbers inside it still beat production by about 10 points.

Gains on two other Pinterest models were smaller. A generative retriever improved its top-one recall by about 2 points, and a 1.37B-parameter ranker by about half a percent on its main ranking score. Many edits that helped the first model did not carry over.

A single dial could also steer results. Moving it shifted the share of fresh Pins in the top ten from 2% to 70% across the tested range. In online A/B tests of about 10 million users per arm for about a week, save-focused edits raised saves per user from that retrieval source by 8.4% to 10.7%. This is a preprint and has not been peer reviewed.

## Our reading

In our reading, the most useful finding is not the agent but what it uncovered. A model already in production had settings that were plainly out of balance. Removing four internal branches entirely improved recall by about 6 points. That suggests ordinary training can leave cheap gains on the table, and that someone, or something, looking at the weights can find them.

The agent's exact contribution is harder to judge. The paper does not compare it with a plain automated search or with engineers tuning the same spots. Much of the heavy lifting is done by a standard search method, evolution strategies, which tries random nudges and keeps what scores best. The agent chooses where to look and assembles the pieces.

We rate this II, Benchmarked, on our readiness scale, and that is a lenient reading. The tests use Pinterest's internal evaluators, not public benchmarks. No code is released, and the paper does not say any edited model was fully launched.

The rest of the article (what it means, limits, what to watch) is free for members: https://scienceunderway.com/articles/pinterest-llm-agent-edits-recommender-weights-directly-lifting-retrieval-recall

## How this was made

An AI model read the study and wrote this article in the structure Science Underway uses. An editor reviewed it and approved it for publication. Check the original study before you rely on the details.

---
Source: Science Underway, https://scienceunderway.com/. Please link to the article when you cite it.
