liveBook · Manning

Cost

Cost is the monetary expenditure, computational or other resource consumption, effort, or burden incurred in acquiring, producing, operating, or performing something.

How 10 Manning books explain it

Bayesian Optimization in Action

Querying cost is the computational, monetary, or resource expense incurred by evaluating an objective at a specified fidelity.

How it is used
Balances expensive target evaluations against cheaper approximations during multifidelity Bayesian optimization.
How deep it goes
Defines fidelity-dependent cost, develops a linear model, and uses inverse-cost information weighting; notes that nonlinear BoTorch models are possible.
Examples
Uses low- and high-quality simulations and a Forrester-function approximation with fidelity costs of 0.5 and 1.
What you can do after
Apply it via BoTorch cost models and inverse-cost utility to select cost-effective multifidelity queries.

Read how Bayesian Optimization in Action explains cost →

Machine Learning System Design

Compute cost is the computational resource expenditure required to execute a model or system operation.

How it is used
Guides inference-pipeline design by weighing resource expenditure against load, model value, latency, throughput, and reliability.
How deep it goes
Explains scaling, device placement, architecture, and accuracy tradeoffs, but stops short of detailed cost formulas or infrastructure budgeting.
Examples
Uses low-end GPU overload, mixed CPU-GPU serving, device-side inference, and model-size accuracy comparisons.
What you can do after
Evaluate inference designs by estimating scaling behavior and selecting a model-platform balance that meets operational requirements.

Read how Machine Learning System Design explains cost →

Grokking Algorithms, Second Edition

A cost is a numerical amount representing the time, distance, or other expense associated with reaching a node or traversing an edge.

How it is used
Tracks the expense of reaching each node so Dijkstra’s algorithm can find a cheapest route.
How deep it goes
Works through a costs table and implements its updates in Python, including unknown costs represented by infinity.
Examples
Uses paid trades toward a piano and a timed route from Start to Finish.
What you can do after
Build it from scratch in Python by storing edge costs, updating node costs, and recording parents for the cheapest route.

Read how Grokking Algorithms, Second Edition explains cost →

Microsoft Azure in Action

Cost is the monetary amount incurred for consuming cloud resources or services.

How it is used
Frames Azure service and architecture choices as budget decisions alongside compute, networking, and storage.
How deep it goes
Works through a service-level monthly estimate and concrete VM savings options, without cataloging every price or pricing tier.
Examples
Uses an image-resizing application’s $36.94 monthly estimate and VM choices such as auto shutdown, Spot Instances, and reserved instances.
What you can do after
Operate/configure it by enabling VM auto shutdown, assessing Spot or reserved instances, and checking the displayed price before creation.

Read how Microsoft Azure in Action explains cost →

Digital Twins in Action

Cost is the monetary or resource expenditure required to operate, store, transfer, or compute within a system.

How it is used
Frames architecture and production decisions around whether a digital twin’s benefits exceed its build and operating costs.
How deep it goes
Breaks spending into build and operating components, works through per-decision inference costs, and gives operational controls without a detailed budgeting procedure.
Examples
Compares a $4.80-per-day AI agent with a negligible-cost rule for home energy control, and contrasts bearing replacement with motor failure.
What you can do after
Evaluate/understand it by estimating recurring inference expense, comparing it with potential savings, and reviewing infrastructure costs as workloads change.

Read how Digital Twins in Action explains cost →

Building Reliable AI Systems

The monetary expense of using an API service, typically based on usage.

How it is used
Frames API spending as a production constraint that requires request-level measurement and alerts.
How deep it goes
Works through token-based examples, logging priorities, and anomaly checks; does not establish a universal price per token.
Examples
Uses a 1,247-token support exchange, an inference-heavy request timeline, and prompt-change and model-routing cost incidents.
What you can do after
Diagnose/debug with request logs and cost alerts to prioritize investigations into rising LLM API spending.

Read how Building Reliable AI Systems explains cost →

Grokking AI Algorithms, Second Edition

Computational cost is the processing effort required by a function or algorithm, commonly measured by operations or execution time.

How it is used
Frames algorithm selection and LLM architecture design as trade-offs involving processing effort, scaling, memory, hardware, and latency.
How deep it goes
Defines Big O through constant, linear, and quadratic examples, then compares compute cost with memory, hardware efficiency, energy, and latency.
Examples
Uses handshaking analogies, list iteration, pairwise comparison, and large-language-model training on GPU clusters.
What you can do after
Evaluate algorithms and model architectures by comparing operation growth, hardware demands, energy use, memory needs, and latency.

Read how Grokking AI Algorithms, Second Edition explains cost →

AI Agents and Applications

The expense incurred when running a trained model to produce outputs, commonly calculated from usage such as processed or generated tokens.

How it is used
Guides model selection and workflow design by balancing inference expense against accuracy and response speed.
How deep it goes
Compares model size, per-token charges, and task routing without detailing a full cost-accounting procedure.
Examples
Uses customer-support chatbots, legal-document analysis, and GPT-5 model routing as concrete cost trade-off examples.
What you can do after
Apply via LangChain by selecting models and routing tasks according to accuracy, speed, and cost requirements.

Read how AI Agents and Applications explains cost →

Delivering Machine Learning Projects: From design to deployment

Cost is the monetary expense associated with deploying or operating a model and its required components.

How it is used
Frames cost as a nonfunctional requirement that can determine model selection and production feasibility.
How deep it goes
Defines cost, identifies licensed components and execution volume, and stops short of a detailed pricing or estimation method.
Examples
Uses licensed subcomponents and millions of classifier executions to illustrate how deployment choices create expense.
What you can do after
Evaluate model candidates against execution volume, infrastructure expense, and competing nonfunctional requirements before deployment.

Read how Delivering Machine Learning Projects: From design to deployment explains cost →

Build Applications with Local AI Models on a Mac

The monetary expense of operating an AI system, including service charges and local operating expenses.

How it is used
Frames cost as a practical reason to compare cloud services, local AI, and agents that make repeated calls.
How deep it goes
Works through input- and output-token billing, then calls for measured usage and broader operating-cost comparisons.
Examples
Compares two bills for identical token counts and provides a table of API rates and local-deployment expenses.
What you can do after
Evaluate/understand it by estimating bills from measured tokens and tool charges, then comparing hosted and local operating costs.

Read how Build Applications with Local AI Models on a Mac explains cost →

Related concepts

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.