LLMs in Engineering Practice: Workflow Optimization and Simulation Validation

    Large language models can support engineering decisions, but their recommendations need evidence and verification. Using an indoor measurement application and a small game as examples, this article explains how to identify workflow bottlenecks, manage safe code changes, validate game balance through reproducible simulations, and assess rendering performance. It also outlines a role-based review process, release criteria, and risk controls for integrating LLMs into an engineering feedback loop.

    1. Shift the Focus from Model Capabilities to Engineering Problems

    Discussions about the practical value of large language models often fall into two traps: treating clear explanations as correct judgments, and treating generated code as completed engineering work.

    Real projects are rarely that simple. A recommendation may be logically coherent yet miss the actual performance bottleneck. Code may pass isolated tests while breaking existing data consistency. A simulation may produce extensive numerical results that are unusable because the underlying rules were implemented incorrectly.

    Evaluating whether an LLM is suitable for engineering work therefore requires three questions:

    • Does it understand the business objective and the constraints that must remain unchanged?
    • Can it base its judgments on code, logs, and experimental results?
    • Can it propose changes that are implementable, verifiable, and reversible?

    This article examines two scenarios: speeding up an indoor measurement workflow, and validating game balance and rendering performance in a small game. The goal is not to compare model rankings, but to show how language models can participate in a closed-loop engineering process.

    The approach described here is a general methodology. Any optimization benefit must be confirmed through testing in the actual project. Example targets and design recommendations are not achieved performance results.

    2. Case Study: Finding the Real Bottleneck in an Indoor Measurement Tool

    2.1 Turn the Product Objective into a Measurable Problem

    Consider an indoor measurement application that uses a depth-capable mobile device to capture room information, generate 2D or 3D floor plans, and support dimension annotations, linked site photos, and report exports.

    The business wants to reduce the time required to produce a complete floor plan for a larger home. However, the underlying spatial recognition capabilities must remain unchanged.

    This constraint means that optimization should not immediately target the recognition algorithm. The first step is to examine how capture, confirmation, editing, and export are organized.

    “Make floor plan generation faster” is not a sufficiently precise requirement. A more useful definition is:

    Reduce the total time from the start of capture to a deliverable floor plan, while preserving measurement quality and existing functionality and reducing repeated actions and failed attempts.

    Two endpoints must be distinguished:

    • Preview completion: The user can view a preliminary floor plan.
    • Delivery completion: Dimensions, photos, and exported content meet business requirements.

    Moving required work until after the preview may improve time to the first visible result. It does not, by itself, demonstrate that the complete business workflow is faster.

    2.2 Break Down the User Journey Before Blaming the Algorithm

    End-to-end time typically includes:

    1. Moving the device and completing spatial capture.
    2. Processing the captured data.
    3. Confirming room boundaries or responding to warnings.
    4. Editing dimensions and adding photos.
    5. Generating and exporting the report.
    6. Returning to an earlier step after a failure.

    These activities are not necessarily sequential, so their durations cannot simply be added together. For parallel tasks, the relevant measure is the critical path that determines how long the user must wait.

    For example, background processing may be relatively quick, while repeated confirmations across multiple screens make the overall experience slow. In that situation, reducing screen transitions may be more useful than further optimizing the backend algorithm.

    An LLM can help turn an unclear request into a structured list of questions, evidence, and possible actions:

    Question to investigate Evidence required Possible action
    Is data processing the main bottleneck? Stage durations and user wait times Optimize processing on the critical path
    Are users confirming the same information repeatedly? Navigation and interaction records Consolidate confirmations or adjust defaults
    Are larger homes more likely to encounter interruptions? Failure causes and recovery records Add progress checkpoints and recovery paths
    Does export block editing? Task states and resource usage Evaluate background export
    Could optimization change access-control boundaries? Feature rules and state transitions Add authorization checks and regression tests

    This is more likely to produce useful results than asking a model to “optimize the entire project.”

    2.3 Build Logs That Explain the Problem

    Performance logging should capture more than a single total duration. Use a correlation identifier for each user task and record:

    • Stage name, start time, and end time.
    • Success or failure, failure category, and retry activity.
    • User wait time and system processing time.
    • Non-sensitive characteristics such as room count and data size.
    • Runtime environment and application version.
    • Recovery, cancellation, or fallback paths.

    An illustrative record might look like this:

    1. Task ID: identifier for one capture task
    2. Stage: structure processing
    3. Start time: monotonic clock reading
    4. End time: monotonic clock reading
    5. Result: success
    6. Data size: room count and geometric element count
    7. Retry count: number of retries for this stage

    Use a monotonic clock to measure durations so that system clock adjustments do not distort the results. Cross-process or cross-device workflows also require appropriate time synchronization and event correlation.

    Do not rely only on averages. The median helps describe the typical experience, while higher percentiles reveal slow tasks. If most users finish quickly but a smaller group repeatedly encounters timeouts in larger homes, the average may hide the problem that most affects user satisfaction.

    2.4 Ask the Model for Hypotheses, Not Unsupported Conclusions

    After providing logs and code, require the model to distinguish three categories:

    • Observed facts: Findings directly supported by the supplied material.
    • Hypotheses to test: Possible explanations for those findings.
    • Recommended actions: Changes intended to test a hypothesis or improve the workflow.

    For example, a claim that users repeatedly confirm information when switching rooms must be supported by interaction records. Without that evidence, it remains a hypothesis rather than an identified bottleneck.

    A useful instruction is:

    First list the judgments supported by the evidence, then identify what cannot yet be confirmed. For every optimization recommendation, describe the affected stage, expected impact, possible side effects, validation method, and rollback conditions. Do not present unmeasured benefits as established results.

    This constraint helps reduce recommendations that sound professional but are difficult to implement or verify.

    3. From Workflow Optimization to Safe Engineering Changes

    3.1 Evaluate Low-Impact Workflow Changes First

    When spatial recognition must remain unchanged, several workflow adjustments are worth evaluating.

    Consolidate repeated confirmations.
    If multiple screens ask users to confirm the same information, consider presenting it together. However, necessary confirmations for critical dimensions or irreversible actions should not be removed merely to reduce clicks.

    Show results incrementally.
    Where data consistency permits, display completed portions so users can understand progress. Clearly distinguish provisional information from confirmed results to prevent unfinished output from being mistaken for a final floor plan.

    Defer non-blocking work.
    Whether photo entry and report-format selection must occur during capture depends on business requirements. Work that can be deferred may be handled together later, but deferral must not lead to omission.

    Support interruption recovery.
    Save capture progress, edit history, and task state to reduce repeated work after a failure. Recovery also requires consideration of version compatibility, data integrity, and storage cleanup. Adding a “Resume task” button is not enough.

    3.2 Asynchronous Execution Requires More Than a Background Task

    Moving report generation into the background may reduce UI blocking, but it introduces new state-management questions:

    • If the user changes dimensions, does the task use the old data or the new data?
    • If the user repeatedly selects export, are duplicate tasks created?
    • When a task is canceled, how are partially written temporary files removed?
    • How is task state recovered after the application terminates?
    • Can exported results be traced to the data version that produced them?

    A more robust design generally requires:

    1. Binding each export task to a specific data version.
    2. Creating an immutable data snapshot when the task starts.
    3. Using task identifiers to prevent duplicate submissions from producing duplicate results.
    4. Defining states such as waiting, running, succeeded, failed, and canceled.
    5. Cleaning up intermediate artifacts after failure or cancellation.
    6. Retaining sufficient operational records for troubleshooting.

    An LLM can help review whether state transitions are complete, but it cannot replace lifecycle testing on real devices.

    3.3 Include Business Rules in Code Review

    Workflow changes can affect feature access as well as performance.

    For example, moving export to an earlier screen may bypass an existing authorization check. Adding a shortcut may also cause different entry points to apply different rules.

    Code review should therefore examine at least the following:

    • Whether every entry point consistently checks permissions and prerequisites.
    • Whether resuming an old task reevaluates the current state.
    • Whether offline or error conditions allow rules to be bypassed.
    • Whether failure messages accurately explain recovery options.
    • Whether the new workflow disrupts established user practices.

    These issues cannot be resolved by inspecting a single UI file. Review must follow the call chain and state flow.

    4. Case Study: Turning Game Balance into a Reproducible Experiment

    4.1 Define the Balance Objective First

    Numerical tuning in a small game may involve character attributes, skill benefits, resource costs, and interactions between opponents. An LLM can suggest adjustments, but “it looks balanced” is not an acceptance criterion.

    Start by defining what needs to be tested:

    • Is any strategy clearly dominant?
    • Do different initial conditions substantially change outcomes?
    • Does match duration fit the intended gameplay?
    • Does a particular skill create excessive variability in its benefit?
    • Does an adjustment reduce the range of viable strategies?

    Balance does not require every character, map, and strategy to produce identical outcomes. Acceptable ranges should reflect the gameplay objectives rather than a mechanical pursuit of one target ratio.

    4.2 Reuse the Actual Game Rules Wherever Possible

    If a model writes a separate simplified calculator that omits movement, cooldowns, collisions, or stacking effects, running it many times will not make its results representative of the real game.

    A more reliable approach is to have the simulation call the same rule modules used by the game and run in a headless mode. The model can help generate experiment configurations, analyze results, or add tests, but the experiments must run in an actual execution environment.

    Keep these claims separate:

    • The model recommended running an experiment.
    • The execution environment completed the experiment.
    • The results were saved and can be reviewed.

    Simulation validation can only be claimed when actual execution results, logs, and artifacts are available.

    4.3 Control Randomness and Sampling Bias

    Each experiment should record the rules version, parameter configuration, random seed, initial conditions, and strategy type.

    An illustrative process is:

    1. For each parameter configuration:
    2. For each category of initial conditions:
    3. For each predetermined random seed:
    4. Run a match using the actual game rules
    5. Save the outcome, duration, resource changes, and anomalous events
    6. Aggregate the results and examine differences across conditions

    Do not test only one fixed strategy. Otherwise, the experiment may show only how that strategy performs under the current configuration, rather than whether the gameplay as a whole is healthy.

    Metrics such as win rate also require consideration of sample size and statistical uncertainty. Similar observed results do not necessarily establish that two configurations are equivalent. Different results do not necessarily prove that an adjustment is effective. Both variability and practical significance must inform the judgment.

    4.4 Automated Simulation Does Not Replace Human Playtesting

    Simulation is useful for identifying extreme cases in the rules, but it cannot fully capture learning difficulty, input demands, or the quality of player feedback.

    A more effective process is to:

    • Use automated simulation to eliminate clearly unbalanced configurations.
    • Use rule tests to verify boundary conditions.
    • Use human playtesting to observe comprehension and experience problems.
    • Convert that feedback into new, measurable hypotheses.

    This reduces purely manual trial and error without treating simulation metrics as a complete measure of the player experience.

    5. Rendering Optimization: Ground Model Recommendations in Profiling

    Game balance and rendering performance are separate problems and should be evaluated separately.

    Stuttering can come from computational load, graphics processing, resource loading, memory allocation, or UI updates. Profile the application to identify the primary source of time consumption before changing scene complexity, resource management, or update frequency.

    Keep the following conditions fixed during testing:

    • Device and runtime environment.
    • Graphics quality settings.
    • Scene content and object count.
    • Input sequence.
    • Warm-up conditions and test duration.

    In addition to average frame rate, examine the frame-time distribution and occasional long frames. Two versions with similar averages may feel noticeably different because of differences in long-frame frequency.

    Performance improvements must not come at the expense of visual correctness. Regression tests should also cover disappearing objects, inconsistent animation states, and resources that are not properly released.

    6. Role-Based Collaboration: Build a Review Loop Across Perspectives

    Rather than asking one model to handle requirements, implementation, and acceptance in a single pass, divide the work into distinct roles.

    6.1 Requirements Analyst

    This role clarifies objectives, user journeys, constraints, and acceptance criteria, and identifies missing information.

    The output should be an actionable requirements list rather than broad product advice.

    6.2 Implementer

    This role proposes narrowly scoped code changes and explains affected modules, state changes, and compatibility implications.

    Prefer small changes over broad rewrites, which make it harder for reviewers to determine the source of a problem.

    6.3 Reviewer

    This role independently checks assumptions, concurrency issues, authorization boundaries, recovery behavior, and test coverage.

    The reviewer should have access to the original requirements, relevant code, and logs—not just the implementer’s summary. This reduces the risk of being led by an existing conclusion.

    6.4 Experiment Lead

    This role designs controlled comparisons, runs tests, and organizes the evidence. Final conclusions should be tied to specific versions, test conditions, and result artifacts.

    Different models can fill these roles, or the same model can perform them using isolated contexts. The number of roles does not itself guarantee reliability. Independent review, explicit handoffs, and verifiable evidence are what matter.

    7. Acceptance Criteria and Risk Controls Before Release

    Engineering delivery requires at least four categories of validation.

    Functional correctness.
    Capture, editing, saving, recovery, and export must remain fully usable.

    Performance effectiveness.
    The critical path must actually become shorter, slow tasks must improve, and resource usage must remain acceptable.

    Business consistency.
    Permissions, feature entry points, and existing rules must remain consistent.

    Recoverability.
    Network interruptions, task cancellation, process termination, and data corruption must have defined handling paths.

    Use a staged rollout and retain rollback capability. If errors increase, the team should be able to disable the new workflow quickly rather than depend on an emergency code change.

    Indoor floor plans, site photos, and project source code may also contain sensitive information. Before sharing material with a model, remove or mask sensitive data and provide only what is necessary. For automated execution, restrict file access and operational permissions to reduce the risk of accidental deletion, unauthorized changes, or credential exposure.

    8. Conclusion: LLM Value Depends on a Verifiable Engineering Loop

    LLMs can shorten analysis and experimentation, but their outputs remain inputs to engineering decisions—not substitutes for validation.

    For indoor measurement tools, the key is to separate system processing from user activity and identify what truly blocks delivery. For small games, it is to reuse actual rules, control experimental conditions, and combine simulation with human playtesting. For code collaboration, it is to make requirements, implementation, review, and verification check one another.

    A reliable workflow can be summarized as:

    Define objectives → Gather evidence → Form hypotheses → Make small changes → Run controlled comparisons → Review risks → Release in stages.

    When each judgment can be traced to logs, code, tests, or experimental results, an LLM becomes more than a tool for answering questions. It becomes a useful participant in improving the quality of engineering decisions.