LyraLearn AI Learning Platform
Exams
← Module 19 Β· Machine Learning Foundations
🎧 Listen

When Not to Use an LLM

The most common architecture mistake of the LLM era is reaching for a generative model when a classical classifier would be faster, cheaper, and more defensible. Interviewers probe this deliberately: knowing when not to use an LLM is the judgment call that separates an architect from an enthusiast.

A routing diagram where a heavy stream of documents flows through a small fast classifier chip and only a thin trickle of hard cases escalates to a large LLM brain.

Where classical ML wins

Prefer a trained classical model (logistic regression, gradient-boosted trees, a small neural net) when the workload has these traits:

Hybrid patterns: use both, each where it's strong

The real design space is rarely either/or:

  1. Classifier routes, LLM handles the long tail. A cheap classifier handles the 95% of tickets it's confident about; low-confidence cases fall through to an LLM (or a human). You pay LLM prices only for the hard residue.
  2. LLM as pre/post-processor. The LLM extracts structured fields from a messy email; the downstream decision is made by a classical model against those fields.
  3. LLM-as-labeler bootstrapping. The classic blocker for supervised ML is "we have no labels." Use an LLM to label a few thousand historical examples (with human spot-checks), then train a cheap classifier on those labels. You get LLM-quality categorization at classifier cost β€” the LLM's judgment, distilled into something that runs in milliseconds.

The interview-ready heuristic

Ask three questions of any proposed LLM use: Is the output open-ended language, or a category or number? Will this run at a volume where per-call cost compounds? Must the decision be explained or reproduced later? Category/number, high volume, must-explain β€” that profile is classical ML. Save the LLM for what only it can do: understanding and generating language.

🧠 Quiz yourself on this lesson →

Ask the AI Tutor

Grounded in the course lessons β€” it cites its sources and says when it doesn't know.