当你有100万上下文窗口时,谁还需要Git?
Who needs Git when you have 1M context windows?

原始链接: https://www.alexmolas.com/2025/07/28/unexpected-benefit-llm.html

## AI 来救场:恢复丢失的代码 RevenueCat 的一位工程师在重构代码后意外地降低了他们的 LTV 预测模型,而最初的代码显示了 5% 的改进。尽管他们努力了几天,仍然无法重现最初的积极结果——“秘诀”似乎丢失了。 然而,一个令人惊讶的解决方案出现了。这位工程师意识到他们一直在借助 Gemini 2.5 Pro 的帮助开发这个模型,利用其巨大的 100 万 token 上下文窗口。出于一时兴起,他们要求 LLM 检索原始脚本,LLM 成功地提供了丢失的代码! 这次经历凸显了长上下文 LLM 的一个意想不到的好处:作为一种出乎意料的、非常规的代码备份。虽然不提倡放弃版本控制,但这个故事展示了 AI 在从开发人员失误中恢复并保存有价值的工作方面的潜力。

相关文章

原文

Lately I’ve heard a lot of stories of AI accidentally deleting entire codebases or wiping production databases. But in my case it was the other way around. I removed some working code and the LLM helped me to recover it.


I joined RevenueCat a couple of months ago to work on LTV predictions. My first few projects were straightforward: fix small things, ship some low-hanging fruit. After getting familiar with the code, I decided to extend the LTV model and add some cool machine learning. So I dove in. Spent a couple of days wrangling data, cleaning it, understanding what was going on, and the usual standard pre-training stuff. I was in “research mode”, so all my code lived in notebooks and ugly scripts. But after enough trial and error, I managed to improve the main metric by 5%. I was hyped. Told the team. Felt great.

Then came the cleanup. I refactored all the sketchy code into a clean Python package, added tests, formatted everything nicely, added type hints, and got it ready for production. Just before opening the PR, I ran the pipeline again to double-check everything… and the results had dropped by 2%.

Oh shit… My ML model was now making worse predictions than the original model… And I never committed the changes that got me the +5%. Noob mistake. My teammate wasted no time laughing at my blunder

My colleague having a good fun
My colleague having a good fun

I spent the next few days trying to reproduce the original results, but it was impossible. Whatever secret sauce I’d stumbled on was gone. Then the weekend came and I went to the beach with my kids, and while making sand-castles I had an epiphany. I wasn’t working alone while developing the ML model. There was someone else helping me: my good old friend gemini-2.5-pro, with an incredible 1M token context window, was there all the time. Maybe, just maybe, it remembered. On Monday, after a great and relaxing weeked, I opened Cursor and asked

give me the exact original file of ml_ltv_training.py i passed you in the first message

Boom. There it was, the original script that gave me the +5% uplift. An unexpected benefit of long-context LLMs. Who needs git best practices when you have an LLM that remembers everything?

联系我们 contact @ memedata.com