LLMs in Software Engineering: From Workflow Optimization to Simulation-Based Validation
Large language models deliver engineering value when they help teams turn unclear requirements into implementable changes and verify the results. Using indoor measurement workflows and game balance simulations as examples, this article explains how to establish baselines, identify bottlenecks, design reproducible experiments, review hidden constraints, and organize model-assisted development around evidence and accountable acceptance decisions.
1. Evaluate LLMs by Their Ability to Complete the Engineering Loop
“The model is highly capable” is not a conclusion that directly supports development decisions. Developers need more practical answers: Can it identify why users are waiting? Can it turn an ambiguous request into an implementable change? Can it help demonstrate that the change has not broken existing functionality?
These questions involve three distinct capabilities.
Requirements analysis and solution communication. The model must identify business goals, constraints, and user behavior so the team understands why a change is needed and where to start.
Code analysis and implementation. The model must follow actual call paths rather than infer behavior from function names. Its proposed changes must also fit the existing architecture and resource limits.
Experiment design and validation. The model must help define test conditions, select metrics, analyze failures, and distinguish evidence-backed conclusions from hypotheses that still need testing.
These capabilities do not always develop together. A model that explains a solution clearly may overlook edge cases. A rigorous reviewer may produce extensive detail without offering a clear recommendation. Instead of relying on broad rankings, teams should assign roles and define acceptance criteria for each task.
The following two scenarios illustrate this approach.
2. Scenario One: Reducing End-to-End Time in an Indoor Measurement App
Define the Goal Before Optimizing
Consider a mobile indoor measurement app that uses a depth sensor to capture room geometry. It generates 2D and 3D floor plans and supports dimension annotations, associated site photos, and report export.
When a business wants to improve efficiency for larger properties, the request is often reduced to “make modeling faster.” But the time users need to finish a task depends on more than the modeling algorithm.
A better definition is:
Reduce the total time from the start of capture to a usable deliverable without changing the underlying recognition capabilities or drawing quality requirements.
The team must also define what counts as a usable deliverable. An editable floor plan draft and a complete report with photos and dimensions have different completion criteria. Their completion times should not be treated as equivalent.
For a sequential workflow, start with this breakdown:
Whole-property task time =capture time+ user interaction time+ computation time+ required validation time+ export time
If some tasks run concurrently, total elapsed time is primarily constrained by the critical path. Adding every stage duration together will not accurately represent it. This distinction determines whether an optimization should reduce computation or improve task orchestration.
Give the Model Evidence, Not a Bottleneck to Guess
If the only input is “users think the app is slow,” a model will likely suggest caching, parallel processing, or less rendering. These suggestions may be reasonable, but they are not grounded in the specific workflow.
More useful inputs include:
- Start and end timestamps, along with state changes, for key operations.
- Call relationships between major modules and relevant code excerpts.
- Device resource usage and records of UI stalls.
- Task completion data across different property layouts.
- Points where users cancel, repeat actions, or retry after failures.
- Requirements for drawing quality, editing, and export.
For example, if diagnostic records show that post-processing accounts for only a small share of elapsed time while users repeatedly pause at room confirmation, photo association, and saving, the priority should shift from rewriting algorithms to shortening the interaction path.
This is a general method for identifying bottlenecks, not a claim that a particular app has achieved a measured improvement. Each project must confirm its findings through its own logs and tests.
Establish an End-to-End Baseline with Instrumentation
Instrumentation should cover the complete task, not just an expensive function. Assign an identifier to each measurement task and record events such as:
Task startedCapture startedCapture completedPost-processing startedPost-processing completedFloor plan ready for editingAnnotation completedExport startedExport completedTask canceled or failed
Use a monotonic clock where possible so system clock adjustments do not distort duration measurements. Logs should include stage status, error categories, and relevant device information, but should not collect sensitive content such as site photos or full property addresses by default.
At a minimum, separate:
- First runs from consecutive runs.
- Small properties from complex multi-room layouts.
- Successful tasks from tasks requiring retries.
- Local processing from tasks involving network transfers.
- Runs with ample resources from resource-constrained runs.
Average duration alone is insufficient. Median duration describes the typical experience, while higher-percentile durations expose long-tail waits. Completion, retry, and crash rates help determine whether faster execution comes at the expense of reliability.
Optimize the Interaction Path Before Computation When the Evidence Supports It
When workflow organization causes most of the waiting, consider the following changes.
Reduce repeated input. Manage an object’s dimensions, photos, and notes together so users do not have to select the same target on multiple screens.
Defer nonessential steps. If report information is only required before final export, do not repeatedly block capture to collect it. However, required checks for quality and completeness cannot simply be removed.
Allow safe concurrency. Background work can prepare thumbnails or organize completed data when it does not compete for critical resources. Foreground capture should retain resource priority so concurrent tasks do not undermine tracking stability.
Separate previews from final results. Showing a preview that is sufficient for the next interaction while a higher-quality output is being completed can improve responsiveness. Its status must be clear: an unfinished result must not be presented as a final deliverable.
Support recovery from failures. Preserve intermediate state so users can resume from the latest valid point after an export failure or app interruption rather than recapture the entire property.
None of these is a ready-made answer. Each change should address an observed problem and be tested for any new interaction costs it introduces.
Review Hidden Constraints Before Shipping a Local Optimization
A UI change can affect authorization, data consistency, and billing boundaries at the same time. Combining previously separate steps may change when access checks occur. Allowing background export while users continue editing may produce an export that no longer matches the current floor plan.
Code review should address questions such as:
- Does the background task use a live object or an immutable snapshot?
- Can repeated clicks create duplicate tasks?
- Does cancellation actually stop computation and release resources?
- Where should results be stored after the user leaves the screen?
- Can automatic retries cause duplicate writes?
- Is task completion status consistent with data persistence?
- Are existing access restrictions still enforced at the correct points?
LLMs can help enumerate these risks, but “the code looks fine” is not validation. Paths involving state transitions need unit tests, integration tests, and regression testing on real devices.
3. Scenario Two: Moving Game Balance Decisions from Intuition to Simulation
Turn Balance Concerns into Measurable Hypotheses
Feedback such as “this unit is too strong” or “matches feel too slow” is common in small-game development, but it is not specific enough to guide a change.
Start with hypotheses that experiments can test:
- A particular strategy consistently dominates across multiple maps.
- A unit’s advantage comes mainly from its range rather than its health.
- Long match durations are linked to the resource growth curve.
- First-move advantage increases substantially at certain starting distances.
Then define metrics such as win rate, match duration, resource utilization, and the timing of key events. Win rate is one measure, not a substitute for evaluating the entire player experience.
Use the Model to Help Build Simulations, Not Invent Results
An effective workflow separates planning from execution: the model proposes an experiment, a controlled execution environment runs it, and the model analyzes the actual output.
Without execution access or supporting logs, the model can provide a test plan but cannot claim to have completed large numbers of matches. Simulation records should preserve the rules version, configuration, random seed, strategy version, and results so unusual runs can be replayed.
An illustrative experiment structure is:
For each candidate configuration:For each map scenario:For each random seed:Run strategy A against strategy BSwap starting positions and run againSave outcome, duration, resource metrics, and event recordsAggregate results:Compare performance across scenariosEstimate statistical uncertaintySelect unusual matches for manual review
Swapping positions helps control starting-location and first-move bias. Random seeds support reproducibility, but testing only a small fixed set can lead to overfitting to those samples.
Do Not Confuse Simulation Fairness with Player-Experience Fairness
Simulation findings are only as broad as the strategies tested. If the test agents only attack head-on, they cannot adequately evaluate flanking, kiting, baiting, or competition for resources.
A more complete assessment combines:
- Cross-play between multiple strategies.
- Tests across different layouts and starting conditions.
- Sensitivity analysis for key parameters.
- Human playtesting and review of unusual match recordings.
- Checks of execution difficulty and information visibility.
When two configurations perform similarly, limited samples are not enough to declare one superior. Report sample size and uncertainty, and expand testing when necessary.
Design Balance Simulations and Rendering Tests Separately
Headless logic simulations can validate rules quickly, but they cannot demonstrate that the actual game runs smoothly. Rendering tests must examine frame-time distributions, memory changes, asset loading, and behavior in high-density scenes.
Conversely, good frame rates do not prove that gameplay is balanced. Establish separate baselines for these experiments, then run combined regression tests in the full runtime environment. Check whether entity counts, visual-effect density, and interaction states affect both performance and gameplay.
4. Organize Model Collaboration Around Proposals and Evidence Gaps
Using multiple models in a project should not mean asking them to agree with one another. Useful collaboration requires explicit roles and deliverables.
The proposal role interprets requirements, identifies bottlenecks, develops alternatives, and recommends priorities.
The review role checks whether conclusions are supported, whether changes violate constraints, and whether tests cover failure paths.
Execution and acceptance remain the responsibility of controlled tools and the development team. They produce real test records and determine whether a change should be merged or released.
A structured review can require the following for each claim:
Claim under review:Available evidence:Missing evidence:Potential counterexamples:Recommended validation method:Does this block release?
This is more effective than asking whether a proposal is “good.” It directs the review toward verifiable questions and makes it easier to track whether risks have been resolved.
Agreement among models is still not proof of correctness. They may share the same mistaken assumptions. Final decisions must rely on code behavior, logs, experimental results, and business acceptance criteria.
5. Make Model-Assisted Development a Repeatable Engineering Process
A sustainable workflow should include these steps:
- Create a task brief. Document goals, non-goals, constraints, known facts, and open questions so the model does not expand the scope on its own.
- Establish a reproducible baseline. Fix test conditions and retain raw data to provide a clear reference for later changes.
- Make small, incremental changes. Address one problem at a time where possible. Changing multiple variables together makes attribution harder.
- Conduct cross-review. Focus on state consistency, access control, resource contention, and failure recovery.
- Run automated and manual validation. Automated tests confirm repeatable behavior; manual testing covers usability and complex scenarios.
- Prepare a rollback plan. Use controlled switches for higher-risk workflow changes and preserve compatible data-handling paths.
- Restrict execution permissions. Apply least privilege when models access code, logs, and runtime environments. Remove or mask sensitive data first, and require human confirmation for destructive operations.
Evaluate the workflow by more than the volume of generated code. Track task completion time, defect detection, rework costs, and release stability.
6. Conclusion: Engineering Value Comes from Verifiable Improvements
The most practical use of LLMs is not to produce suggestions that sound advanced. It is to move development problems toward actionable changes and verifiable outcomes.
For indoor measurement tools, that means separating user interaction time from computation time and identifying the end-to-end bottleneck. For small games, it means turning balance debates into reproducible experiments while recognizing that simulation cannot replace full experience testing.
A more reliable approach assigns models to requirements analysis, solution design, risk review, and result interpretation. Controlled execution environments supply the evidence, and development teams retain responsibility for acceptance.
Model capabilities become engineering productivity only when goals are clear, data is trustworthy, validation is sufficient, and changes can be rolled back.
