4,387 karma · joined March 14, 2008
Alum of Brex, Google, Microsoft, Salesforce, Twitter, Convoy.
Contact: steve@logic.inc
Hope you find it helpful or interesting.
It's really interesting to see the Sol/Terra/Luna apps side-by-side.
I need to add these stats somewhere in the UI, but one interesting take away: Terra took 1/2 as much wall-clock time as Sol, but Luna took more wall-clock time than Sol (by about 23%). It's still much much cheaper, but it seems like Terra is likely a more optimal time/cost balance for most use cases.
The Terra quality is usually nearly as good as Sol, but much faster and cheaper. I do appreciate Sol's design sensibilities (see, for example, the audio sequencer). It's the first model in a while that is clearly distinct on that front. They'd all converged to very similar visuals for a while.
I keep it pretty up to date (tomorrow Grok 4.5 and Sonnet 5 should be pushed).
I don't think anyone wants production code paths that have never been tried, right?
(If the analogy, in the first paragraph, of a Roomba dragging poop around the house didn't convince you)
Especially with the massive context windows modern LLMs have. The core idea that the GPT-3 paper introduced was (summarizing):
A sufficiently large language model can perform new tasks it has never seen using only a few examples provided at inference time, without any gradient updates or fine-tuning.It's a footnote on the post, but I expand on this with:
100% coverage is actually the minimum bar we set. We encourage writing tests for as many scenarios as is possible, even if it means the same lines getting exercised multiple times. It gets us closer to 100% path coverage as well, though we don’t enforce (or measure) thatWe open-sourced our impl just this week: https://github.com/with-logic/intent
We use Groq with gpt-oss-20b, which gives great results and only adds ~250ms to the processing pipeline.
If you use mini / flash models from OpenAI / Gemini, expect it to be 2.5s-3s of overhead.
All of these were one-shotted by Claude.
(OpenAI's GPT-5 Coding Examples: https://github.com/openai/gpt-5-coding-examples)
We actually use a variant of this approach in our reasoning prompts. We use structured output to force the LLM to think for 15 steps, and in each step we force it to generate a self-assessed score and then make a decision as to whether it wants to CONTINUE, ADJUST, or BACKTRACK.
- Evaluate quality with reward scores (0.0-1.0)
- Guide next steps based on rewards:
• 0.8+ → CONTINUE current approach
• 0.5-0.7 → ADJUST with minor changes
• Below 0.5 → BACKTRACK and try different approach
I go into a bit more depth about it here, with an explicit example of its thinking at the end: https://bits.logic.inc/p/the-eagles-will-win-super-bowl-lixYou could, for example, include all few-shots that meet the similarity threshold, but you’ll use more tokens for (I assume) marginal gain. Definitely worth a try though.
FWIW – across all of these, we already do automated prompt rewriting, self-reflection, verification, and a suite of other things that help maximize reliability / quality, but those tokens add up quickly and being able to dynamically switch over to a smaller model without degrading performance improves margin substantially.
Fine-tuning is a non-starter for a number of reasons, but that's a much longer post.
It's, admittedly, a tough task to measure objectively though, in that it's like a code review. If a Principal Engineer pointed out 20 deficiencies in a code change and another Principal Engineer pointed out 18 of the same 20 things, but also pointed out 3 other things that the first reviewer didn't, it doesn't necessarily mean either review is wrong – they just meaningfully deviate from each other.
In this case, we chose an expert that we treat as an objective "source of truth".
re: simple tasks – We run hundreds of thousands of tasks every month with more-or-less deterministic behavior (in that, we'll reliably do it correctly a million out of a million times). We chose a particularly challenging task for the case-study though.
re: in a paying business context – FWIW, most industries are filled with humans doing tasks where the rate of perfection is far below 90%.
Phrased differently, when a task has many valid and correct conclusions, this technique allows the LLM to see "How did I do similar tasks before?" and it'll tend to solve new tasks by making similar decisions it made for previous similar tasks.
Two things to note:
- You'll typically still want to have some small epsilon where you choose to run the task without few-shots. This will help prevent mistakes from propagating forward indefinitely.
- You can have humans correct historical examples, and use their feedback to improve the large model dynamically in real-time. This is basically FSKD where the human is the "large model" and the large foundation model is the "small model".`phi-4` really blew me away in terms of learning from few-shots. It measured as being 97% consistent with `gpt-4o` when using high-precision few-shots! Without the few-shots, it was only 37%. That's a huge improvement!
By contrast, with few-shots it performs as well as `gpt-4o-mini` (though `gpt-4o-mini`'s baseline without few-shots was 59% – quite a bit higher than `phi-4`'s).
[1] https://bits.logic.inc/p/getting-gpt-4o-mini-to-perform-like
It’s very easy to spend hours iterating on prompts for the perfect photo while using human judgment to figure out how to steer the image. That’s meaningful human involvement and should be able to be protected.
Apple protects passkeys via FaceID or TouchID. If you're satisfied with biometrics as a 2nd factor, then there is no regression in your scenario.
The same will apply to neural nets. They can learn from others, but must make sufficiently distinct new works of art from what they've learned.