Abstract
As large language models (LLMs) grow in complexity, identifying the full spectrum of their potential behaviors—including harmful or unintended ones—becomes increasingly difficult. Traditional methods like manual red-teaming are unscalable, while automated optimization techniques often yield uninterpretable results. This paper introduces a framework for training "investigator agents": models specifically optimized to discover natural language prompts that elicit targeted behaviors from other LLMs. By combining Direct Preference Optimization (DPO) with a novel iterative approach based on the Frank-Wolfe algorithm, we demonstrate that these agents can automatically uncover diverse, human-readable strategies for jailbreaking, hallucination, and persona adoption. Our investigator agents achieve near-perfect success rates on state-of-the-art models and show significant transferability to closed-source systems like GPT-4o and Claude 3.5 Sonnet.
1. Introduction
The "needle in a haystack" problem of LLM evaluation stems from the effectively infinite space of possible natural language prompts. Developers must ensure models are safe, factual, and robust, yet current evaluation paradigms are limited. Manual red-teaming, while creative and interpretable, is prohibitively expensive and difficult to scale. Conversely, automated methods like Gradient-based Coordinate Greedy (GCG) search for token sequences that trigger specific outputs, but these often result in "gibberish" strings that lack semantic meaning and are easily filtered by simple perplexity checks.
To bridge this gap, we propose the use of investigator agents. These are language models trained to map a desired target behavior to a natural language prompt that successfully triggers that behavior in a target model. This approach provides "amortized elicitation": once trained, the investigator can generate prompts for new behaviors almost instantly, providing a scalable and interpretable window into model vulnerabilities.
2. Methodology
The training of an investigator agent follows a three-stage pipeline designed to ensure both effectiveness and diversity in the elicited prompts.
2.1 Supervised Fine-Tuning (SFT) via Inversion
The investigator is initialized by "inverting" the standard language modeling task. Using datasets like WildChat and UltraChat, the model is trained on (prompt, response) pairs to predict the prompt that likely led to a specific response. This establishes a baseline capability for the agent to understand the relationship between inputs and outputs.
2.2 Direct Preference Optimization (DPO)
The agent is then refined using Direct Preference Optimization. The objective is to maximize the "elicitation reward"—defined as the log-probability that the target model will produce the desired behavior when given the investigator's prompt. This stage aligns the investigator's output with the specific goal of triggering the target behavior.
2.3 Diversity via Frank-Wolfe Iterations
A common failure mode in reinforcement learning is "mode collapse," where a model discovers a single successful "trick" (e.g., "Repeat after me...") and applies it universally. To prevent this, the researchers employ an iterative approach based on the Frank-Wolfe algorithm. By penalizing previously discovered strategies in subsequent training iterations, the investigator is forced to explore a diverse array of tactics, such as role-playing, contextual framing, or natural continuation styles.
2.4 Rubric-Based Elicitation
For complex behaviors that cannot be defined by a simple string match (e.g., "exhibiting symptoms of a personality disorder"), the framework utilizes a two-stage rubric process. The researchers first identify a response that fits the behavioral description and then train the investigator to find the prompt that triggers that specific response.
3. Experimental Results
The investigator agents were evaluated across several domains, including safety (AdvBench), factuality (TruthfulQA), and behavioral psychology (DSM-5).
3.1 Jailbreaking and Safety
The investigator agents demonstrated exceptional efficacy in safety testing. Against Llama-3.1 8B, the agents achieved a 100% Attack Success Rate (ASR) on a subset of AdvBench harmful behaviors. Even when tested against the significantly larger Llama-3.3 70B-Turbo, the ASR remained remarkably high at 98%.
3.2 Hallucinations and Aberrant Personas
The framework proved effective at eliciting non-safety-related behaviors as well. The agents successfully triggered specific factual hallucinations at a rate of 85.2%. Furthermore, by using rubrics derived from the DSM-5, the agents were able to coach models into exhibiting symptoms of various personality disorders with an 80.7% success rate.
3.3 Cross-Model Transferability
A key finding is the transferability of the discovered prompts. Prompts optimized for Llama models were tested against closed-weight models without further tuning. These "black-box" attacks achieved a 28% success rate on GPT-4o and a 26% success rate on Claude 3.5 Sonnet, suggesting that the strategies discovered by investigator agents exploit fundamental vulnerabilities common across different architectures.
4. Discussion and Limitations
The use of investigator agents offers a significant step forward in automated model characterization. By producing human-readable prompts, these agents allow researchers to categorize and understand the nature of model failures—such as "frontloading a table" or "sociopathic roleplay"—rather than just observing that a failure occurred.
However, several challenges remain. "Reward hacking" is a persistent risk, where the investigator learns to produce outputs that fool the automated grader without truly eliciting the intended behavior. Additionally, this study focused on single-turn interactions. Future work should explore multi-turn investigator agents capable of interactive "interrogations" using chain-of-thought reasoning and external tools.
5. Conclusion
Investigator agents represent a scalable, interpretable, and highly effective framework for eliciting complex behaviors in LLMs. By automating the discovery of diverse natural language attacks, researchers can better understand the boundaries of model safety and reliability, ultimately leading to more robust AI systems.
Summary updated