Lesson 29 / 31
When to Drop the Framework
Recognise when direct SDK calls are the better engineering choice.
Simplicity is a feature
Frameworks help most when you need their breadth. If your app is one prompt and one model call, or you need precise control over every request detail, a direct provider SDK plus a little of your own code can be shorter, faster to debug and easier to maintain. A middle path is to use frameworks for the parts that save real effort (document loaders, splitters, vector store adapters, tracing) and write the core prompt-and-call logic yourself. Whatever you choose, keep framework imports behind a thin layer of your own functions so you can replace a component without rewriting the application.
Quick check: When is a direct provider SDK often enough?
- A complex multi-agent workflow
- A single prompt and one model call with no retrieval or tools
- Indexing millions of documents
- Never
Answer
A single prompt and one model call with no retrieval or tools — Simple apps do not need extra abstractions.