AI Hints
Home›LangChain Tutorial›Project Review and Good Habits
LangChain · Lesson 107 of 120

Choosing Models

Big, small, fast.

⏱ 2 min read▶ Video at 2:02:04🎓 Free
Watch this lesson in the LangChain courseWatch on YouTube ↗Full LangChain course

There isn't one best model. Bigger models reason better, but they're slower, and cost more. Smaller models are fast and cheap, and often good enough. The skill is matching the model to the job.

Choosing Models
From the video: Choosing Models
  • No single best model
  • Big: smart, slow, costly
  • Small: fast, cheap

Matching models to jobs

Use small, fast models for simple, high volume jobs. Classifying messages, guardrails, and short FAQ answers. Use mid sized models for most agents, and RAG. Save the largest models for hard reasoning, long documents, and tricky code. And always test with your own data.

JobModel size
Classify, guardrailssmall, fast
FAQ answers, RAGsmall or mid
Agents with toolsmid
Hard reasoning, codelarge

Switching is easy

Because LangChain gives every model the same interface, switching is one string. So run your test set on two or three models, and compare quality, speed, and cost. You can even use different models in one app. A small one for the guardrail, a bigger one for the agent.

keyvalue
One stringto switch
Test setcompare models
Measurequality, speed, cost
Mixmodels in one app

Summary

Match the model to the job. Small for simple work, larger for hard reasoning, and test to decide. Next, prompt habits that work.

Key takeaways
  • Small for simple
  • Large for hard
  • Test to choose
Next up: Prompt Habits — what works