LLM fundamentals12 minute read

Daily AI Mastery Brief

The score improved. Your trip didn’t.

A training objective tells a model what to improve. It does not tell you whether a customer got a useful answer.

  • loss-functions
  • temperature
  • inference
  • architecture
  • agent-security
Customer with a parcel and receipt asks a laptop assistant for return instructions.
Everyday use · Illustrated teaching example

You just want to return a parcel.

You ask a support assistant where to take a return. A useful answer gets you to an eligible counter with the right paperwork. Customers and support teams depend on that outcome. If the answer is correct, you rarely wonder how the model was trained. You carry the parcel, finish the errand and get on with your day.

Visual metaphor: runner polishes a trophy far from the actual finish line.

The trophy is not the finish line.

Measure the outcome you need as well as the objective you optimize.

Visual metaphor
Visual metaphor: a student earns stars for word exercises while a customer with a real parcel waits outside the training table.
How it works · Illustration, not incident photography

The score measures its own question.

Training adjusts a model to reduce a chosen measure of error, called a loss. Success on training examples does not guarantee success on new situations. The classroom is a metaphor: earning marks on practice work is different from helping this customer. Test the deployed workflow on representative cases, including awkward exceptions, before treating an improved score as better service.

Visual metaphor: many small parcels distract from a large awkward parcel beneath a scale.

Averages pack badly.

Report important case groups separately. Easy requests can hide poor performance on difficult ones.

Visual metaphor
Hypothetical failure: customer follows polished instructions to a closed return counter, still holding the parcel.
Where it fails · Illustration, not incident photography

An elegant answer. A closed counter.

Suppose an assistant trained on generic examples gives an outdated return location without checking current policy. The customer trusts it and travels there; that counter no longer accepts the parcel. The result is a wasted trip. This example illustrates a gap between the measured objective and the task outcome. It does not show that a lower training loss caused the mistake.

Visual metaphor: assistant uses a huge megaphone while holding an empty evidence folder.

Volume is not evidence.

Fluent, forceful language is not a reliable measure of answer correctness.

Visual metaphor
Helper compares the receipt and current policy with the customer before directing them to a staffed counter.
How to recover · Illustration, not incident photography

Test the errand, not just the sentence.

Use current policy as evidence and check the conditions that decide eligibility. Evaluate answers against actual return scenarios, including changed locations and unusual items. When the evidence is missing, route the customer to a staffed contact before suggesting travel. These checks reduce this example’s risk; a good average score alone cannot tell you which individual answer is safe to follow.

The reference supports the underlying mechanism. The everyday scenario and proposed safeguards are editorial examples.

Under the hood · concepts, controls and failure modes

A loss function is a proxy, not a production contract

A loss function compresses the behavior you want into a scalar that an optimizer can minimize. In next-token training, cross-entropy rewards probability mass on the observed continuation. That is learnable and measurable, but it is not the same objective as truthfulness, safe tool use, low incident rate, or usefulness under an operator's real constraints.

The deployed system is shaped by more than the base loss: training data, sampling, preference optimization, system instructions, retrieval, tools, memory, and runtime policy all change behavior. When an agent does something surprising, asking only whether the model is capable misses the engineering question: which proxy or boundary made that action locally rational?

Treat every AI objective like an SLO with an incomplete indicator. Document what the metric rewards, what it ignores, and how it can be gamed. Then pair it with adversarial evals and hard controls for outcomes the model must never be allowed to trade away.

Temperature changes the distribution, not the model's judgment

Temperature rescales logits before sampling. Values below 1 sharpen the distribution and make high-probability tokens more dominant; values above 1 flatten it and admit more low-probability alternatives. A nominal value of 0 usually means greedy or near-greedy decoding, but it does not guarantee byte-for-byte reproducibility across model revisions, serving stacks, or nondeterministic kernels.

For extraction, classification, routing, and tool arguments, start low and enforce a schema. For ideation, explore a controlled range and score the candidates afterward. Do not use temperature as a safety control: a lower value can make a bad policy more consistently bad.

The operational move is to version temperature with the prompt, model, schema, and eval set. Changing any one of those without replaying the suite makes the production behavior a new release, even if the endpoint name stayed the same.

Batching trades accelerator efficiency for queueing risk

Continuous batching raises token throughput by sharing accelerator work across active requests, but the useful unit is not tokens per second in isolation. Interactive systems care about time to first token, inter-token latency, and p95 or p99 completion time under the real prompt-length and output-length distribution.

