Part IV / One Machine

What changes across agents

The vocabulary transfers. The trustworthy feedback, environment boundary, horizon, and serving contract do not. Comparing cases prevents us from mistaking one successful recipe for a universal pipeline.

21
Anchor

Incident-reasoning engine with evidence and partial observability.

Contrasts

Coding agent, conversational operations agent, and inference optimizer.

Question

Which parts of the learning and serving contract change?

Same grammar, different physics

Every agent has information, choices, consequences, and feedback. That common grammar lets us use observation, action, trajectory, policy, and reward across products. But environments differ in how reversible actions are, whether outcomes are verifiable, how long consequences take, and how much exploration is safe.

Mental model

Map the nouns first; choose the optimizer last. The environment and evaluator decide what kind of learning signal exists.

ConceptIncident reasoningCoding agentConversational operationsInference optimizer
EnvironmentSeeded topology, telemetry, logsRepository, toolchain, test sandboxUser, policies, business systemsRuntime, hardware, workload generator
ObservationAlert and tool evidenceFiles, command output, test failuresMessages, tool results, user stateLatency, goodput, quality, memory
ActionQuery, hypothesis, conclusionEdit, command, test, responseReply, tool call, escalationServing configuration or experiment
TrajectoryInvestigation traceDevelopment session and patchTask conversation or workflowSequence of trials and allocations
RewardCause, evidence, calibration, costTests, review, security, task successCompletion, preference, complianceQuality-gated SLO goodput and cost

Case A: the coding agent

Concrete example

A coding agent receives a failing issue, inspects a repository, edits two files, runs focused tests, observes a failure, fixes the implementation, and returns a patch that passes the protected suite.

Code offers unusually strong verifiable feedback: compilation, type checking, unit tests, integration tests, static analysis, and hidden tests. That makes coding a natural RLVR domain. Yet "tests pass" is incomplete. The policy can delete tests, hard-code fixtures, expose secrets, introduce insecure behavior, or optimize visible tests while failing hidden requirements. The sandbox must protect specification artifacts and constrain destructive actions.

The state includes repository contents, environment, issue intent, and hidden tests. The observation is what the agent reads. Actions include tool calls and tokenized edits. The horizon can be hundreds of actions; later failures depend on early architectural choices. Process rewards can value focused testing, minimal changes, reviewable diffs, and safe commands, but over-detailed process rubrics risk teaching ceremony instead of engineering judgment.

Inference shape includes large repository context, repeated prefix reuse, brief command-generation turns, and long external tool gaps. Background coding tasks may value task goodput; interactive pair programming values TTFT and responsiveness. A model update that runs twice as many tests can improve correctness and double sandbox and context cost.

Case B: the conversational operations agent

A conversational operations agent helps a user reset an account, change a reservation, understand a bill, or escalate a sensitive issue. The user is part of the environment and cannot be reset to an identical seed. Feedback is noisy: explicit ratings are sparse, task completion can be delayed, and user satisfaction may conflict with policy compliance.

Offline imitation and preference learning are often safer starting points than online exploration. Simulators can cover common workflows but may not reproduce real human reactions. A human approval or deterministic business-system outcome can provide grounded milestones. Hard constraints protect authentication, privacy, refunds, and escalation. The reward should not encourage the agent to avoid difficult users, manipulate ratings, or complete tasks without informed consent.

Inference is strongly user-visible. Low TTFT and natural streaming matter. Tool calls create pauses that should be narrated without fabricating completion. Conversation histories create KV and prefill pressure; summarization or retrieval changes what the policy observes. Multilingual and accessibility requirements broaden the workload beyond one benchmark.

Partial observability

The user's real goal, emotional state, and external circumstances are hidden. A confident response is not evidence that the agent inferred them correctly. Ask, confirm, and preserve uncertainty.

Case C: the automated inference optimizer

An automated inference optimizer chooses runtime settings, precision, tensor parallelism, batching limits, chunked-prefill policy, speculative method, draft length, and autoscaling thresholds. The environment is a benchmark harness plus hardware pool. Observations include quality, TTFT, ITL, throughput, memory, failures, and cost. The action is an experiment configuration or allocation decision.

If every trial is independent and the optimizer chooses the next configuration from results, the problem can be Bayesian optimization or a contextual bandit. If capacity allocation changes future queue state, warm caches, and startup, it becomes sequential. The reward must gate quality and reliability before valuing speed. Otherwise the easiest win is a smaller model or lower precision that no longer satisfies the task.

Benchmarks are themselves environments and can be overfit. Maintain private workload traces, rotate scenario families, test at several loads, and promote only after a production canary. An agent that writes serving configurations also needs permissions, audit logs, budget limits, and rollback. "Auto" shifts human work from hand-tuning every value to defining a valid experiment and release boundary.

What generalizes

Version everything
Policy, environment, tools, feedback, runtime, and evaluation data.
Protect the specification
Hidden tests, causal oracle, policies, and quality gates must not be writable or leaked.
Separate diagnostics
Do not let one scalar hide correctness, behavior, cost, latency, and safety.
Use untouched evaluation
Training reward and release evidence need independent failure surfaces.
Measure end to end
The policy changes tool usage and workload shape; serving changes experience cost and behavior.

What does not generalize

Coding has abundant deterministic checks; conversational work has human ambiguity; incident reasoning mixes hidden causal truth with incomplete evidence; inference optimization has precise system metrics but easy benchmark overfitting. Reward density, safe exploration, episode boundaries, and acceptable automation differ.

GRPO may be sensible for eight code solutions with hidden tests and inappropriate for live customer conversations. DPO may be ideal for reviewed conversational pairs and insufficient for a tool agent whose consequences only appear after interaction. A contextual bandit may optimize routing while hierarchical RL organizes a long investigation. Choose from the problem's physics.

Misconception: tests make coding reward solved

Tests verify the behavior they cover under a protected environment. They do not automatically cover security, maintainability, hidden requirements, performance, or integrity of the test suite itself.

References