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%.
scienceunderway.com/articles/pinterest-llm-agent-edits-recommender-weights-directly-lifting-retrieval-recall

AI illustrationWhat 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 this story is for members. Membership is free: read it at scienceunderway.com/articles/pinterest-llm-agent-edits-recommender-weights-directly-lifting-retrieval-recall
Read the rest of this story
Membership is free. You get every article in full, and can save stories and follow topics.
We send a sign-in link, no password needed. Already a member? Sign inReadiness assessment
| Level | Status | Evidence |
|---|---|---|
| I Lab only | Met | The method is described and tested on real models with offline experiments. |
| II Benchmarked | Met | Evaluated on held-out days, a separate corpus and recall@1000, against the production model on Pinterest's own evaluator. These are internal benchmarks, not public ones, so this is a lenient reading. |
| III Open source | Not yet | No code, weights, data or edit-evaluate engine is released, and the paper gives no link. |
| IV In production | Not yet | Online A/B tests ran on about 10M users per arm for about a week, but the paper does not say any edited model launched to all traffic. Engineers decide what ships. No documented sustained production deployment is stated. |
What would move it up
Released code or the edit-evaluate engine would reach level 3. Level 4 needs a documented full launch of an edited model, with long-run results and evidence that edits survive model refreshes. Independent replication on public recommender data would also help.
The study
Junpeng Hou, Jiaxing Qu, Derek Cheng et al.. Weight Coding: Evolving Web-Scale Recommenders through Direct Weight Edits with LLM Agents. arXiv, 22 November 2026. Read the paper
Notes
- Hou, Qu, Cheng, Yang, Naikawadi and Subbian. Weight Coding: Evolving Web-Scale Recommenders through Direct Weight Edits with LLM Agents. arXiv preprint, November 2026, not peer reviewed. Source
- No code, weights or data are released. The paper gives no repository link.
- Key figures: best two-tower edit L07 gives +15.0 recall@10 points under the production evaluator (+15.7 over held-out days, +13.8 on the worst day). Normalisation reset F04: +10.1 points from 128 changed values. Randomised DHEN rebuild L05: +9.8 points from 2,448 searched values. PinRec unordered R@1 +2.31 pp, ordered R@1 +2.64 pp. Ranker utility NDCG +0.53%.
- Compute: a full loop averages 8.6 GPU hours; four loops reached the best model, 24.6% of a post-training fine-tune of about 140 GPU hours on 8 A100s.
- Online A/B (Table 4): about 10M users per arm for about a week. Save-oriented arms A2, B2, C2 raised saves per user by 8.4% to 10.7% and closeups by 4.8% to 7.6% for the edited source, while long clicks and product share fell.
- The paper names the agent as 'Opus 5.5 with Max thinking'. We have not independently verified this model.
Edited and signed by
Stefan PerdalEditor and publisher142 stories editedStefan read the study, set the readiness level and approved this story. An AI system found the paper and wrote the first draft.
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.
How we workNo corrections


