Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
Framework lock-in costs are the taxes you only pay because you adopted the framework. Type coupling, prompt portability, observability hooks, feature lag; GPU choice and token pricing are not framework concerns.
Think of moving into a furnished apartment. The lock-in costs are the things you cannot take with you when you leave: built-in shelving, the alarm system wired to one company, the smart switches that only work with that brand's app. The things you can take with you, your couch, your rent, the neighbourhood you live in, were never the apartment's fault to begin with. When you pick a framework, the same test applies: list the costs that would vanish if you swapped the framework for raw SDK calls. Those are the lock-in costs.
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 ejection-cost test, the four real costs, the two wrong-layer distractors, and the mitigation for each real cost.
| Cost | Framework lock-in? | Why |
|---|---|---|
| Type coupling | Yes | Framework types in function signatures must be rewritten on exit |
| Prompt portability | Yes | Framework templating + parsers do not move to raw SDK as-is |
| Observability hooks | Yes | Proprietary tracers (LangSmith) require the framework |
| Feature lag | Yes | Framework wrappers ship weeks after provider SDKs |
| GPU vendor | No | Hardware decision independent of any LLM framework |
| Token pricing | No | Contract between you and the provider, framework is uninvolved |
Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Conflating framework lock-in with provider lock-in. Confusing the cost of leaving LangChain with the cost of leaving OpenAI, when they are independent decisions.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.