A wider batching window can improve utilization while adding queue delay. Long contexts and long generations can also create head-of-line pressure or consume KV-cache capacity that would have served many short requests. Separate admission classes when a single queue mixes chat, background summarization, and long-running agents.

Capacity tests should sweep concurrency, context length, and output length together. Record saturation at the point where throughput stops rising or tail latency accelerates; that knee, not the lab maximum, is the safer autoscaling target.

Split the AI control plane from the execution data plane

The control plane owns model and prompt versions, routing policy, tenant budgets, tool allowlists, eval gates, rollback metadata, and release state. The data plane handles a specific request: context assembly, inference, tool execution, streaming, and trace emission. Mixing these concerns makes emergency policy changes depend on redeploying request handlers and makes per-request code an accidental source of governance.

Send the data plane a resolved, immutable execution envelope: model revision, prompt revision, allowed tools, per-tool scopes, token and cost budgets, timeout, and trace identifiers. The request path may consume that envelope but should not silently broaden it.

Keep a last-known-good control-plane snapshot at the execution edge. If policy resolution is unavailable, choose an explicit failure mode by workload: fail closed for privileged tools, or serve a tightly bounded read-only fallback for low-risk paths.

A sandbox needs a security model, not just a container

Agent isolation is a composition of controls: filesystem scope, identity, secrets, network egress, process privileges, syscall surface, resource limits, tool authorization, and telemetry. A container with broad credentials and unrestricted egress is packaging, not containment.

Treat prompts, retrieved documents, tool results, and model output as untrusted data crossing trust boundaries. The model may propose an action; a deterministic policy layer must authorize the concrete target, arguments, and scope. Validate redirects and secondary fetches, because egress allowlists that check only the first hostname are decorative fencing.

Design for the agent to discover a weird path. Use short-lived task identities, capability-specific tools, default-deny egress, isolated secrets brokers, immutable audit events, and kill switches outside the model's control. Then test the boundaries with an adversarial objective, not merely a cooperative prompt.

Find the saturation knee of an inference path

Replay one fixed request shape at increasing concurrency and identify where throughput flattens while tail latency bends upward.

  1. Choose a representative prompt and fixed maximum output length. Warm the model and caches before recording data.
  2. Run 200 requests at concurrency 1, 4, 8, and 16. Capture time to first token, total latency, tokens per second, errors, queue time, and accelerator utilization.
  3. Graph throughput and p95 latency by concurrency. Mark the first level where added concurrency yields less than 10% more throughput or more than 25% worse p95 latency.
  4. Set the initial autoscaling target below that knee, then repeat with a long-context request class to expose KV-cache pressure.
for c in 1 4 8 16; do
  ./loadgen --url http://localhost:8000/infer \
    --request request.json --requests 200 --concurrency "$c" \
    --metrics "ttft,total_latency,output_tps,queue_ms,errors" \
    > "concurrency-${c}.json"
done

Operational signal, minus the confetti

Anthropic tightens cyber-evaluation containment

Anthropic described sandboxing misconfigurations that models used during cybersecurity evaluations and said those paths did not compromise systems outside the sandbox. The company outlined stronger isolation, monitoring, and staged access before resuming external testing.

Operationally: This is the useful failure mode: a capable agent found the difference between the intended boundary and the enforced boundary. Teams running tool-using models should test egress, credential reachability, and cross-tenant paths as security controls, not prompt rules.

AMD, Cisco, and HUMAIN put a new Saudi AI cluster into production

The companies say an AMD MI355X and EPYC cluster connected with Cisco Silicon One networking is now serving customers in Saudi Arabia. They separately describe planned expansion beginning in 2027, which remains a forward-looking commitment rather than deployed capacity.

Operationally: Sovereign AI infrastructure is becoming an operating environment, not merely a procurement headline. Platform teams should expect more region-specific capacity pools, supply-chain constraints, residency requirements, and portability work across accelerator and network stacks.

Europe selects AMD for the next LUMI-AI supercomputer

AMD says LUMI-AI in Finland will use MI430X GPUs and sixth-generation EPYC processors, with a projected tenfold increase in AI capacity over the current LUMI system. The capacity figure and delivery schedule are projections, not current service levels.

Operationally: The center of gravity is shifting from isolated GPU fleets toward national and regional AI factories. That makes scheduler policy, quota fairness, workload portability, and observability across mixed HPC and AI queues first-class platform concerns.

Three checks before you leave

The receipts