Skip navigation
Thanksgiving Blog: Perplexity (on what?) is intelligence 🌟
0:00 / 0:28

Thanksgiving Blog: Perplexity (on what?) is intelligence 🌟

Wenhao Chai

@wenhaocha18.7K followers

Visit on X
428 likesDownloadOriginal post

61,525 views

Thanksgiving Blog: Perplexity (on what?) is intelligence 🌟 perplexity is intelligence as OpenAI said, so does perplexity on agent trajectories measure agentic ability? we found it does not. whole traj perplexity ranks models backwards on Terminal-Bench 2.1. but on 0.3% of the bytes, perplexity gets the ranking right, and they're the command tokens an agent writes right after reading the terminal. we call it AgenticPPL, inspired by LongPPL. happy thanksgiving! Blog:

42 Comments

Comments from the original post on X (Twitter)

  • Wenhao Chai's profile picture

    @wenhaocha1

    1/4 we didn't hand-pick these tokens. a fully autonomous auto-research run found them in about two and a half hours we use 1,401 open Terminus-2 traces from Terminal-Lego and terminal-wrench, generated by Claude Opus 4.6, GPT-5.4, Gemini 3.1 Pro, GLM-5 and DeepSeek-V3.2. each trace starts with a task, followed by turns of thought, shell command and terminal output. we score 40 open models from 2B to 128B on them, like Qwen3.5-9B, Ministral-3-8B and K2-Horizon-7B, using 25 for the search and holding out the other 15 until the end. two agents on Gemini 4 Carbon run the search without human steering. the outer agent writes code that edits the traces by hiding terminal output, dropping thoughts, or masking the task. two evaluator models, Inkling 2 Mini from @thinkymachines and Flint from @Recursive_SI, score every edited trace token by token. and the inner agent turns those scores into a rule, changing one thing per step and getting back one Spearman ρ per try.

    13 likes

  • Wenhao Chai's profile picture

    @wenhaocha1

    2/4 and it works. we ran the search six times, three with both evaluator models and three with Inkling 2 Mini alone. on held-out models, every rule gets ρ = +0.68 to +0.80 with Terminal-Bench 2.1, while whole-trace perplexity is −0.50. do the two evaluators pick the same tokens? not exactly. the Inkling rule picks 6.6 times as many bytes as the Flint rule, and only 7% of its bytes overlap with Flint's. so why does whole-trace perplexity fail? terminal output alone ranks models backwards and carries 87% of the variance. on terminal output, weak agents predict text that already appeared earlier, while strong agents predict their own next step there, like starting to think or typing the next command.

    8 likes

  • Wenhao Chai's profile picture

    @wenhaocha1

    3/4 the final recipe is pretty short. score each trace twice with Flint or Inkling 2 Mini as the evaluator model, once with terminal output and once without (with placeholder [output hidden]). keep the command tokens where perplexity drops after seeing the output, then average your model's capped perplexity on them, or the probability of the actual token. on the same tokens the two work about equally well.

    7 likes

  • Wenhao Chai's profile picture

    @wenhaocha1

    4/4 we ship the token positions with the code, so running it on your model only takes one forward pass. blog: code: data: alphaXiv: thanks to @lzchen_ut @AngCao3 @YouJiacheng @ZhengyangGeng @RidgerZhu @MangQiuyang @lihanc02 check and discuss before release. thanks @eliebakouch and @OpenAI for inspiring the blog. also thanks to the Terminal-Lego and terminal-wrench teams for the open agent traces, and @ArtificialAnlys for the Terminal-Bench 2.1 scores. we'll add this task to FrontierCS 2.

    20 likes

  • alex zhang's profile picture

    @a1zhang

    @jayden_teoh_ man is always cooking with these blogs

    9 likes

  • Wenhao Chai's profile picture

    @wenhaocha1

    @jayden_teoh_ 🫡 hope its useful

    2 likes

  • Hanchen Li's profile picture

    @lihanc02

    Have a thanksgiving break bro

    4 likes

  • Wenhao Chai's profile picture

    @wenhaocha1

    Have fun! 😎

  • Ruixiang Zhang's profile picture

    @onloglogn

    this guy is so talented and really having a generational run, happy thanksgiving!

    3 likes

  • Wenhao Chai's profile picture

    @wenhaocha1

    Thanks for your kind work! Happy thanksgiving 🍽

    4 likes

  • Amy · fireply.ai's profile picture

    @amybuildsAI

    backwards ranking on whole traj is funny, the model that rambles best looks smartest

    2 likes

  • elie's profile picture

    @eliebakouch

    very cool work 🔥

    2 likes

  • Wenhao Chai's profile picture

    @wenhaocha1

    Thanks I’m learning pretrain index ;)

    2 likes

  • Sangyun Lee's profile picture

    @sang_yun_lee

    Nice and timely work! Do you have a specific example of this? I feel that being able to predict terminal outputs well means the models have stronger world models. Why would that be negatively correlated to task perf?

    2 likes

  • Wenhao Chai's profile picture

    @wenhaocha1

    Intuitively i agree with ECHO @DimitrisPapail here I think using different model families probably a little bit noise. Will dig into it further during break! Thanks for pointing out

    1 like

  • Sangyun Lee's profile picture

    @sang_yun_lee

    @DimitrisPapail Cool, thanks! I was wondering if PPL favors models trained on similar environments/interfaces. Also wonder if eval set diversity plays a role here, i feel a nice thing about ppl eval is that it is relatively easier to diversify the eval set to capture general intelligence

    1 like

  • Wenhao Chai's profile picture

    @wenhaocha1

    @DimitrisPapail Still open-question! And yes agree PPL only need to do prefill and no action. Make it cheap and scalable!

    1 like

  • Architect Aliy's profile picture

    @architect_aliy

    Whole-traj perplexity mostly rewards boring predictable tokens, so it makes sense that the few decision points are where the signal hides.

    1 like

  • Zhihan Liu's profile picture

    @ZhihanLiu21628

    Do you try to isolate the ppl in thinking? It seems that the ppl for thinking has a much different behavior compared with the response. For the pretraining data which oai use, I guess most of them do not include cot?

    1 like

  • Wenhao Chai's profile picture

    @wenhaocha1

    I don’t think thinking “here” is a good idea because the traj are off-policy. If it’s on-policy from a stronger model might help!!