From Good Answers to Finished Work: How Large Language Models Handle Complex Tasks
This article explains why evaluation of large language models is shifting from answer quality to whether a model can complete a multi-step task and deliver a usable result. It covers three core capabilities: precise instruction following, self-verification, and persistence in long-running tasks. It also explains how visual input extends what models can process, how checkpoints, error recovery, and context management keep long workflows stable, how to control token costs, and how to build an internal evaluation set and manage risk.
1. From Good Answers to Finished Work
For a long time, large language models were judged mainly on whether their answers were accurate and their language was fluent. As people use models to rewrite documents, organize materials, build presentation slides, and assist with software development, the evaluation question changes. The question is now whether the model can complete the whole task, and whether the deliverable can be used as is.
A complete work task usually involves several steps. For example, organizing a technical proposal requires reading the source materials, extracting the key points, reorganizing the sections according to a template, and finally checking that terms and figures stay consistent throughout. An error in any step affects every step that follows. For this reason, task completion reflects a model’s real value better than the polish of a single response.
2. Three Core Dimensions of Complex Task Execution
2.1 Precision in Instruction Following
Instruction following means that a model can apply constraints correctly. These constraints include word limits, output formats, banned word lists, and section structures. In scenarios with multiple constraints, three failure modes are common: the model misses a rule, it forgets an earlier requirement in the second half of a long text, or it changes the original data to make the text read more smoothly.
In engineering practice, you can break constraints into items that can be checked, then verify each item after the output is generated. The following is a simple validation function:
import redef check_output(text: str, forbidden_terms: list[str], min_chars: int) -> list[str]:errors = []if len(re.sub(r"\s", "", text)) < min_chars:errors.append(f"Body text has fewer than {min_chars} characters")for term in forbidden_terms:if term.lower() in text.lower():errors.append(f"Forbidden term found: {term}")return errors
The validation results can be sent back to the model as feedback for correction. This creates a “generate, check, correct” loop. The loop does not depend on the model’s own judgment, so the results are easier to control.
2.2 Self-Verification
Self-verification means that the model checks its own output against the requirements before it submits the result. For example, it runs tests after changing code, rechecks the totals after editing a table, or compares the key facts against the source after writing a summary. The ability to find and fix errors on its own is an important source of reliability in complex tasks.
In practice, verification steps should be written into the task workflow. Do not rely on the model to perform them unprompted. A common approach is to define a validator for each task type: unit tests for code tasks, validation scripts for data tasks, and keyword and structure checks for document tasks. When a validator fails, return the error message to the model. Repeat until the output passes or the retry limit is reached.
2.3 Persistence in Long-Running Tasks
Long-running tasks keep going for tens of minutes or longer. Examples include migrating a codebase, organizing hundreds of pages of material, or processing files in batches. These tasks are difficult because the context keeps growing. Early decisions may be forgotten, and intermediate results may gradually drift away from the final goal.
The remedy is to split a long task into smaller steps with checkpoints. Save a state summary when each step finishes.
3. The Engineering Significance of Visual Understanding
Visual understanding lets a model read screenshots, charts, scanned documents, and interface sketches directly. In office and development work, a user can submit a screenshot of an error message. The model can then locate the problem and suggest a fix, without anyone transcribing the text by hand.
Processing visual input raises three issues. The first is resolution. Oversized images consume many input tokens, while undersized images lose text detail, so you need to balance cropping and compression. The second is structured extraction. When converting a table image to CSV, for example, ask the model for a fixed output format so that downstream programs can process the result. The third is accuracy review. Check key numbers and proper nouns against the original image, item by item.
The following example crops a region of the image before submission:
from PIL import Imagedef prepare_crop(path: str, box: tuple[int, int, int, int], max_side: int = 1600) -> Image.Image:img = Image.open(path).convert("RGB").crop(box)scale = min(1.0, max_side / max(img.size))if scale < 1.0:img = img.resize((int(img.width * scale), int(img.height * scale)))return img
Submit only the regions relevant to the question. This lowers cost and reduces the chance that unrelated information distorts the model’s judgment.
4. Stability Design for Long Workflows
A long workflow combines multiple model calls, tool calls, and human confirmation points. Its stability depends on three factors: state management, error recovery, and timeout control.
4.1 State and Checkpoints
Persist the input, output, and state of every step. If a task is interrupted, it can resume from the most recent checkpoint instead of starting over. Each state record should include the step number, an input summary, the paths of output files, and the verification results.
4.2 Error Recovery and Retries
The retry strategy should depend on the error type. Retry network timeouts with exponential backoff. For format errors, regenerate the output and include the error message. For permission errors, stop the task immediately and notify a person. Retrying every error the same way increases cost, and it can write the same data more than once.
import timedef run_step(step, state: dict, max_retries: int = 3) -> dict:for attempt in range(1, max_retries + 1):try:result = step(state)state[step.__name__] = resultreturn stateexcept TimeoutError:time.sleep(2 ** attempt)except ValueError as err:state["last_error"] = str(err)raise RuntimeError(f"Step {step.__name__} still failed after {max_retries} attempts")
4.3 Context Management
The context of a long task keeps expanding. A practical method is to compress the confirmed conclusions of each completed stage into a short summary. Keep only the original material that later steps need. Restate the key constraints and the user’s original requirements at each stage to prevent the work from drifting away from the goal.
5. Managing Cost and Token Consumption
Stronger task execution usually consumes more tokens. The model reads more material, produces longer intermediate results, and runs more verification rounds. Without controls, the cost of one task can be much higher than expected.
You can control cost at three levels:
- Budget caps: Set a maximum token count for each task. When the task reaches the limit, pause it and ask for confirmation.
- Tiered models: Use lighter models for simple work such as format conversion and classification. Reserve high-capability models for complex reasoning.
- Cache reuse: Identical input materials and system instructions can be cached. This reduces the portion you pay for repeatedly.
Track cost per task, not per call. A task often includes many calls, and individually cheap calls can add up to a large total.
6. Building Your Own Evaluation Benchmark
Public benchmark scores are a useful reference. However, they often differ from the conditions of a specific business. Teams should build an internal evaluation set and test models on real tasks.
To build an evaluation set, follow these steps:
- Select 50 to 200 representative samples from historical tickets or routine tasks. Include both simple and difficult cases.
- Define a pass criterion for each sample. Where possible, use conditions that can be checked automatically, such as passing tests, complete fields, or consistent values.
- Record several metrics: first-pass rate, number of manual edits, average time, and cost per task.
- Rerun the evaluation after each change to the model or prompt, and compare how each metric moved.
In industry benchmarks, pass rates for code repair tasks are usually reported as percentages. Improvements between two model generations are often in the single-digit percentage points. These figures show the general direction of progress. They cannot replace testing within your own business.
7. Implementation Advice and Risk Control
Automating complex tasks requires balancing efficiency and control. Consider the following points first.
First, keep human review checkpoints. Steps that send information externally, delete data, change permissions, or deploy to production should require human confirmation before they run.
Second, follow the principle of least privilege. Give a task agent only the access it needs for the current step. Read credentials from environment variables or a secrets manager, and never write them into code or logs.
Third, redact sensitive data before processing. Replace or mask personal information, keys, and internal addresses in screenshots, documents, and logs before you submit them.
Fourth, keep traceable logs. Save the input summary, model output, and verification result for every step. These records support later troubleshooting and review.
8. Summary
The evaluation of large language models is moving from the quality of single answers toward the ability to deliver complete tasks. Complex tasks depend on precise instruction following. Visual understanding extends the kinds of input a model can use. Long workflows need checkpoints, error recovery, and context management working together. Teams should measure results with an internal evaluation set, and expand automation step by step while keeping cost and risk under control.
