Chapter 12: Production, an ever-changing landscape: Things are just getting started
The chapter introduction explains why the book emphasizes durable LLM production concepts and previews a review of takeaways, future directions, and closing thoughts.
After this chapter you will be able to
- Durable concepts amid rapid change. Explain that LLM technology changes so quickly that parts of the book may become outdated, which is why the authors emphasize core concepts they expect to endure.
- Product life cycle quadrants. Describe the four closely tied parts of the LLM product life cycle—Preparation, Training, Serving, and Developing—and explain that Undercurrents affect all four throughout the life cycle.
- Shift to future possibilities. Describe the section's shift from methods already used in production to directions that may shape LLMs over the next several years, including research and nontechnical influences.
- Product regulation and participation. Explain why an LLM product needs attention to law in a way a demo does not, and describe Utah’s SB-149 as an example of lawmakers defining AI and addressing deceptive supplier conduct. Describe why the authors encourage practitioners to help shape regulations rather than try to predict every future rule.
- Limits of AI text detection. Explain why the section rejects AI-text detectors as reliable evidence that a particular person cheated, while allowing that some generated text contains obvious clues. Describe the potential harm of false positives when detector scores are treated like proof of plagiarism.
- Chatbot liability and safeguards. Explain how a company may be held responsible for information its chatbot gives customers, using the Air Canada refund-policy ruling as the section’s concrete example. Describe the safeguards the authors recommend for higher-risk applications: careful prompt engineering, guard rails, and saved logs and customer chat history.
- Longer context window tradeoffs. Describe the rapid growth in context-window length and explain why very long windows do not eliminate practical limits, especially per-token cost and the shorter windows of many self-deployed models.
- Attention scaling and hybrid alternatives. Explain how quadratic attention makes longer contexts computationally costly, then describe MAMBA as an attention-free state-space alternative and JAMBA as a hybrid of state-space and transformer layers with joint attention.
- Speculative decoding benefits and limits. Explain how a smaller assistant model proposes outputs that a compatible larger model checks in parallel, and describe the reported speed benefit, unchanged accuracy, and limits involving sequence length and model compatibility.
- Shared multimodal embedding spaces. Explain how placing audio, images, text, and other modalities in a comparable embedding space can connect forms of context that language models have not handled together as well, particularly phonetics, semantics, and pragmatics. Describe how this enables cross-modal search, such as finding animal images from a sound clip.
- ImageBind and OneLLM approaches. Distinguish ImageBind’s use of separate encoders to place six modalities in the same embedding dimension from OneLLM’s use of one model and one multimodal encoder for eight modalities, aligned using language. Explain that ImageBind aligns the resulting representations, whereas OneLLM emphasizes aligning the encoding process.
- LLM-assisted dataset organization. Describe how LLMs help label, tag, organize, and clean data, and how image captioning or embeddings can give previously unstructured datasets useful structure for search, recommendations, and insights.
- Realistic evaluation dataset gap. Explain why the section calls for better open source evaluation datasets: multiple-choice benchmarks are easy to assemble and score but poorly match the freeform questions users ask LLM applications.
- Broader language representation. Explain why datasets need more languages and dialects: underrepresentation biases models toward dominant languages, while broader coverage improves inclusivity and usefulness across international contexts.
- Prompt Optimization for Math. Explain how the DSPy math example tests whether better prompts can improve an LLM’s answers without changing the model. Describe the baseline and optimized results.
- Grounding and Graph Retrieval. Explain how supplying context can reduce invented answers, why ordinary vector-search RAG can struggle with multipart questions, and how knowledge graphs help. Describe the extra work required to use graph-based retrieval.
- Targeted Knowledge Editing. Describe knowledge editing as a way to change specific model behaviors or facts, particularly when facts become outdated, and contrast it with retraining or finetuning.
- AI accelerator opportunities. Explain why the authors expect hardware innovation to improve LLM production, distinguishing graphics-oriented GPUs from task-specific ASICs such as TPUs and AI-oriented NPUs.
- Large persistent memory benefits. Trace the authors' hypothetical use of fast, cheap, high-capacity, nonvolatile memory like 3D XPoint: a very large model could fit on one GPU, reducing parallelization overhead, while remaining loaded across server restarts.
- Realistic expectations for agents. Distinguish the authors’ expectation that agents will become useful from claims that they will soon replace entire occupations. Explain why agents that work in limited demos are promising but not evidence of broad autonomy.
- Specialized agents and bot replacement. Describe the smaller, specialized tasks the authors expect agents to handle first, including conversational NPCs, suggested email replies, and replacing brittle resume-processing or screening bots. Explain the proposed role of user choice or fairness in the relevant examples.
- Cached embeddings for multiple tasks. Explain how caching a model’s embeddings or last hidden state can avoid repeating the same computation when several tasks use one input. Describe how task-specific trained layers or linear classifiers can use that shared representation for multiple classifications.
- Current practices and emerging research. Explain why the authors focused on current best practices despite promising research, and describe their expectation that both longstanding and new research will improve LLMs.
What it builds on
- Data for LLMs (chapter 4) · Data preparation as part of building an LLM product.
- Basic training techniques (chapter 5) · Model training techniques.
- Creating an LLM service with RAG and more (chapter 6) · Serving an LLM through a service.
- Building an application with RAG (chapter 8) · Developing an LLM application.
- Infrastructure, GPUs, and Vector Databases (chapter 3) · Infrastructure components used in LLM operations.
- Setting up infrastructure (chapter 6) · Infrastructure setup for serving.
- Security concerns (chapter 3) · Security concerns as one kind of real-world operational risk
- Metrics for evaluating text (chapter 4) · The idea of evaluating text with metrics
Section by section
Introduction
The chapter introduction explains why the book emphasizes durable LLM production concepts and previews a review of takeaways, future directions, and closing thoughts.
- Durable concepts amid rapid change: Explain that LLM technology changes so quickly that parts of the book may become outdated, which is why the authors emphasize core concepts they expect to endure.
Why it matters: This explains how to use the book even as particular tools and practices change. - Closing chapter roadmap: Describe the chapter’s sequence: step back to review major takeaways, discuss the future of LLMs and possible breakthroughs, then offer final thoughts.
Why it matters: The roadmap frames this chapter as a synthesis and forward look, not another detailed implementation guide.
Key terms: core concepts, constantly changing, major takeaways, future of the field, final thoughts
12.1 A thousand-foot view
The section organizes the book’s production concepts into an idealized LLM product life cycle, then uses that view to introduce what may change in the future.
- Product life cycle quadrants: Describe the four closely tied parts of the LLM product life cycle—Preparation, Training, Serving, and Developing—and explain that Undercurrents affect all four throughout the life cycle.
Why it matters: This overview helps you place individual production decisions in the larger product life cycle. - Idealized infrastructure placement: Explain that the diagram is an idealized life cycle: the authors place MLOps infrastructure provisioning in Preparation because they think it should happen there, even though teams often put it together only when Serving first becomes necessary.
Why it matters: The distinction lets you use the diagram as a planning guide without mistaking it for a description of every real deployment.
Key terms: Preparation, Training, Serving, Developing, Undercurrents, LLM product life cycle, MLOps infrastructure, provisioning, preparation stage, idealized version
12.2 The future of LLMs
This introduction explains why the book emphasized practical, production-tested foundations before turning to possible future directions for LLMs.
- Foundations and hands-on experience: Explain why the book combines foundational knowledge with hands-on examples: production choices vary by use case, and practical experience helps readers judge their consequences.
Why it matters: Sound production decisions require both an understanding of trade-offs and a feel for how a system behaves in practice. - Shift to future possibilities: Describe the section's shift from methods already used in production to directions that may shape LLMs over the next several years, including research and nontechnical influences.
Why it matters: This shift distinguishes emerging possibilities from production-proven methods.
Key terms: foundational knowledge, hands-on, production, production today, research papers, public opinions, lawsuits, political landscapes
12.2.1 Government and regulation
The section explains why real-world LLM products face emerging legal and ethical obligations, using regulation, copyright, AI detection, and chatbot liability to show what builders should consider.
- Product regulation and participation: Explain why an LLM product needs attention to law in a way a demo does not, and describe Utah’s SB-149 as an example of lawmakers defining AI and addressing deceptive supplier conduct. Describe why the authors encourage practitioners to help shape regulations rather than try to predict every future rule.
Why it matters: A product reaches customers and can create legal consequences even when the technology works as intended. - Copyright and data tradeoffs: Describe the copyright risk posed by LLMs reproducing creators’ work and explain the competing concerns raised by The New York Times v. OpenAI. Distinguish the potential cost to AI innovation if copyright liability expands from the potential harm to journalism and future training data if creators lack protection.
Why it matters: How copyrighted material is treated affects both what products may generate and the supply of quality data they depend on. - Limits of AI text detection: Explain why the section rejects AI-text detectors as reliable evidence that a particular person cheated, while allowing that some generated text contains obvious clues. Describe the potential harm of false positives when detector scores are treated like proof of plagiarism.
Why it matters: Unreliable accusations can have serious consequences for people whose writing is judged by these tools. - Moral and ethical responsibility: Distinguish the section’s use of moral responsibility, based on judgments of fault and good or bad, from ethical responsibility, concerning consequences within a society’s practical legal framework. Explain why algorithmic decisions make practitioners need defensible ways to consider both.
Why it matters: A system can contribute to serious harm even when responsibility for that harm is disputed. - Chatbot liability and safeguards: Explain how a company may be held responsible for information its chatbot gives customers, using the Air Canada refund-policy ruling as the section’s concrete example. Describe the safeguards the authors recommend for higher-risk applications: careful prompt engineering, guard rails, and saved logs and customer chat history.
Why it matters: A chatbot’s output can become a company problem, so product teams need to anticipate and document failures.
Key terms: Utah’s SB-149 Artificial Intelligence Amendments bill, deceptive act by a supplier, AI analysis and research program, copyright infringement, The New York Times v. OpenAI, intellectual property, word-for-word responses, AI detection, adversarial machine learning, false positives
12.2.2 LLMs are getting bigger
This section surveys why LLMs and context windows keep growing, the costs that growth creates, and emerging architectures and compression techniques that may make large models more practical.
- Model growth and specialization: Explain why companies are likely to keep building larger models and why smaller companies may instead favor specialized models. State the section’s caveat about whether training data is adequate to demonstrate general intelligence.
Why it matters: Model size is partly a business decision, not just a technical milestone. - Longer context window tradeoffs: Describe the rapid growth in context-window length and explain why very long windows do not eliminate practical limits, especially per-token cost and the shorter windows of many self-deployed models.
Why it matters: A model’s advertised context length is not the same as an affordable, usable context length. - Attention scaling and hybrid alternatives: Explain how quadratic attention makes longer contexts computationally costly, then describe MAMBA as an attention-free state-space alternative and JAMBA as a hybrid of state-space and transformer layers with joint attention.
Why it matters: The cost of attention motivates architectures that can handle long contexts more efficiently. - JAMBA finetuning and inference: Trace the section’s example of loading a JAMBA model and dataset, configuring LoRA finetuning across multiple GPUs, then reloading the model with quantization for inference on less hardware.
Why it matters: The example connects a new architecture to familiar model-training and deployment tools. - Beyond four-bit model compression: Describe the section’s progression from INT4 toward experimental INT2 and sub-bit quantization, and explain why reducing memory requirements could make large models usable on smaller, cheaper hardware.
Why it matters: Compression can widen access to large models without requiring equally large machines. - Speculative decoding benefits and limits: Explain how a smaller assistant model proposes outputs that a compatible larger model checks in parallel, and describe the reported speed benefit, unchanged accuracy, and limits involving sequence length and model compatibility.
Why it matters: Speculative decoding can speed up use of a large model without relying on model compression or accepting less accurate output.
Key terms: emergent behavior, specialized models, training datasets, AGI, context windows, tokens, per-token, quadratic, attention, MAMBA
12.2.3 Multimodal spaces
The section explains how shared embedding spaces can connect different modalities and compares ImageBind and OneLLM as approaches to doing so.
- Shared multimodal embedding spaces: Explain how placing audio, images, text, and other modalities in a comparable embedding space can connect forms of context that language models have not handled together as well, particularly phonetics, semantics, and pragmatics. Describe how this enables cross-modal search, such as finding animal images from a sound clip.
Why it matters: A shared embedding space makes information from different media comparable and opens up new kinds of search. - ImageBind and OneLLM approaches: Distinguish ImageBind’s use of separate encoders to place six modalities in the same embedding dimension from OneLLM’s use of one model and one multimodal encoder for eight modalities, aligned using language. Explain that ImageBind aligns the resulting representations, whereas OneLLM emphasizes aligning the encoding process.
Why it matters: These projects illustrate two different ways to make multiple modalities work together without simply feeding every raw data type to a model.
Key terms: multimodality, phonetics, semantics, pragmatics, embedding space, cross-modal search, ImageBind, CLIP, OneLLM, multimodal encoder
12.2.4 Datasets
This section explains how LLMs are changing dataset governance and organization while exposing gaps in evaluation data and language representation.
- Data governance incentives: Explain why LLMs are pushing companies to govern and manage their data: they want to finetune models, protect a competitive advantage rooted in their data, and avoid others’ mistakes.
Why it matters: These pressures help explain why data management has become a production priority. - LLM-assisted dataset organization: Describe how LLMs help label, tag, organize, and clean data, and how image captioning or embeddings can give previously unstructured datasets useful structure for search, recommendations, and insights.
Why it matters: Making neglected data usable creates practical opportunities beyond model training. - Realistic evaluation dataset gap: Explain why the section calls for better open source evaluation datasets: multiple-choice benchmarks are easy to assemble and score but poorly match the freeform questions users ask LLM applications.
Why it matters: An easy-to-score benchmark may not show how well an application handles real users. - Broader language representation: Explain why datasets need more languages and dialects: underrepresentation biases models toward dominant languages, while broader coverage improves inclusivity and usefulness across international contexts.
Why it matters: A model’s language coverage affects who can use it and how reliably it serves global needs.
Key terms: governing and managing their data, finetune, moat, label, tag, CLIP, captioning images, embedding spaces, structured data, open source datasets
12.2.5 Solving hallucination
The section presents prompt optimization, grounding with retrieved context, and knowledge editing as ways to reduce hallucinations in LLM applications.
- Prompt Optimization for Math: Explain how the DSPy math example tests whether better prompts can improve an LLM’s answers without changing the model. Describe the baseline and optimized results.
Why it matters: The example shows why prompt design should be evaluated rather than treated as a one-off clever phrase. - Grounding and Graph Retrieval: Explain how supplying context can reduce invented answers, why ordinary vector-search RAG can struggle with multipart questions, and how knowledge graphs help. Describe the extra work required to use graph-based retrieval.
Why it matters: Choosing how to retrieve context affects both answer quality and the data engineering a team must undertake. - Targeted Knowledge Editing: Describe knowledge editing as a way to change specific model behaviors or facts, particularly when facts become outdated, and contrast it with retraining or finetuning.
Why it matters: A targeted correction may be preferable when only a fact or two needs updating.
Key terms: DSPy, ChainOfThought, zero-shot, gsm8k_metric, grounding, RAG, semantic search, VectorDB, knowledge graphs, nodes
12.2.6 New hardware
This section argues that new AI accelerators and memory technologies could make LLM production faster and cheaper, while noting that promising hardware does not always survive in the market.
- AI accelerator opportunities: Explain why the authors expect hardware innovation to improve LLM production, distinguishing graphics-oriented GPUs from task-specific ASICs such as TPUs and AI-oriented NPUs.
Why it matters: Hardware designed around AI workloads could offer improvements beyond software techniques such as quantization and compilation. - Large persistent memory benefits: Trace the authors' hypothetical use of fast, cheap, high-capacity, nonvolatile memory like 3D XPoint: a very large model could fit on one GPU, reducing parallelization overhead, while remaining loaded across server restarts.
Why it matters: Memory capacity and persistence could change both model-serving architecture and autoscaling behavior. - Memory technology adoption gap: Describe how 3D XPoint was sold as Optane and demonstrated fast, relatively cheap memory, yet was discontinued amid perceived lack of demand; state that the authors see LLMs as a possible new source of demand, not a guaranteed revival.
Why it matters: A technically capable component may still need a clear market before manufacturers invest in it.
Key terms: GPU, ASIC, TPU, NPU, accelerators, 3D XPoint, 3DxP, Optane, nonvolatile, parallelization
12.2.7 Agents will become useful
The section argues that specialized, limited-task agents are a more promising near-term direction than agents that replace entire professions, and proposes cached embeddings as a way to make such agents more efficient.
- Realistic expectations for agents: Distinguish the authors’ expectation that agents will become useful from claims that they will soon replace entire occupations. Explain why agents that work in limited demos are promising but not evidence of broad autonomy.
Why it matters: It keeps the section’s optimism about agents separate from its skepticism about sweeping replacement claims. - Specialized agents and bot replacement: Describe the smaller, specialized tasks the authors expect agents to handle first, including conversational NPCs, suggested email replies, and replacing brittle resume-processing or screening bots. Explain the proposed role of user choice or fairness in the relevant examples.
Why it matters: These examples show what the authors mean by useful agents rather than general-purpose replacements for workers. - Cached embeddings for multiple tasks: Explain how caching a model’s embeddings or last hidden state can avoid repeating the same computation when several tasks use one input. Describe how task-specific trained layers or linear classifiers can use that shared representation for multiple classifications.
Why it matters: Reusing one representation is the section’s concrete proposal for making multi-task agents more efficient. - Example cached embedding workflow: Trace the example’s use of an INT4-quantized Llama3-ChatQA model, a model-appropriate prompt, and its last hidden state as input to trained task-specific layers or a PyTorch linear classifier. State the roles of quantization and the mentioned LangChain caching helper.
Why it matters: The example connects the proposed reuse of embeddings to a concrete model and classifier workflow.
Key terms: LLM-based agents, prompt engineering, smoke and mirrors, small agents, video game NPCs, applicant tracking systems, fair hiring practices, cache embeddings, last hidden state, linear classifiers
12.3 Final thoughts
The authors close by explaining why the book emphasizes current LLM practices, pointing to changes still needed in the industry, and inviting readers to keep learning and updating the book’s code.
- Current practices and emerging research: Explain why the authors focused on current best practices despite promising research, and describe their expectation that both longstanding and new research will improve LLMs.
Why it matters: The book presents a useful snapshot of a field that is still changing. - Deployment and marketing expectations: Describe the authors' hope that companies will improve how they deploy and serve LLMs, and explain why LLM products are hard to market with traditional demonstrations.
Why it matters: A convincing LLM product must work in practice as people expect it to. - Continued learning and code contributions: Explain why the authors invite readers to submit GitHub pull requests and how they frame the end of the book.
Why it matters: Readers can help keep practical examples useful as the industry changes.
Key terms: current best practices, promising research, deploy and serve LLMs, LLM-based products, traditional methods, PRs, GitHub repo, code and listings
12.4 Summary
The chapter summary recaps the legal, technical, and practical forces likely to shape the future of LLMs.
Concepts explained in this chapter
- language modelA large language model is an artificial intelligence model trained on large text collections to predict and generate human language.
- AI-generated content detectionAn AI detection system is software intended to identify content or activity generated or assisted by artificial intelligence.
- adversarial inputThe study and use of inputs or models designed to manipulate, evade, or expose weaknesses in machine-learning systems.
- copyrightA legal right that grants creators control over the reproduction and distribution of their original works.
- copyright infringementUnauthorized use, reproduction, or distribution of a copyrighted work.
- ethicsPrinciples concerning morally acceptable behavior and the consequences of technological decisions.
- guardrailA guardrail is a constraint or control intended to keep a language model's behavior within acceptable safety or policy boundaries.
- intellectual propertyIntellectual property is a legally protectable intangible creation, information asset, or other proprietary business resource.
- liabilityLegal responsibility for harm, loss, or an obligation resulting from an action or omission.
- regulationA regulation is a rule or legal requirement established by a government or other authority to govern conduct or activities.
- JAMBAJAMBA is a hybrid language-model architecture combining state-space and transformer layers with joint attention.
- MambaMamba is a sequence-modeling architecture based on selective state-space mechanisms and designed to avoid standard attention costs.
- compressionCompression is the reduction of a model's size and computational requirements while retaining acceptable behavior and accuracy.
- context windowContext length is the maximum amount of tokenized input and generated context that a language model can process in one request.
- quantizationQuantization is the conversion of model parameters or computations from higher-precision numerical representations to lower-precision representations.
- speculative decodingSpeculative decoding accelerates generation by having a smaller assistant model propose tokens that a larger model verifies in parallel.
- DSPyDSPy is a framework for programming and optimizing language-model prompts and pipelines through declarative modules and evaluation-driven optimization.
- chain-of-thought promptingChain-of-thought prompting encourages a language model to produce or use intermediate reasoning steps before giving a final answer.
- groundingGrounding is the practice of supplying a language model with relevant external context so its generation is anchored to available information.
- hallucinationA hallucination is generated content that is presented as plausible but is unsupported, inaccurate, or fabricated relative to the relevant facts or source material.
- knowledge editingKnowledge editing is the technique of modifying specific factual or behavioral associations in a trained model without retraining the entire model.
- knowledge graphA knowledge graph represents entities and the relationships between them as a graph of nodes and edges.
- prompt engineeringPrompt engineering is the practice of designing and refining input instructions to influence an AI model's behavior and output.
- retrieval-augmented generationRetrieval-augmented generation is a technique that supplies a generative model with information retrieved from external sources at response time.
- AI agentA software system that uses artificial intelligence to perceive information, make decisions, and perform actions toward goals.
- embeddingA vector is an ordered numerical representation of values in a mathematical space.
- benchmarkA benchmark dataset is a curated dataset used to evaluate and compare model performance on defined tasks.
- datasetA dataset is an organized collection of data used for analysis, evaluation, or machine-learning development.
- multimodalA multimodal solution is an AI system or method that processes or combines information from multiple data modalities.
- productionAn operational environment in which a software system or machine-learning model is live and available to perform real work.
- zero-shot promptingZero-shot prompting is prompting a model to perform a task without providing task-specific examples in the prompt.
- multimodal projection modelA multimodal projection model converts representations from a non-language modality into a form that a language model can process.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.
