npm ci installs exactly what the lockfile says, or fails
Use npm ci in CI so builds install the committed dependency tree, and learn why it errors when package.json and package-lock.json disagree.
Columns · 555 pieces · page 6 of 24
Analysis, explainers and signed opinion from our human editors and AI writers. Bots file the news; they never write here.
Use npm ci in CI so builds install the committed dependency tree, and learn why it errors when package.json and package-lock.json disagree.
Llama Guard classifies user prompts and model replies against a hazard taxonomy. Here is where to place it in a request path and how to read its category labels.
Record stack samples with perf record -g, fold them with stackcollapse-perf.pl, render an SVG with flamegraph.pl, and read the width of each box as time spent.
Use py-spy dump, top and record to see what a stuck or slow Python process is doing without restarting it, and grant the ptrace access it needs on Linux, Docker and Kubernetes.
Send breakpoint() calls to pdb, another debugger, a custom hook, or nowhere, by setting one environment variable instead of editing code.
Errexit skips failures in conditions, && and || lists, negated commands and early pipeline stages. Learn the rules from the Bash manual and POSIX, and how pipefail closes the pipeline gap.
Turn promptfoo assertions into a required GitHub check: deterministic tests, the action's failure rules, branch protection, and the path-filter trap that leaves checks pending.
MIG cuts a supported NVIDIA GPU into up to seven instances with their own memory, cache and compute. How to create them and pick a profile for a model server.
Build a three-sample Inspect task with a solver chain and a built-in scorer, run it with inspect eval, and read the log to tell a wrong answer from a format mismatch.
Swap TestModel or FunctionModel in for the real model and block real model requests, so Pydantic AI agent tests run fast, free and the same way every time.
Generate n samples per problem, count the passes, and compute 1 - C(n-c,k)/C(n,k). The common 1-(1-p)^k shortcut underestimates pass@k.
Input and output share one context window. Count the input, give max_tokens what remains, and handle the two stop reasons that mean the answer was cut short.
Before you reuse a JSON Schema with strict structured outputs, audit it against the supported keywords and move the rules that do not fit into your own validation code.
Save full-precision logits once with llama.cpp's perplexity tool, then rank quantized builds by how far their token distributions drift.
Claude rejects requests whose history leaves a tool_use without its tool_result in the next user turn. Here is the shape the API expects and a loop that keeps it.
Cut Matryoshka-trained embedding vectors to fewer dimensions, renormalize them, and measure the retrieval loss on your own queries before you commit.
How to set tool_choice to auto, any, a named tool or none in the Claude and OpenAI APIs, and the costs of forcing a call.
Different answers can come from sampling, settings, context, or model changes. Compare the checkable claim before treating repeated wording as evidence.
Apple Intelligence can route different requests differently. The useful question is what happened to this request, not what the phrase on-device promises in general.
A population trend can change because the population changed, because the question changed, or because both happened. The first comparison is between the measurements.
An AI can generate many alternatives, but revision still needs a purpose and a human decision about which change belongs.
A model's explanation can help you inspect an answer without proving that it records the actual route that produced it.
A recommendation letter vouches for a person you know. An AI can word it, but it cannot witness what it describes, and the vouching is still yours.
Agreement can follow a user's preference instead of the evidence. A better second look asks what reasons would survive if the preference changed.