liveBook · Manning

Trajectory

A trajectory is an ordered sequence of states, actions, events, or operations that records or describes progression through successive steps or over time.

How 19 Manning books explain it

Effective Platform Engineering

Tracing is the recording and analysis of request paths and spans across components of a distributed system.

How it is used
Diagnoses cross-process requests when metrics and logs alone cannot explain why an event occurred.
How deep it goes
Defines request-scoped events and sketches trace ingestion and correlation, but does not provide instrumentation code.
Examples
Illustrates diagnosis with HTTP-error metrics and API-call logs, and shows Tempo and Grafana as a tracing architecture.
What you can do after
Apply it via Tempo and Grafana to query trace data for distributed-system troubleshooting.

Read how Effective Platform Engineering explains trajectory →

Grokking AI Algorithms, Second Edition

An episode is a complete reinforcement-learning trial consisting of the states and actions from an initial state until a terminal outcome.

How it is used
Frames each trial as a bounded sequence that can be repeated to train a reinforcement-learning agent.
How deep it goes
Defines an episode and walks through its training steps, without introducing formal trajectory notation.
Examples
Uses a self-driving car reaching its goal in 14 actions and taking repeated trial runs from parking-lot starting positions.
What you can do after
Practice/perform repeated Q-learning episodes by resetting a simulator, taking actions, and updating action values after each step.

Read how Grokking AI Algorithms, Second Edition explains trajectory →

Quarkus in Action

Tracing data is telemetry describing the operations and timing of requests as they pass through application components and services.

How it is used
Uses request traces to troubleshoot failures and locate performance bottlenecks across components and services.
How deep it goes
Defines trace IDs, spans, nesting, and cross-service propagation, then sets up automatic collection rather than manual instrumentation.
Examples
Shows a product-creation trace with REST and database spans and a car-availability request’s span graph.
What you can do after
Operate/configure tracing with Quarkus OpenTelemetry and Jaeger to inspect request paths and operation timings.

Read how Quarkus in Action explains trajectory →

AI Agents in Action, Second Edition

An execution history is a record of operations and attempts performed during an agent's task.

How it is used
Tracks what an agent tried during a task so its tool chains and results can be inspected.
How deep it goes
Defines execution history as workspace state and shows inspection of call order, inputs, outputs, and timing; does not specify a trajectory schema.
Examples
Shows a research-planning agent chaining source-listing and URL-lookup tools, then inspecting their calls in a trace.
What you can do after
Diagnose/debug with it by following model and tool calls, checking their timing, and finding activity through correlation identifiers.

Read how AI Agents in Action, Second Edition explains trajectory →

LLMs in Production

Model tracing is the capture of operations invoked during a model execution to construct an intermediate computational representation.

How it is used
Captures operations invoked during a model run to create an intermediate representation for later optimization and compilation.
How deep it goes
Defines tracing and demonstrates torch.jit.trace on a tokenized GPT-2 input.
Examples
Uses tokenized GPT-2 input and a CLIP example where text-only tracing prunes image operations.
What you can do after
Apply tracing with torch.jit.trace to produce a TorchScript representation for TensorRT compilation.

Read how LLMs in Production explains trajectory →

Optimization Algorithms: AI techniques for design, planning, and control problems

A sequence of states and actions generated during an agent's interaction with an environment.

How it is used
Frames the agent’s interaction history for evaluating policies and calculating cumulative return.
How deep it goes
Defines the state-action sequence and demonstrates collection through reset, action selection, stepping, reward accumulation, and termination.
Examples
Uses Reach the Treasure and CartPole episodes to illustrate discrete outcomes, observations, rewards, actions, and termination.
What you can do after
Apply it by collecting environment transitions, tracking episode rewards, and inspecting rollout statistics during A2C or PPO training.

Read how Optimization Algorithms: AI techniques for design, planning, and control problems explains trajectory →

Reinforcement Learning from Human Feedback

An episode is a finite sequence of interaction steps experienced by an agent during one trial.

How it is used
Frames reinforcement-learning interaction as sequences that policies sample and optimize for expected return.
How deep it goes
Defines trajectory notation, factors its probability, connects it to return optimization, and contrasts multistep RL with single-step RLHF rollouts.
Examples
Uses thermostat episodes, CartPole rollouts, and prompt-completion episodes to show trajectory structure and learning.
What you can do after
Evaluate and optimize policies by representing interactions as sampled trajectories and computing their accumulated rewards.

Read how Reinforcement Learning from Human Feedback explains trajectory →

Evolutionary Deep Learning: Genetic algorithms and neural networks

An episode is one complete trajectory of interaction between a reinforcement-learning agent and its environment, from an initial state to termination.

How it is used
Organizes reinforcement-learning interaction into complete environment episodes for training and agent evaluation.
How deep it goes
Explains the reset-action-step loop and termination conditions, but stops short of formal trajectory notation or rollout distribution analysis.
Examples
Uses Frozen Lake episodes and Lunar Lander training episodes as concrete rollout examples.
What you can do after
Apply it via OpenAI Gym to run, record, train on, and evaluate complete agent-environment trajectories.

Read how Evolutionary Deep Learning: Genetic algorithms and neural networks explains trajectory →

AI Agents and Applications

Execution history is the recorded sequence of workflow decisions, transitions, and intermediate states produced during graph execution.

How it is used
Makes workflow decisions, intermediate states and agent handoffs inspectable when a final answer does not explain how execution unfolded.
How deep it goes
Explains state accumulation and conditional routing, then gives tracing setup and inspection steps without detailing trace storage internals.
Examples
Uses a research workflow that may repeat search, an agent execution trace, and customer-service routing with recorded agent handoffs.
What you can do after
Diagnose/debug with it by inspecting reasoning paths, replaying from checkpoints, or tracing incorrect tool choices and slow calls.

