TECHNOLOGY

How can an application keep a transcript while trimming the model input?

In this article
THE QUICK TAKE

Accept a run only when the transcript and the active context each meet their own contract.

Pydantic AI v2.76.0, published November 26, keeps messages added by a run in result.conversation even when a capability trims the history during that run. The returned transcript and the prompt sent later can therefore serve different purposes.

What the source establishes

Choose a clear distinction between a record of what happened and the bounded slices sent to the model. A retention decision for the record is separate from the context policy. Keep the model, task and tool definitions fixed while you change the session behavior.

Design the comparison

Run a synthetic multi-turn task that trims mid-run. Compare the sequence of messages returned in result.conversation with the actual model input after trimming. Repeat a completion and watch for duplicate entries. Use simulated state and authorized no-op tools for the decision points in the example. Trace the structured result as well as the visible text.

Read the results

Confirm that omitted context and omitted history are not confused in UI and logs. Use artificial identifiers to trace messages without storing their content in production. Check exactly which state the next turn receives. Classify decisions made by the runtime separately from those made by the model. Collect the primary outcome together with a measure of workload size. Preserve errors, timeouts and explicit fallbacks in the reported population. A median from successful samples can conceal a subgroup that operates on a different path. Store enough diagnostic context for another engineer to explain which part of the system caused the difference.

Decide what goes into service

Accept a run only when the transcript and the active context each meet their own contract. Document which view powers replay or audit. State the acceptance threshold before choosing the implementation. Add the tested boundary and conditions for revisiting it to the release record. If an observed behavior differs from expectations, narrow the scope of the rollout while collecting evidence for that case. Keep the prior artifact or configuration available so the comparison remains repeatable.

Sources

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles