Perplexed: Understanding When Large Language Models are Confused
Not on the map. Why?
Abstract (arXiv)
Large Language Models (LLMs) have become dominant in the Natural Language Processing (NLP) field causing a huge surge in progress in a short amount of time. However, their limitations are still a mystery and have primarily been explored through tailored datasets to analyze a specific human-level skill such as negation, name resolution, etc. In this paper, we introduce perplexed, a library for exploring where a particular language model is perplexed. To show the flexibility and types of insights that can be gained by perplexed, we conducted a case study focused on LLMs for code generation using an additional tool we built to help with the analysis of code models called codetokenizer. Specifically, we explore success and failure cases at the token level of code LLMs under different scenarios pertaining to the type of coding structure the model is predicting, e.g., a variable name or operator, and how predicting of internal verses external method invocations impact performance. From this analysis, we found that our studied code LLMs had their worst performance on coding structures where the code was not syntactically correct. Additionally, we found the models to generally perform worse at predicting internal method invocations than external ones. We have open sourced both of these tools to allow the research community to better understand LLMs in general and LLMs for code generation.
Key facts. Cited by 9 papers in the map (data through 14 Oct 2026). First posted on arXiv 9 Apr 2024.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2025: 4; 2026: 5.
9 papers.
- 2025Stepwise Perplexity-Guided Refinement for Efficient Chain-of-Thought Reasoning in Large Language Modelscited by 51
- 2026EfficientPosterGen: Semantic-aware Efficient Poster Generation via Token Compression and Accurate Violation Detectioncited by 9
- 2025Do LVLMs Know What They Know? A Systematic Study of Knowledge Boundary Perception in LVLMscited by 4
- 2026Rethinking Code Complexity Through the Lens of Large Language Modelscited by 4
- 2026Code Is More Than Text: Uncertainty Estimation for Code Generationcited by 4
- 2025Prompts Generalize with Low Data: Non-vacuous Generalization Bounds for Optimizing Prompts with More Informative Priorscited by 3
- 2025XGen-Q: An Explainable Domain-Adaptive LLM Framework with Retrieval-Augmented Generation for Software Securitycited by 0
- 2026Is my model perplexed for the right reason? Contrasting LLMs' Benchmark Behavior with Token-Level Perplexitycited by 0
- 2026Understanding the Performance Plateau in Text-to-Video Retrieval: A Comprehensive Empirical and Linguistic Analysiscited by 0
- 2026Code Is More Than Text: Uncertainty Estimation for Code Generation8 Jun 2026
- 2026Is my model perplexed for the right reason? Contrasting LLMs' Benchmark Behavior with Token-Level Perplexity31 Mar 2026
- 2026Understanding the Performance Plateau in Text-to-Video Retrieval: A Comprehensive Empirical and Linguistic Analysis7 Mar 2026
- 2026EfficientPosterGen: Semantic-aware Efficient Poster Generation via Token Compression and Accurate Violation Detection25 Feb 2026
- 2026Rethinking Code Complexity Through the Lens of Large Language Models8 Feb 2026
- 2025XGen-Q: An Explainable Domain-Adaptive LLM Framework with Retrieval-Augmented Generation for Software Security21 Oct 2025
- 2025Prompts Generalize with Low Data: Non-vacuous Generalization Bounds for Optimizing Prompts with More Informative Priors9 Oct 2025
- 2025Do LVLMs Know What They Know? A Systematic Study of Knowledge Boundary Perception in LVLMs26 Aug 2025
- 2025Stepwise Perplexity-Guided Refinement for Efficient Chain-of-Thought Reasoning in Large Language Models18 Feb 2025