Read how AI Agents and Applications explains trajectory →

Generative AI in Action

Tracing is the technique of following a request through the operations and services involved in processing it.

How it is used
Tracks request routes as part of LLM application observability, helping locate bottlenecks and optimize processing.
How deep it goes
Defines request-route tracking and its diagnostic purpose, without detailing tracing implementation.
Examples
Identifies complex applications with multiple models or services and microservice-based architectures as tracing contexts.
What you can do after
Diagnose bottlenecks and problems by following request routes through applications and services.

Read how Generative AI in Action explains trajectory →

Graph Neural Networks in Action

A time-ordered sequence of positions or states describing the evolution of an entity.

How it is used
Predicts future positions or motion from observed trajectories in dynamic graph problems such as pose estimation.
How deep it goes
Traces NRI encoding, recurrent decoding, training losses, and future-horizon evaluation without deriving the model mathematically.
Examples
Tracks a walking body’s sensor positions and velocities, then predicts node motion across future timesteps.
What you can do after
Predict future node trajectories by conditioning a recurrent decoder on inferred edge-type probabilities.

Read how Graph Neural Networks in Action explains trajectory →

Build a Reasoning Model (From Scratch)

A generated response trajectory sampled from the model, treated as one complete candidate output in policy optimization.

How it is used
Supports GRPO by generating candidate answers that are scored and compared before policy updates.
How deep it goes
Defines rollout as a complete generated answer, then shows sampling and downstream use in policy gradient loss.
Examples
Uses a chef analogy, a math prompt sampled with top-p and temperature, and several candidate answers.
What you can do after
Builds and samples complete candidate responses for GRPO training and later loss computation.

Read how Build a Reasoning Model (From Scratch) explains trajectory →

Build an AI Agent (From Scratch)

An execution trace is a chronological record of events and intermediate activity produced during program or agent execution.

How it is used
Uses trajectories to debug individual agent runs and evaluate whether successful answers came from reasonable paths.
How deep it goes
Defines request-wide traces, spans, and events, then gives a trace-inspection call and a trace-based evaluation workflow.
Examples
Shows a Python display_trace() call and examines failed tool calls, unnecessary calls, and backtracking.
What you can do after
Diagnose/debug with it by locating failures in a run, then evaluate/understand recurring path errors across representative requests.

Read how Build an AI Agent (From Scratch) explains trajectory →

Google Anthos in Action

A rollout is the controlled deployment of a new application or service version and its progression toward the intended state.

How it is used
Advances an application release through target environments in a managed delivery pipeline.
How deep it goes
Details release creation, target promotion, and approval or rejection, without explaining rollout internals.
Examples
Uses a test-to-staging-to-production pipeline with optional manual promotion approvals.
What you can do after
Operate Google Cloud Deploy to create releases, promote rollouts, and approve or reject gated deployments.

Read how Google Anthos in Action explains trajectory →

gRPC Microservices in Go

Tracing records and correlates the path and timing of requests as they propagate through distributed components.

How it is used
Uses traces to follow requests across services and investigate latency in distributed systems.
How deep it goes
Defines traces and spans and explains gRPC span metadata, without detailing instrumentation setup.
Examples
Shows a PlaceOrder trace with database and Payment operations, plus gRPC span metadata.
What you can do after
Diagnose request latency by grouping operations with trace IDs and inspecting service-to-service flows.

Read how gRPC Microservices in Go explains trajectory →

100 Go Mistakes and How to Avoid Them

An execution tracer is a diagnostic tool that records runtime events such as scheduling, synchronization, and processor activity over time.

How it is used
Uses runtime traces to investigate performance, including garbage collection, goroutine execution, and poor parallelization.
How deep it goes
Explains event capture and timeline interpretation, including goroutine activity, CPU gaps, and garbage collection.
Examples
Compares traces from two parallel merge-sort implementations to expose goroutine overhead and differences in execution.
What you can do after
Diagnose poor parallelization by capturing and inspecting a Go execution trace.

Read how 100 Go Mistakes and How to Avoid Them explains trajectory →

Machine Learning Platform Engineering

Tracing is the recording and correlation of operations across a system to reveal execution paths, timings, and intermediate results.

How it is used
Makes LLM applications observable so teams can analyze behavior and optimize performance in production.
How deep it goes
Integrates callback instrumentation and business metadata to capture detailed traces.
Examples
Uses Langfuse with a DakkaBot RAG pipeline and a dashboard of traces, costs, and latency.
What you can do after
Diagnose poor answers by inspecting retrieval quality, prompt effectiveness, and reasoning chains.

Read how Machine Learning Platform Engineering explains trajectory →

Platform Engineering on Kubernetes

Tracing is the practice of recording and correlating the operations performed during a request across services and infrastructure.

How it is used
Uses tracing to understand distributed application behavior and performance and to help find problems.
How deep it goes
Explains service instrumentation and the OpenTelemetry collector architecture without detailing implementation steps.
Examples
Uses instrumented services sending telemetry to an OpenTelemetry collector as its architecture example.
What you can do after
Understand which services call other services or infrastructure and assess their performance.

Read how Platform Engineering on Kubernetes explains trajectory →

Building LLM Applications with DSPy

A history of language-model calls, candidate prompts, and the model's responses.

How it is used
Uses execution histories to guide prompt optimization and lets evaluation metrics accept a trace that is None during evaluation.
How deep it goes
Defines traces and describes SIMBA comparing scored executions, without detailing the full trace data structure.
Examples
Contrasts a flight request mislabeled as a quantity inquiry with the correct booking-request classification.
What you can do after
Understand how an optimizer can compare execution histories and derive module-specific advice for future inputs.

Read how Building LLM Applications with DSPy explains trajectory →

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.