← Back to Reading
Daily Dose of DS 2026-11-27

​How to test Agents using Agents

DailyDoseofDS announced that the price for its lifetime access membership will increase by 50% in two days, moving from two times to three times the yearly subscription price. Lifetime access includes existing and future AI engineering blueprints, covering more than 140 resources across diverse topics such as reinforcement learning, agentic systems, MLOps, LLMOps, RAG, and PySpark. Existing monthly or yearly subscribers can upgrade to lifetime access before the sale concludes. Traditional software testing fails with AI agents because language-based outputs lack a single correct answer. Instead, agents can be tested through multi-agent simulation by pairing the target agent with a user simulator agent and evaluating the exchange using a judge agent. This testing pipeline can be implemented using open-source tools including CrewAI for orchestration, LangWatch Scenario for simulation evaluation, and PyTest as the test runner. Simulating conversations reveals failure modes and behavioral gaps, such as missing required user details, which can then be addressed through prompt improvements. Activation checkpointing is a memory-saving training technique widely used for large models like GPTs and LLaMAs. Instead of storing all intermediate activations during the forward pass, it divides the network into segments and retains only the initial layer activations for each segment. During backpropagation, the discarded intermediate activations are recomputed on demand from the saved checkpoints. This reduces activation memory consumption roughly to the square root of the original requirement, at the cost of a 15-25% increase in runtime.

Contents 4 sections
  1. 012 days left before lifetime access price increases by 50%
  2. 02How to test Agents using Agents
  3. 03A memory-efficient technique to train large models
  4. 047 LLM generation parameters
IN CASE YOU MISSED IT

2 days left before lifetime access price increases by 50%

DailyDoseofDS announced that the price for its lifetime access membership will increase by 50% in two days, moving from two times to three times the yearly subscription price. Lifetime access includes existing and future AI engineering blueprints, covering more than 140 resources across diverse topics such as reinforcement learning, agentic systems, MLOps, LLMOps, RAG, and PySpark. Existing monthly or yearly subscribers can upgrade to lifetime access before the sale concludes.

  • Lifetime access to DailyDoseofDS is currently priced at 2x the yearly subscription rate before increasing to 3x in two days.
  • The lifetime membership grants access to over 140 existing engineering resources and all future weekly deep dives.
  • Included curriculum covers reinforcement learning, agentic systems, MLOps, LLMOps, RAG systems, MCPs, and PySpark.
  • The publication notes this is their first sale in approximately 12 months, serving a community of over 100,000 members.
HANDS-ON

How to test Agents using Agents

Traditional software testing fails with AI agents because language-based outputs lack a single correct answer. Instead, agents can be tested through multi-agent simulation by pairing the target agent with a user simulator agent and evaluating the exchange using a judge agent. This testing pipeline can be implemented using open-source tools including CrewAI for orchestration, LangWatch Scenario for simulation evaluation, and PyTest as the test runner. Simulating conversations reveals failure modes and behavioral gaps, such as missing required user details, which can then be addressed through prompt improvements.

  • Agent testing replaces fixed input/output testing with simulations involving a target agent, a user simulator agent, and a judge agent.
  • The open-source stack demonstrated uses CrewAI for agent orchestration, LangWatch Scenario for the evaluation pipeline, and PyTest as the test runner.
  • In LangWatch Scenario, target agents inherit from AgentAdapter and define a call() method handling inputs and outputs.
  • The scenario.run method executes interactions between the target agent and the user simulator before handing the dialogue to the judge agent.
  • Evaluation criteria for the judge agent are specified in natural language.
  • LangWatch Scenario is an open-source, library-agnostic agent testing framework based on simulations.
DEEP LEARNING

A memory-efficient technique to train large models

Activation checkpointing is a memory-saving training technique widely used for large models like GPTs and LLaMAs. Instead of storing all intermediate activations during the forward pass, it divides the network into segments and retains only the initial layer activations for each segment. During backpropagation, the discarded intermediate activations are recomputed on demand from the saved checkpoints. This reduces activation memory consumption roughly to the square root of the original requirement, at the cost of a 15-25% increase in runtime.

  • Activation checkpointing is widely used in training large language models such as GPTs and LLaMAs.
  • The method saves memory by dividing a neural network into segments and only storing the first layer activations of each segment during the forward pass.
  • Discarded activations are recomputed during backpropagation using the stored segment checkpoints.
  • Activation checkpointing can reduce activation memory usage to approximately the square root of the original memory (sqrt(M)).
  • The trade-off involves a typical 15-25% increase in runtime due to recomputing activations, which can often be mitigated by training with larger batch sizes.
  • In PyTorch implementations, activation checkpointing can be applied using functions such as checkpoint_sequential.
LLMs

7 LLM generation parameters

Language model generations are controlled by several key parameters that govern output structure, randomness, and diversity. Engineers can control response length and prevent unbounded compute usage via max tokens, while stop sequences strictly limit generation boundaries. Parameters like temperature, top-k, and top-p (nucleus sampling) manage sampling randomness and probability distribution to balance creativity and determinism. Finally, frequency and presence penalties help adjust repetition and encourage lexical novelty depending on the specific use case.

  • Max tokens sets a hard cap on generation length to prevent truncated responses or wasted compute.
  • Temperature controls randomness, where near-zero values yield deterministic answers for QA, while higher values (0.7–1.0) boost creativity.
  • Top-k sampling limits candidate tokens to the k most probable choices, whereas Top-p (nucleus sampling) adaptively selects from a cumulative probability mass up to p.
  • Frequency penalty discourages reusing tokens based on their frequency of prior occurrence, useful for avoiding redundancy.
  • Presence penalty incentivizes the introduction of new tokens not yet seen in the text, promoting idea diversity.
  • Stop sequences halt generation immediately upon encountering predefined tokens, helping enforce structured outputs like JSON.