The ability of Large Language Models (LLMs) to generate correct code has been extensively studied. However, correct code is not always efficient code, and whether models accurately understand and can articulate the computational complexity of their own solutions remains largely unexplored. We address this gap by introducing a three-axis evaluation framework applied to a curated 75-problem benchmark (25 per difficulty tier) augmented by four adversarial probes that deliberately violate well-posed-problem assumptions. Three generation strategies are compared on the Groq inference platform: (i) a Generalist model (Llama-4-Scout-17B-16E-Instruct) that directly solves problems from a natural-language specification; (ii) a Specialist reasoning-and-code model (Qwen3-32B) that does the same; and (iii) a Hybrid pipeline in which a lightweight Decomposer (Llama-3.1-8B-Instant) first produces an algorithmic plan, which a Specialist solver then implements and a Breaker subsequently critiques. Each solution is evaluated along three orthogonal axes: execution correctness (Pass@1), self-reported complexity accuracy (CxSelf), and judge-evaluated complexity accuracy (CxJudge). We report three findings. First, the code-specialist does not lead on execution correctness. The generalist attains the highest Pass@1 (0.911 vs. 0.862), but the specialist leads on complexity awareness, a trade-off invisible to single-axis evaluation. Second, a naive decompose, critique, and refine pipeline regresses 0.133 Pass@1 below the standalone specialist because an undisciplined critic rewrites correct code into errors. Constraining the critic to correctness and gating refinements on syntactic validity recovers 87% of the loss. Third, no architecture detects malformed specifications. The critic approves an impossible constraint and a self-contradiction alike, and decomposition can convert benign ambiguity into confident error. All models, tooling, and data are accessible via freely available APIs, making the study fully reproducible without proprietary access.
No takes yet. Share an insight, caveat, or question.
Tharun Rathod Bhukke (2026) studied this question.
Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context: