liveBook · Manning

Pragmatics

As explained in LLMs in Production

Pragmatic context is contextual information about real-world tasks, expectations, and circumstances that affects how language is interpreted or generated.

A shopping assistant can generate a fluent reply and still recommend the wrong item if it does not know what products exist, where they are sold, or what they cost. Pragmatics is the real-world, task-specific context that helps make a response appropriate—not merely well formed. section 2.4 section 5.3.1

Pragmatics is one part of language alongside phonetics, syntax, semantics, and morphology. It matters when words alone do not settle what someone means: “I need food” does not necessarily signal immediate physical danger. Embeddings can approximate semantic relationships from word usage, but those relationships do not supply the circumstances behind an utterance. section 2.1.1 section 2.2.5

For an LLM, supply relevant context rather than assuming fluent output means the model knows the situation:

  • Put task instructions and relevant facts in the prompt, or retrieve product, store, and price information from a database at inference time. This can improve the response without creating a pragmatic system inside the model. section 2.4
  • For changing information such as current events, keep retrieved information up to date or give the model access to tools; a well-written prompt cannot provide facts the model cannot access. section 7.4
  • During training, prompt tuning can provide task context while reusing a largely frozen model. It offers an alternative to retraining or full fine-tuning when adapting a model to a new task. section 5.3.1

How LLMs in Production covers it

How deep it goes
Defines context through interpretation and works through prompting and database access, while denying that these create an internal pragmatic system.
Examples
Uses a shopping assistant needing products and prices, an ambiguous statement about food, and current events beyond a model’s training date.
What it assumes
Introduces pragmatics among basic linguistic features, then relies on familiarity with LLM prompts and embeddings for its production implications.
What you can do after
Apply it via prompting, retrieval, or tool access to provide missing context; evaluate whether that context remains current.
How it connects
Connects pragmatics to syntax, semantics, embeddings, prompts, retrieval-augmented generation, tool access, and prompt tuning.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of LLMs in Production. The section links point to the parts of the book it draws on.