Evaluating Core LLM Capabilities: Reasoning and Coding, Long Context, and Multimodality

    When choosing a large language model, demos and marketing materials are unreliable. This article breaks down LLM evaluation into four practical dimensions—reasoning and coding, long-context memory, human-like language quality, and multimodal ability—covering concrete testing methods such as multi-step instruction checks, regression testing, needle-in-a-haystack tests, and blind reviews. It also provides a step-by-step guide to building a custom evaluation suite with code examples, common pitfalls to avoid, and scenario-specific selection advice.

    1. Why Break Down Evaluation into Dimensions

    When choosing a large language model (LLM), a common approach is to rely on marketing materials or a few demo videos. This has two problems. First, demo samples are usually cherry-picked and do not reflect the real distribution of everyday tasks. Second, a single overall impression cannot distinguish between different facets of capability. A model may excel at simple code generation yet frequently drift off target in multi-step instruction following.

    Therefore, before evaluating, you need to answer one question: what capability are we actually measuring? A model that can support engineering decisions should hold up under scrutiny on at least four levels: whether it can reliably complete reasoning and coding tasks, whether it can accurately locate information in long texts, whether its language output is natural and context-appropriate, and whether it can understand and generate content across multiple modalities. Each is examined below.

    2. Logical Reasoning and Coding Ability

    2.1 Consistency in Multi-Step Instruction Following

    The key to evaluating this is observing whether the model fully preserves the constraints established earlier in a task. A typical approach is to design instructions with five to eight steps, such as “first read the configuration, then validate the fields, then generate a report, and finally output in the specified format.” When scoring, check three things: whether every step is executed, whether the step order is correct, and whether intermediate results are correctly referenced by later steps.

    Common failure modes include: skipping intermediate steps, using the result of a later step prematurely, and introducing assumptions that were never requested. These problems rarely surface in simple Q&A but can cause cascading errors in automated pipelines.

    2.2 Closed-Loop Mathematical and Formal Reasoning

    For mathematical reasoning, the evaluation focus is whether the process is self-consistent. A model may produce the correct answer while its derivation contains circular reasoning, symbol confusion, or premise substitution. For proof-style problems, check whether each step is properly justified and whether the conclusion genuinely follows from the premises.

    In practice, reasoning problems can be divided into three categories: calculation problems with standard answers, applied problems requiring multi-step derivation, and open problems requiring proof construction. The first two can be scored automatically; the third requires human review or formal verification tools.

    2.3 Quality Metrics for Code Generation

    Coding ability is usually measured with the following metrics:

    • Executability: whether the generated code runs directly, without syntax or dependency errors.
    • Functional completeness: whether all requirements are met and edge cases are handled.
    • Defect density: the number of test-discoverable errors per hundred lines of code.
    • Requirement completion: when requirements are vague, whether the model can reasonably infer the details—and whether those inferences align with common sense.
    • Modification side effects: when making small changes to existing code, whether unrelated functionality is broken.

    The last item is often overlooked. A successful feature addition accompanied by regression defects may cost more than a rewrite. Therefore, evaluation should run regression tests on the existing codebase, not just check whether the new feature itself passes.

    3. Context Memory Ability

    3.1 Two Capacity Metrics

    The size of the context window determines how much content a model can receive at once, but it is only an upper bound. What really affects usability is effective utilization—whether the model can accurately retrieve and use key information within a long input.

    A phenomenon commonly observed in research and engineering practice is that recall is strong when information is located at the beginning or end of the input, but drops noticeably when it is in the middle. This is often called “lost in the middle.” Therefore, a large window number does not equal strong usable capacity.

    3.2 Needle-in-a-Haystack Test

    The needle-in-a-haystack test is a widely used method. The approach is to insert an off-topic fact at different positions in a long document, then ask a question and check whether the model answers correctly. The test should cover multiple document lengths and insertion positions, recording how accuracy varies with length and position.

    1. # Example: basic flow of a needle-in-a-haystack test
    2. def needle_test(model, haystack_docs, needle, question, expected):
    3. results = []
    4. for doc in haystack_docs: # documents of different lengths
    5. for pos in (0.1, 0.5, 0.9): # insertion position: start, middle, end
    6. text = insert_at(doc, needle, pos)
    7. answer = model(f"{text}\n\nQuestion: {question}")
    8. results.append({
    9. "length": len(text),
    10. "position": pos,
    11. "correct": expected in answer,
    12. })
    13. return results

    3.3 Multi-Document Synthesis

    Beyond single-point retrieval, you should also test cross-paragraph synthesis. For example, provide multiple documents and ask the model to compare contradictory clauses or summarize viewpoints scattered across different locations. These tasks are much closer to real knowledge-work scenarios.

    4. Human-Like Language and Expression Quality

    Human-likeness evaluates whether the language output reads like human writing. This dimension can be broken into three sub-items.

    First, stylistic consistency: within the same conversation, whether tone, word choice, and sentence patterns remain stable, without abrupt templated phrasing.

    Second, contextual understanding: whether the model can detect implied meaning—for example, whether it recognizes sarcasm when a user says “this plan is fast and cheap.” Understanding internet slang, industry jargon, and puns also falls into this category.

    Third, indistinguishability: mix human-written text with model-generated text and have reviewers judge the source without knowing which is which. If their accuracy is close to random chance, the output’s realism is high. Note that this metric is heavily influenced by the reviewer pool, so reviewer backgrounds should be recorded and sampling repeated multiple times.

    5. Multimodal Ability

    Humans take in and express information through listening, speaking, reading, and writing. A multimodal model needs to reach a usable level on the corresponding input and output channels.

    • Text understanding: reading long documents, tables, and code, and extracting structured information as required.
    • Image understanding: recognizing chart data, controls in UI screenshots, and text within images.
    • Speech interaction: transcription accuracy and stability in noisy environments.
    • Cross-modal generation: producing descriptions from images, or generating illustrative diagram code from textual requirements.

    When evaluating multimodal ability, pay attention to the alignment between task design and modality. For example, in “answer based on the image” tasks, make sure the question cannot be answered from textual cues alone—otherwise you are measuring text ability, not visual ability.

    6. Steps to Build Your Own Evaluation System

    Public benchmarks only reflect average performance. What a business really needs is evaluation targeted at its own scenarios. The following steps are recommended.

    1. Define the task set: extract typical requests from real business workflows, classify them into the four dimensions, and prepare at least dozens of cases per category.
    2. Design scoring rules: automate whatever can be scored automatically—unit tests, string matching, structural validation. For subjective items, use two-person blind review and compute an inter-rater agreement coefficient.
    3. Fix test conditions: standardize prompt templates, sampling temperature, and input formats to avoid distorted comparisons caused by condition differences.
    4. Run regression tests: rerun the full case set after every model or prompt update, and watch for changes in each dimension rather than only the total score.
    5. Record cost and latency: at equivalent quality, per-call cost and response time are often the deciding factors.

    Below is an example framework for aggregating scores by dimension:

    1. from dataclasses import dataclass
    2. from typing import Callable
    3. @dataclass
    4. class EvalCase:
    5. category: str # reasoning / context / persona / multimodal
    6. prompt: str
    7. checker: Callable[[str], int] # automatic scoring: 1 for pass, 0 for fail
    8. def run_suite(model: Callable[[str], str], cases: list[EvalCase]) -> dict:
    9. scores: dict[str, list[int]] = {}
    10. for case in cases:
    11. answer = model(case.prompt)
    12. scores.setdefault(case.category, []).append(case.checker(answer))
    13. # return pass rate per dimension for separate observation
    14. return {k: sum(v) / len(v) for k, v in scores.items()}

    The point of this framework is to output results by dimension rather than a single composite score. A composite score can hide weaknesses—for example, a model may score highly on coding while its context recall is clearly insufficient, and a combined score would mask that problem.

    7. Common Pitfalls

    First, substituting a single demo for statistical conclusions. A single success or failure may be accidental; conclusions should rest on repeated runs and adequate sample sizes.

    Second, equating window length with usable length. Judge by actual performance on needle tests and multi-document tasks.

    Third, ignoring modification side effects. Evaluating only whether a new feature works underestimates the risk of the model breaking existing code.

    Fourth, treating human-likeness as the only quality standard. In scenarios like technical documentation and compliance text, overly colloquial output is inappropriate; style targets should be set according to the use case.

    Fifth, neglecting data and compliance requirements. For businesses involving sensitive data, confirm how data is handled before discussing model capabilities.

    8. Conclusion and Selection Advice

    There is no one-size-fits-all ranking of LLM capabilities. The four dimensions—reasoning and coding, long context, language expression, and multimodality—each map to different business needs. When selecting a model, first identify the dominant task types in your scenario, assign weights to each dimension, test with your own case set, and then make a final decision by combining constraints such as cost, latency, and data compliance.

    For coding-assistant scenarios, focus on requirement completion and regression side effects. For long-document analysis, focus on mid-context recall and multi-document synthesis. For end-user-facing conversational scenarios, focus on contextual understanding and stylistic consistency. An evaluation process built along these lines is more reliable than any single word-of-mouth judgment—and far easier to reuse continuously as model versions are updated.