When does the 'no framework' pattern, raw provider SDK plus your own small composition layer, beat reaching for LangChain or LlamaIndex? Give the concrete conditions, not generalities.
Raw SDK beats a framework when the surface is small, the team is tiny, the latency budget is tight, or you need a brand-new provider feature before the wrapper catches up.
Picture a single person making a sandwich for themselves. They open the bread bag, slap on cheese, done. Now picture them buying a 12-step sandwich-assembly machine for the same task. The machine has a process, settings, error logging, and a manual. For one sandwich a day it is silly. The setup time alone is longer than the task. The machine starts to earn its keep when you are making three hundred sandwiches with twelve different fillings for a catering company. That is when the structure stops being overhead and starts being help.
Detailed answer & concept explanation~6 min readEverything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
5 minutes: the tax vs benefit framing, the four conditions, what the thin-wrapper pattern looks like, and where frameworks still win.
Real products, models, and research that use this idea.
- Many YC startups in 2024-26 publicly described their first-version stacks as raw OpenAI SDK plus a 50-line internal helper.
- Vercel AI SDK is itself a deliberate thin-wrapper choice. Small surface, type-safe, eject-friendly.
- Stripe and Shopify engineering posts describe internal LLM packages closer to wrappers than to frameworks.
- Cursor and Replit Agent expose feature-rich provider integrations because they need day-one access to new capabilities.
What an interviewer would ask next. Try answering before peeking at the approach.
QHow would you decide when an internal LLM helper has grown enough that it should become a framework?
QWhat does a 50-line internal LLM helper actually contain?
Don't say thisRed flags and common mistakes that signal junior thinking. Click to expand.
Red flags and common mistakes that signal junior thinking. Click to expand.
Reaching for LangChain by reflex on a project with two prompts and one engineer, then paying the framework tax for years on something that never needed it.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.
Same topic, related formats. Practice these next.