Putting Large Language Models into Practice: From Workflow Optimization to Simulation Validation
Evaluating a large language model by answer quality alone is not enough for engineering use. This article explains how to judge models by whether they help close a problem with evidence, using a spatial measurement workflow, game-balance simulation, and rendering performance checks, plus review roles, permissions, cost, and release controls.
1. Evaluate Models by Whether the Problem Is Solved, Not Only by How Good the Answer Sounds
Developers often see a gap when using large language models. Some answers are clear and easy to follow, yet they do not hold up under code and data. Others are dense with technical detail and harder to discuss, but they correctly point out hidden state errors or gaps in verification.
That does not mean every model must be ranked on one universal scale. A more useful approach is to break engineering work into capability dimensions: understanding requirements, identifying constraints, analyzing code, expressing a plan, running experiments, and explaining results. Strong performance on one dimension does not automatically mean a system can own the whole development path.
Three levels should be kept distinct:
The first is making suggestions. The model proposes possible directions from a description.
The second is forming an executable plan. Using code, logs, and business constraints, the model specifies what to change, the risks, and how to accept the result.
The third is closing the evidence loop. With authorization and an execution environment, the team calls test facilities, runs experiments, and keeps the results so the change is shown to work.
Text that says “how it should be tested” is not a completed test. A claim that “a simulation was run” cannot replace experiment logs, configuration records, and reproducible results. The capability worth adopting should land on deliverables that can be inspected.
2. Case 1: Speeding Up a Spatial Measurement Tool—Why the Algorithm Should Not Change First
Consider a general scenario: a mobile tool uses a depth sensor and device motion data to capture indoor space, produce a 2D floor plan and a 3D structure, and let users correct dimensions, attach on-site photos, and export a report.
When the business goal becomes “finish measurement faster even for large homes,” teams easily treat the problem as “the recognition algorithm is not fast enough.” What users feel, though, is the total time of the whole task chain, not the time of one compute stage.
A complete operation usually includes:
entering the task, confirming permissions, starting capture, moving and scanning, handling missed areas, ending capture, generating the structure, manual correction, organizing photos, and exporting files.
If actual computation is only a small share of that time, the benefit of a faster algorithm is capped. It is more useful to check whether users wait repeatedly, confirm the same things again, or move back through several screens, and which work can be deferred or done in parallel.
2.1 Turn “faster” into a goal that can be accepted
A reliable requirement statement should at least answer:
- Is the target capture time, time to the first plan, or time to a complete report?
- Is a large home defined by area, or by room count, spatial connectivity, and occlusion?
- May the output be reduced, or must the original delivery quality stay the same?
- Must the same result hold on older devices, low battery, or weak networks?
- Is the underlying recognition capability allowed to change?
“From entering the task until the first editable drawing appears” and “from entering the task until the report exports successfully” are different metrics. Improving only the first while making export slower does not justify a general claim that the whole flow is better.
Set a primary metric first, then guardrail metrics. For example, the primary metric can be full-task duration, and guardrails can include dimensional error, drawing completeness, task failure rate, and extra manual correction. A speed gain has business value only if quality and stability do not clearly regress.
2.2 Replace intuition with stage logs
Performance analysis should start from task-level events, not only from the time of a single function. Each task can share one task identifier, with time, status, and outcome recorded at key points.
Cover these stages:
| Stage | Question to answer |
|---|---|
| Initialization | Is the task blocked by permission checks, resource setup, or loading historical data? |
| Capture | Is time spent mainly on the movement path, or on slow recognition feedback? |
| Post-processing | Is there repeated computation, useless reconstruction, or waiting on dependencies? |
| Editing | Do unclear prompts cause frequent rework? |
| Export | Is the step slowed by image processing, file writes, or resource reads? |
Do not look only at the average. Also check the median, higher-percentile duration, and failed samples, because a few complex homes can account for a large share of waiting time.
End-to-end time is also not simply the sum of every stage. If computation, image processing, and file preparation run in parallel, analyze the critical path and find what actually blocks the user from continuing.
2.3 Let evidence set the optimization order
Without changing the underlying recognition capability, consider these directions first:
Reduce unnecessary serial interaction. Start work that does not depend on the final structure earlier, such as organizing captured photos or preparing export metadata. Dependencies must be explicit. Parallelism must not read data that is not yet stable.
Support incremental feedback. Before the result is fully done, show the structure already available and the current status so users know the next step. Distinguish a temporary preview from the final result so an incomplete drawing is not treated as the official deliverable.
Reduce repeated processing. If one edit affects only a local region, check whether a local update is possible instead of recomputing everything. Local updates are appropriate only when data dependencies can be identified reliably.
Compress confirmations that add no value. For reversible actions that do not change the business outcome, consider merging steps or offering defaults. Do not simply drop confirmation for deleting data, overwriting a report, or changing entitlements.
Improve failure recovery. Even if the normal path is fast, having to start over after an interrupted capture can be the main pain. Stage saves and a clear recovery entry are often more valuable than speeding up a single computation.
These directions are not universal answers. A model can help propose candidates, map dependencies, and flag risks. The final choice should still come from real logs and experiment results.
3. From Advice to Implementation: State and Boundaries Are the Easiest Things to Miss
Faster flows often add asynchronous work, cache reuse, and incremental updates. Those changes look like performance work, but they also change how program state relates.
For example, a user starts a new measurement while background processing of the old task is still finishing. If the code does not check the task identifier, the old result can overwrite the new screen. Or the user edits a wall dimension, but export still reads the cache from before the edit, so the interface is correct and the report is wrong.
When reviewing an optimization, check in particular:
- Task identity is explicit. Each asynchronous result may write back only to its own task.
- Data versions match. Editing, preview, and export use the same version, or version differences are clearly marked.
- Cancellation works. After the user leaves the screen, background tasks do not keep consuming resources or writing state back.
- Repeated triggers are safe. Consecutive clicks, retries, and recovery do not create duplicate files or conflicting updates.
- Failures are explainable. Users can tell capture failure, structure processing failure, and export failure apart.
- Entitlements stay consistent. After the flow changes, trial scope, save limits, and export conditions do not shift in ways that were not designed.
A simple rule can constrain asynchronous write-back:
“Only a result whose task identifier matches, whose input version matches, and whose task has not been cancelled may become the current valid result.”
That rule is not a concrete interface. It is an engineering requirement that can become code checks and automated tests. Here the model helps turn scattered failure cases into a clear test list.
4. Case 2: Tuning Game Numbers Without Being Misled by a Few Playtests
Game numeric design and tool-flow optimization share one point: intuition can suggest a direction, but it rarely proves the conclusion by itself.
Changing a unit’s attack interval, for example, may feel more balanced after a few playtests. The result may come from the map, starting positions, random events, or play strategy, not from the parameter.
A more reliable method is a batchable adversarial simulation that turns “how it feels” into “what happens under which conditions.”
4.1 Define what is being optimized
“More balanced” is not a complete experiment goal. Developers should state whether they care about:
- win-rate gaps across factions or roles;
- whether match length clusters in a reasonable range;
- whether a clearly dominant strategy exists;
- whether the side that is behind still has meaningful decisions;
- whether resource growth creates an irreversible advantage;
- whether one parameter change makes other styles of play worthless.
A win rate near one half, by itself, does not prove the design is sound. If both sides use overly simple strategies, flaws that real players would exploit can stay hidden.
Prepare different strategy types and cover maps, initial conditions, and random seeds. In symmetric setups, swap factions or spawn positions to reduce environmental bias.
4.2 Keep reproducible simulation records
Each run should record at least:
- rules and code version;
- parameter configuration;
- random seed;
- strategy version;
- initial state;
- win or loss, duration, and key resource changes;
- abnormal exits and rule violations.
A fixed seed helps reproduce a problem, but one seed is not enough for an overall conclusion. When comparing two parameter sets, use the same set of seeds as a paired experiment so random variation interferes less with the judgment.
More runs do not automatically prove more. If strategy coverage is thin or the simulation rules are wrong, repetition only amplifies the same bias. Validate the simulator first, then set sample size from result variance and decision risk, and report uncertainty.
4.3 Keep the simulation from drifting away from the real game
If simulation code and the live rules are maintained separately, they can diverge. Ignoring collision, simplifying hit checks, or advancing time differently can produce results that look clean but do not transfer.
A safer approach is to reuse core rule logic where possible and separate presentation from rules. The simulation side advances state in batches and collects metrics. The live side handles input, visuals, and audio.
For parts that cannot be reused directly, add consistency tests: given the same initial state and action sequence, compare whether key state matches expectations. Numeric simulation should complement human playtests. It cannot replace judgment of feel, readability of information, or whether strategies are interesting.
5. Rendering Performance: What to Look at Besides Average Frame Rate
Rule simulation can evaluate numbers. It cannot directly prove rendering performance. The two kinds of experiments must be designed separately.
Rendering analysis should look at frame-time distribution, higher-percentile frame time, peak memory, stalls while loading resources, and how performance changes after a long run. Two versions with similar average frame rates can feel very different in stutter.
Test scenes should cover stress conditions such as high entity counts, dense effects, fast camera changes, and resources appearing together, with device state and scene scripts fixed. If numbers, assets, and rendering logic all change during the same test, it is hard to tell where a performance change came from.
A model can help analyze samples, propose bottleneck hypotheses, and check test coverage. Without real performance samples, “reducing draw load may improve performance” must not be written as “performance has already improved.”
6. When Several Models Collaborate, Split Roles Instead of Seeking Agreement
For complex engineering tasks, split the assistance flow into three roles:
Requirements analysis organizes goals, user paths, business constraints, and acceptance criteria.
Implementation analyzes code, proposes the smallest change, adds tests, and produces a change that can be inspected.
Review looks for counterexamples, especially missed state, exceptional flows, experimental bias, and conclusions that do not hold.
Different models can take these roles, or the same model can do them in separate sessions. “Another model agreed” is not verification. Different outputs can share the same wrong assumption.
To reduce mutual accommodation, have the reviewer read the requirements, code, and logs independently before seeing the candidate plan. Each comment should state its basis, trigger conditions, and how to verify it. Inferences without evidence should be marked as hypotheses still to be tested.
A final deliverable can use one structure:
- Problem: what effect the user or system sees;
- Evidence: which logs, code, or experiments support the judgment;
- Hypotheses: which causes are not yet confirmed;
- Change: which parts will be modified;
- Risk: what regression may be introduced;
- Verification: how success or failure will be judged;
- Rollback: how to recover if something goes wrong.
7. Before Rollout: Permissions, Cost, and Release Control
A model that can analyze a project should not receive every project permission by default. When on-site photos, floor-plan information, user data, or commercial rules are involved, classify the data and minimize it first so unnecessary sensitive content is not brought into the analysis environment.
Running tests or changing code also needs boundaries: open only the required directories and command permissions, require human confirmation for destructive actions, limit experiment runtime and resource use, and keep an operation record.
For release, follow “validate on a small scope, watch guardrail metrics, then expand gradually.” If caches, asynchronous processing, or merged steps are used, keep a rollback path. Do not ship a performance optimization and a business change widely at the same time.
8. Conclusion: A Practical LLM Application Is a Verifiable Engineering Path
The value of a large language model is not explaining a technical problem in a more complicated way, and not producing a longer optimization list. It is shortening the distance from a problem to evidence.
For a spatial measurement tool, it can help separate an algorithm bottleneck from a process bottleneck and fill in checks for asynchronous state and entitlement boundaries. For a small game, it can help design a simulation, analyze parameter effects, and spot experimental bias. For rendering optimization, it can organize performance evidence, but language cannot replace real measurement.
A reusable method is: define the goal, then collect evidence; state a hypothesis, then design the experiment; verify correctness before judging performance; and finally lower risk through independent review and gradual release.
Place the model inside that path instead of treating it as the final judge. That is more likely to produce stable, measurable engineering gains.
