Why is that so hard for some models
- User
Why is that so hard for some models
- Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Why is that so hard for some models
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Short answer
Because most large-language models (LLMs) aren’t actually “running code” or executing a true sorting algorithm—they’re predicting what text is likely to follow. Tasks that require strict, step-by-step, algorithmic precision (like correctly re-ordering 50 items by an arbitrary key) expose the gap between pattern-matching and symbolic reasoning.
Longer answer – what’s going on under the hood?
Prediction vs. execution
• An LLM is trained to guess the next token given previous tokens.
• “Generate a correctly sorted list” is not a next-token problem; it’s an all-tokens-must-be-precisely-right problem. A single mis-ordered state is still linguistically “plausible,” so the model may happily output it.
Multi-step symbolic reasoning is tough
• To satisfy your request the model has to:
Working-memory bottleneck
• Transformer attention lets the model “see” the entire prompt, but the effective working memory for precise manipulation is limited. Mis-placing just one state early in the list cascades into an incorrect final order.
Training data bias
• The internet rarely publishes “state names sorted by abbreviation.” It more often shows states sorted by name or population, so the model leans on those patterns.
No built-in validation loop
• A traditional program would run a sort, then maybe assert the order, and if it fails, fix it. LLMs don’t run a verification pass; they just emit tokens once.
Temperature & randomness
• Even at low temperature a model might pick a token sequence that’s 98 % likely, not 100 %. For lists, that 2 % can be one item out of place.
How to get more reliable answers
Force chain-of-thought:
“Pair each state with its abbreviation, sort those pairs, then remove the abbreviations. Show your work.”
When the model sees intermediate reasoning, it often self-corrects.
Ask it to run or describe code:
“Write Python that prints the list.” If it produces correct code, you can run it and trust the output more than the raw narrative answer.
Provide the anchor data explicitly:
“Here is the JSON mapping of states → abbreviations. Sort by key and output the values.” Giving the mapping in the prompt removes recall errors.
Use a tool-augmented model (e.g., code-execution, retrieval, or symbolic-reasoning plugin) so the LLM can delegate the deterministic part to an actual algorithm.
In short, LLMs are phenomenal at fluent language, but anything that’s unforgivingly discrete—checksum calculations, exact sorting, Sudoku—reveals their non-symbolic nature. That’s why something trivial for a 5-line Python script can still trip up a very large language model.