Skip to main content

Drawing the Line: What Deserves an LLM and What Doesn't

An insightful Dev.to article on building an LLM support agent, exploring 3 key questions to decide between deterministic code and AI models.

AI-written
Inewgen
27 Aug 2026Source: Dev.to2 min read (0 views)
Share
Drawing the Line: What Deserves an LLM and What Doesn't

Stock photo for illustration only, not from the actual event

Font size
  • Every AI feature forces a choice between a model or a method.
  • AI interprets intent while software enforces policy.
  • Retrieval returns fuzzy results but requires rigid function calls.
  • Action risk classification must be static code lookup, not runtime LLM judgment.

Every artificial intelligence feature reaches the same fork in the road. Does this specific piece get a language model, or does it get a deterministic software method? Go wrong one way and you have built a rigid rules engine that cannot read a sentence, and go wrong the other way and a language model is deciding whether a user gets their money back.

The guiding principle that AI interprets intent while software enforces policy sounds simple as a starting point, but applying it to a specific component on a regular Tuesday is where the real challenge lies.

programming code laptop screen developer workspace

Stock photo for illustration only, not from the actual event

Retrieval deserves its own examination because it is where most engineering teams trip up. Allowing the AI to find the right knowledge base article sounds like an AI decision, but it is not entirely one. The search results remain fuzzy, returning plausible and ranked articles that can occasionally be incorrect.

3Core Questions to Decide

"The AI interprets intent, software enforces policy"

Never miss the latest news?

Subscribe to get news summaries by email - not often enough to be annoying.

โฆษณา

Dev.to Author

The part that takes the longest to appreciate is that deciding who decides is itself a decision. If the answer is to let the LLM classify each action's risk tier at runtime, the entire architecture collapses. Prompt injection does not need to break a rule if it can simply reclassify the action that the rule applies to.

Balancing deterministic code and probabilistic models like LLMs is crucial for robust system architecture. While AI excels at interpretation and searching unstructured data, critical business logic, financial transactions, and access controls must rely on deterministic code to prevent prompt injection and unpredictable failures.

Durable systems across any domain are never the ones featuring the smartest model. Instead, they are the systems where nobody has to blindly trust a model on a question that has a definitive right answer.

Source: Dev.to

Comments

Leave a Comment
0/2000

Found something wrong in this article? Report an issue with this article