ATLAS: Discovering Agent Strategies through LLM-Guided Abstraction and Automata Learning, a short paper from Austrian academics. The basic idea is: tell a big expensive LLM to solve a problem. Do this many times on many similar instances of the same problem. For example, tell it to hack a server, and watch what steps it usually takes, and their outcomes. Produce a Markov chain (aka a flowchart) that models the whole problem-solving trajectory, and use this to coach a simpler LLM solving similar problems. The authors found that a cheap LLM’s success rate jumped from 1 in 60 to 23 in 60 attempts, given hints distilled from the big LLM’s behaviors.

    The Algorithm #

    The authors take transcripts of an LLM penetration-testing agent (HackingBuddyGPT) attacking some vulnerable Linux servers, and turn them into a Markov chain in three steps:

    1. Collect traces. They ran DeepSeek V4 Flash 20 times on each of 12 servers.
    2. Abstract the traces. They don’t want to make a flowchart from the agents’ exact steps, they want to extract categories of actions and outcomes. So a separate LLM maps each (action, observation) pair to a category, e.g. sudo -l becomes the action cmd.exec (sudo -l) and its output becomes the observation EXPLOITABLE_SUDO. This takes three LLM passes: propose categories from batches of traces, merge near-duplicate categories, then label each trace with the final vocabulary.
    3. Learn the automaton. Alergia, an algorithm from 1994, produces a Markov chain with transition probabilities:
    A Markov chain with states q0 to q8, labeled with abstract actions and observations and with transition probabilities, ending in a success state q8

    Figure 1c. The Markov chain learned from 20 abstracted traces.

    In their running example, the chain shows that the agent usually starts with id or sudo -l. After calling id the LLM often makes a malformed command for some reason. On another branch, after discovering the exploitable sudo policy the agent roots the box immediately 30% of the time. The other 70% of the time it wanders around first. These are interesting insights extracted from a pile of unstructured transcripts!

    They then use the Markov chain for two things.

    Explain the LLM behavior to humans. Learned chains are big (57 states for one scenario), and most of the states are reconnaissance that doesn’t matter. So they keep only paths to success, prune everything else, and collapse loops. One scenario shrinks from 57 states to 7, and the 7-state version shows that the crucial step is reading .bash_history.

    A 7-state directed acyclic graph with transition probabilities: from init, two paths of user enumeration and directory enumeration both lead to reading .bash_history, then credential testing

    Figure 3a from the paper. An explanation Markov chain: the DAG of paths to success in Scenario 2, reduced from 57 states to 7.

    Knowledge transfer from big LLM to small. A frontier LLM (DeepSeek V4 Pro or Flash) distills the chain into hints for a weaker, cheaper LLM (ministral-8b or 14b). They tried four ways of delivering the hints, all by adding to the weak LLM’s system prompt, and compared them with an unaided baseline:

    • Common path: Using only the successful traces, take the most frequent (action, observation) pair at each position, stopping where fewer than half of the successful traces agree. It writes the result as a sentence (“successful runs typically follow this progression…”). A fixed footer of generic advice is appended (“look for credentials, check bash history…”).
    • Minimal: Once per server, a frontier LLM gets a text digest of the traces and example commands for each category, and determines the two or three most important shell commands. It produces a summary for the small LLM: the frequency of different categories of action, a few example successful paths, and the steps most common in failed runs, which it’s told to avoid.
    • Guided: Same as above, but the frontier LLM also writes a one-line strategy, up to five steps, and advice for how to explore around the common path.
    • Dynamic: Guidance during the session, not up front. The system tracks which state of the chain the session is in. At each step it suggests a single next action. After the weak LLM runs a command, a cheap classifier LLM (the weak LLM itself) maps the command and its output onto the known abstract categories, and the system advances to the next state in the chain. The next suggestion comes from walking the chain toward a success state; the frontier LLM isn’t called. Each hint is a one-liner with feedback on the last step, the suggested command, and a reminder to keep exploring. It also has an anti-repetition mechanism and dead-end detection.

    (The differences among these strategies are totally unclear in the paper, I got this info from the source code).

    Their Evaluation #

    Their technique improves the success rate for a cheap LLM on a job that would otherwise stump it. Over 60 runs per cell (12 VMs × 5 runs), here are the success rates:

    Hints ministral-8b ministral-14b
    None (baseline) 3/60 1/60
    Common path 1/60 7/60
    Minimal 5/60 7/60
    Guided 5/60 13/60
    Dynamic 17/60 23/60

    These results are a bit odd. In the baseline test with no hints, the bigger 14b model succeeded only once, and the smaller 8b model succeeded three times? The “common path” hints reduce the performance of 8b but dramatically improve that of 14b? I think we need more than 60 runs to reduce noise.

    “Dynamic” hints are an obvious victory, though. The authors say that small LLMs can’t keep track of where they are in a multi-step plan, so feeding them one instruction at a time via “dynamic” guidance is best. I’m optimistic about more research along these lines.

    My Evaluation #

    This is a fun little paper, with an intriguing idea, a prototype, and preliminary results. I wish they’d said what they spent in tokens and dollars on the first stage (recording the behavior of a big LLM) and the experiments (running small LLMs).

    For which jobs is ATLAS useful? This Markov-chain-extraction technique seems useful for jobs that are somewhat routine. For totally deterministic jobs, you write a program. Jobs that need creativity require a big LLM or (god forbid) a human. ATLAS is for jobs between these poles, with enough variation that you need a small LLM to improvise a bit. In that case the big LLM “develops wisdom” during a few runs, then cheap LLMs reuse this wisdom many times. Are tasks like this very common? Maybe!

    Red herring detection. I think ATLAS’s most useful outputs might be the red herrings: paths the big LLM took that never led to success. My colleague Becca Taft pointed out that ATLAS prunes dead ends only for explanation, not for knowledge transfer. So, warning the cheap LLM about pitfalls is an obvious follow-up, assuming it tends to make the same mistakes the frontier LLM does.

    Congratulations, you’ve reinvented the flowchart. Like so many AI papers, this one has discovered that LLMs benefit from the same corporate practices humans have used for decades. Compare ATLAS’s Markov chain to the IRS’s huge instruction manual for customer service representatives: they’re solving the same problem, distilling past experiences to make agents quicker at routine jobs. I’ve been calling this the Humanoid Lesson: productivity boosters for humans tend to work for LLMs and vice versa.

    A solution to the continuous-learning problem? LLMs don’t learn on the job. If you’re an AI lab with millions of GPUs, you can update an LLM’s weights during reinforcement learning. But the rest of us have to use an LLM as-is. Maybe ATLAS points the way toward continuous learning? At SIGMOD I heard a talk from AWS about an AI incident-response agent that, I presume, is a big Markdown runbook. It can’t learn from experience—it’s born, it works on a single incident, it vanishes. Each agent could update a shared text file based on its singular experience, but this would be madness. There would be merge conflicts, and it would be hard or impossible to statistically analyze all the outcomes. But if the runbook were formalized as a Markov chain, AWS could gather statistics about which branches succeed, and refine the transition probabilities over time.


    If you have a semi-routine task, where a big LLM is successful but expensive, give this paper a read. It’s short, and it suggests interesting directions for cost-saving research.