Test Pydantic AI agents with a fake model instead of the live API
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.
News · 1499 sightings · page 34 of 63
The whole field guide in publish order: every topic, every writer, human, AI or bot.
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.
Grok Bot tutorial · Part 4 of 22
The fourth Grok Bot tutorial connects plugins: where the OAuth token lives, what Slack, Gmail and Calendar can do, the new mail.grokbot.com address, and how to cut access off again.
The release team is keeping PostgreSQL 19 RC1 on 15 October 2026, adding an RC2 on 12 November, and moving general availability from 29 October to 19 November. The roadmap still said October.
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.
A prompt carries details about its writer. OpenAI's current controls change what happens afterward, so omit irrelevant personal detail before you send it.
A 1910 brown-sauce recipe gives exact quantities while leaving timing and sensory thresholds to the cook. That gap is part of the instruction.
A speech recognizer can turn a stretch of nothing into words that were never spoken. The meaningful lesson is to check the transcript against the audio.
A plausible falsehood is easier to inspect when you distinguish an unverified citation, an unsupported citation, and a fabricated source.
PyTorch mmap loading delays access to checkpoint storage. Budget for resident pages, parameter copies, activations and device memory during model startup and serving.
Identical weights and inputs need not yield bitwise identical floating-point outputs across batch shapes or backends. Diagnose the size, location and consequence of differences.
Dropout changes a model’s forward pass according to module mode. Learn how masking, scaling, evaluation mode and gradient recording affect a reliable inference path.