Chat model

Also known as: chat-tuned model · chat LLM

On this page 7

A chat model is a large language model fine-tuned for dialogue: it receives a conversation as a sequence of role-tagged messages and generates the next assistant turn. Among language models in artificial intelligence, a chat model, also called a chat-tuned model or chat LLM, starts from a pretrained base model and is then trained with instruction data and human preference feedback so that it answers questions, follows directions and declines unsafe requests instead of merely continuing text.

The difference from a base model is behavioral, not architectural. Both are usually decoder-only transformers that perform next-token prediction; the chat model has simply learned a conversation format and a set of response habits that make it usable as an assistant without elaborate prompt construction.

How a chat model is built from a base model

A chat model is produced by post-training a base model in several stages. Pretraining on trillions of tokens gives the network broad parametric knowledge and fluency, but the resulting model continues any text it sees, including questions, which it may answer with more questions. Post-training reshapes that behavior into helpful, turn-based responses.

The table below summarizes the usual stages and what each one contributes to the final assistant behavior.

StageTraining dataMain effect
PretrainingWeb text, books, codeLanguage skill and world knowledge
Supervised fine-tuningCurated prompt-response dialoguesLearns the chat format and answer style
Preference optimizationRanked pairs of candidate answersPrefers helpful, honest, harmless replies
Safety tuningAdversarial and refusal examplesDeclines harmful or disallowed requests
Reasoning or tool trainingVerified solutions, tool tracesImproves multi-step problem solving
Typical training pipeline of a chat model

Preference optimization is commonly done with reinforcement learning from human feedback (RLHF) or with direct methods such as direct preference optimization (DPO). These methods do not add much new knowledge; they mainly change which of the model’s existing abilities it expresses by default, a point that explains why chat tuning cannot fix gaps in pretraining.

Message roles and the chat template

A chat model reads a conversation that has been serialized into a single token sequence by a chat template. The template wraps each message in special tokens that mark its role and its boundaries, so the model can tell instructions from user text and knows where its own turn begins and ends.

Most chat interfaces use a small, fixed set of roles, summarized here.

RoleWho writes itPurpose
SystemDeveloper or operatorSets persona, rules and constraints
UserEnd userAsks questions or gives tasks
AssistantThe chat modelProduces the response turn
ToolExternal function or APIReturns results the model requested
Common message roles in chat model interfaces

The template must match the one used during fine-tuning. A template mismatch, such as a missing end-of-turn token, is a frequent cause of degraded output in self-hosted deployments: the model may keep generating past its turn, imitate the user or ignore the system prompt. Because the model is stateless, every request resends the full conversation history, which consumes the context window as the dialogue grows.

A chat model sits between a raw base model and more specialized variants. The comparison below shows how they differ in input format and typical use.

Model typeInput formatBest suited for
Base modelPlain text to continueFurther fine-tuning, research, text completion
Instruction-tuned modelSingle instruction and answerOne-shot tasks and pipelines
Chat modelMulti-turn role-tagged messagesAssistants, support, interactive work
Reasoning modelChat messages plus thinking budgetMath, code, multi-step analysis
Code LLMCode context or chatCompletion, refactoring, review
Chat model versus neighboring model types

In practice the boundaries blur: most modern instruction-tuned models are also chat models, and many reasoning models are chat models that emit reasoning tokens before the final answer. The key distinction remains whether the model expects structured conversational input or free text.

Configuring a chat model in practice

Developers shape a chat model’s behavior mainly through the system prompt, sampling parameters and output constraints rather than retraining. Steerability, the degree to which the model follows these settings, differs considerably between models and should be tested rather than assumed.

ControlTypical settingEffect
Temperature0 to 0.3 for facts, 0.7 to 1.0 for ideasRandomness of word choice
Max tokensTask-dependent limitCaps response length and cost
Stop sequenceCustom delimiter stringsEnds generation at a marker
JSON mode or schemaEnabled for integrationsForces machine-readable output
Tool definitionsFunction names and parametersLets the model call external APIs
Main controls and their effect on chat output

A good working rule is to put stable rules in the system message, task-specific material in the user message and examples as earlier user and assistant turns, a form of few-shot prompting that chat models handle well.

Limitations and common mistakes

Chat tuning makes models fluent and agreeable, and both traits carry risks. The most important ones are listed below.

  • Hallucination: the model states fabricated facts with the same confident tone as correct ones.
  • Sycophancy: preference training can reward agreement, so the model may endorse a user’s wrong claim.
  • Knowledge cutoff: answers reflect training data up to a date unless retrieval or tools supply newer information.
  • Lost in the middle: in very long conversations, details placed mid-context are recalled less reliably.
  • Prompt injection: instructions hidden in user content or tool results can override the intended behavior.

A frequent design error is treating the chat model as a database or source of truth. Reliable systems ground answers in retrieved documents, validate structured output and keep a human review step for consequential decisions.

The short version

A chat model is an AI system trained to talk with you. It first learns language by reading a huge amount of text. Then it gets extra training on example conversations. That extra step teaches it to answer instead of just continuing text.

Think of a well-read person who has also been coached as a helpful receptionist. The knowledge comes from reading. The polite, on-topic replies come from the coaching. It still makes mistakes, so important answers deserve a check.

Where it makes a difference

A mid-sized software company replaces its keyword-based help widget with a chat model connected to its documentation. The system prompt tells the model to answer only from retrieved help articles, to cite the article title and to hand over to a human agent when it is unsure. Temperature is set to 0.2 to keep answers consistent.

Customers can now ask follow-up questions in the same conversation, such as how a setting applies to their plan, without restarting the search. Over the first quarter, the support team sees routine password and billing questions resolved without an agent in most cases, while complex cases arrive at human staff with the full conversation attached. The team still audits a sample of transcripts weekly, because a few answers mixed details from outdated articles and had to be corrected by updating the source documents.