How a request to an LLM is put together
From the application's side, an LLM call is a structured package rather than a single question. A typical request carries a system prompt with the rules, a short history of the conversation, retrieved passages from your own data, definitions of any tools the model may call, and the user's latest message. All of it is counted in tokens and must fit in the model's context window. The response comes back as text, as a tool call, or as JSON when structured output is turned on.
Settings such as temperature, maximum output length and, on reasoning models, a thinking budget shape how the model responds. Few business problems are solved by the model alone: the value usually comes from what surrounds it, such as retrieval, validation and the systems it writes to.
Example: an LLM inside an order-support flow
Example: a distributor wants customers to ask about orders on WhatsApp in English, Hindi or Hinglish. The flow works like this:
- The message arrives and a small model classifies the intent, such as order status, invoice copy or complaint.
- For order status, the application calls the order system with the customer's verified phone number, never with an ID the model invented.
- The LLM receives the order record and writes a short reply in the customer's language.
- Complaints are summarized and handed to a person, with the draft reply attached for approval.
The LLM does the language work; the facts come from the system of record, and the decisions that matter stay with people. This is the pattern behind our WhatsApp AI agents.
Choosing a model
Model choice is a trade-off between quality on your task, speed, running cost, data handling and how much control you need. Hosted frontier models are strongest on hard reasoning and broad knowledge. Open-weight models can run in your own environment for privacy and version stability. Small language models handle narrow, high-volume steps quickly. Many production systems use more than one, with model routing sending each request to the right one. Our model comparison tool lays out the factors side by side, and technology and vendor evaluation runs the comparison on your own data.
How to evaluate an LLM for your use
Public benchmarks are a starting point, not a decision. Build a test set of real inputs from your business, with expected outputs or grading rules, and score each candidate model on it. Track:
- Task accuracy, judged by people or by an LLM judge checked against people.
- Rate of unsupported claims, the hallucination rate.
- Latency to first token and to full answer.
- Tokens used per request, which drives running cost.
- Behavior on the hard cases: mixed languages, missing data, hostile inputs.
Common mistakes
The usual errors are treating the model as a database of facts about your business, sending personal data to an external API without a policy, skipping evaluation because the demo looked good, and letting the model take actions without checks. Each has a known fix: retrieval for facts, data rules aligned with the DPDP Act 2023 for personal data, an eval suite under LLMOps, and human approval for actions that move money or send messages.