LLM Engineering in Practice: From Workflow Acceleration to Simulation Validation

    This article examines how to evaluate and deploy LLMs in engineering workflows by shifting the focus from answer quality to task correctness. Using an indoor measurement tool case and a game balance simulation case, it covers completion criteria, stage-level instrumentation, separation of compute and interaction waits, state consistency, reproducible experiments, independent rendering performance testing, role-based review, and decision records for a verifiable engineering loop.

    1. Evaluating LLMs: Move from “Answers Well” to “Does the Right Thing”

    In development work, a clearly organized suggestion does not necessarily solve a real problem, and a technically detailed answer is not always suitable for direct execution. To evaluate the engineering value of an LLM, expression quality, problem diagnosis, and validation capability should be assessed separately.

    For example, given the requirement to “make an indoor measurement tool generate a whole-home floor plan faster,” a model may suggest optimizing geometric calculations, reducing drawing passes, or changing the order of user operations. These directions may all be reasonable, but only by combining real logs, code paths, and usage scenarios can a team determine which one deserves priority.

    A more practical question is therefore not “Which model has the strongest overall capability?” but:

    • Does the current task require requirement clarification, solution design, or defect investigation?
    • Has the model identified the main bottleneck rather than merely producing a common optimization checklist?
    • Does the recommendation preserve business rules, data quality, and user entitlements?
    • Is the conclusion supported by test results?
    • If a change fails, can its impact scope be identified and rolled back in time?

    Building a workflow around these questions is usually more effective at improving engineering efficiency than relying on a single question-and-answer exchange.

    2. Case 1: End-to-End Acceleration of an Indoor Measurement Tool

    Consider a mobile indoor measurement tool that uses devices with depth-sensing capability to capture room information, generate 2D floor plans and 3D spatial models, and support dimension annotations, photo association, and report export.

    The development team wants to improve the experience in larger homes. Without changing the underlying recognition capability, the goal is to shorten the time from starting capture to obtaining a usable report.

    This type of requirement is easily misunderstood as “speeding up modeling,” but what users actually perceive is the duration of the complete task.

    2.1 Define Completion Criteria Before Discussing Optimization Goals

    “Floor plan complete” may correspond to at least three states:

    1. A previewable spatial outline has been generated.
    2. The drawing has completed dimension and photo annotations.
    3. The report has been generated and can be delivered or shared.

    If the team does not align on a definition, algorithm developers may consider modeling finished as task completion, while field staff still need to correct dimensions, take additional photos, and wait for export.

    Several key metrics should therefore be recorded together:

    • Time to first usable preview;
    • Time to complete necessary annotations;
    • Time to a deliverable report;
    • First-capture success rate;
    • Rework count and rework time.

    “Usable” must have a clear quality threshold. Results with missing major walls, incorrect photo associations, or incomplete dimension annotations should not be counted as successful completion.

    2.2 Build a Complete Time Breakdown

    End-to-end time can be abstracted as:

    Total time = capture time + user operation time + post-processing time + export wait time + rework time.

    This is an analytical framework, not a requirement that all stages must run serially. In real systems, some tasks can run concurrently, and the critical path should ultimately be analyzed.

    If logs show that post-processing accounts for only a small proportion, while users repeatedly pause between scanning, confirmation, annotation, and page switching, then further compressing modeling time has limited benefit.

    At that point, it is more worthwhile to check:

    • Must users wait for all processing to finish before continuing?
    • Is the same information entered repeatedly?
    • Does every room require similar confirmation again?
    • Can missing areas be indicated during capture to reduce rework after completion?
    • Are non-critical tasks such as report formatting placed on the main workflow?

    An LLM can help read logs and trace call chains, but time conclusions should come from actual instrumentation, not from guessing based on function names.

    2.3 Create Stage Logs Suitable for Analysis

    A stage event should contain at least a task identifier, stage name, start and end times, execution result, and scenario characteristics. Scenario characteristics may include room count, data scale, and whether this is the first use, but unnecessary personal information should be avoided.

    The following is a neutral pseudocode example:

    1. function record_stage(task_id, stage_name, action):
    2. start = monotonic_time()
    3. status = "success"
    4. try:
    5. return action()
    6. catch error:
    7. status = "failed"
    8. raise error
    9. finally:
    10. write_event(
    11. task_id = task_id,
    12. stage = stage_name,
    13. duration = monotonic_time() - start,
    14. result = status
    15. )

    A monotonic clock should be used to calculate individual durations to avoid errors caused by system time adjustments. For asynchronous tasks, it is also necessary to associate task start, actual completion, and user-visible status. “Successfully submitted a background task” must not be treated as “processing complete.”

    Analysis should not rely only on averages. Median, higher-percentile durations, and failed samples should also be examined, because large homes and complex rooms may cluster in the tail of the duration distribution.

    3. Workflow Optimization Must Not Sacrifice Correctness

    3.1 Distinguish Compute Waits from Interaction Waits

    Compute waits can usually be addressed through task decomposition, caching, incremental processing, and concurrent execution. Interaction waits are more about page organization, defaults, feedback timing, and continuity of operations.

    For example, once sufficiently stable intermediate results are available, users can be allowed to view the floor plan outline first and then add photos and notes. However, the interface must clearly indicate result status so that users do not mistake an unfinished draft for a final report.

    Similarly, showing a preview earlier only improves time to first use; it does not necessarily shorten final delivery time. The two metrics should be measured separately, and one should not replace the other.

    3.2 Check Business Constraints and State Consistency

    Workflow adjustments often change existing state transitions, so the following must be verified:

    • Are completed edits retained after the user exits?
    • Can the interface give an accurate prompt when a background task fails?
    • Does repeated clicking cause duplicate exports?
    • Are photos still associated with the correct wall or room?
    • Are usage quotas and trial rules still enforced within the defined boundaries?
    • Can drafts and final versions be clearly distinguished?

    When a model proposes “merging steps” or “opening operations earlier,” it should also be asked to list new states, failure paths, and recovery strategies. A proposal that describes only the ideal path is usually insufficient to enter development.

    3.3 Validate Benefits with Small-Scope Experiments

    Each optimization round should ideally be built around a testable hypothesis. For example: “Reducing repeated confirmation steps can lower user operation time without increasing the dimension correction rate.”

    During validation, device conditions, scenario grouping, and task requirements should be kept as consistent as possible. If interaction, computation, and export logic are changed at the same time, it will be difficult to identify the source of the benefit even if overall performance becomes faster.

    Acceptance should check not only reduced duration but also result quality, failure rate, memory peak, and user rework. If performance improves while quality declines, the optimization cannot simply be judged successful.

    4. Case 2: Using Simulation to Validate Game Balance Designs

    Compared with product workflow discussions, game balance adjustments require more reproducible experiments. Whether a character, equipment item, or strategy is too strong cannot be judged only from a model’s textual analysis of the rules.

    A model is suitable for proposing candidate designs, generating test configurations, and analyzing results, but combat outcomes should be calculated by the actual rule implementation.

    4.1 Define Evaluation Metrics First

    Common metrics include win rates across different combinations, average match duration, first-move impact, resource consumption, and strategy diversity.

    However, win rate is not the only criterion. Two characters with similar win rates do not necessarily provide balanced experiences: one may gain an uncounterable advantage in a few situations, while the other may require extremely demanding operational conditions.

    Tests therefore need to cover different maps, initial states, strategy strengths, and resource conditions, and statistics should be reported by scenario rather than as a single aggregate win rate.

    4.2 Ensure Experiments Are Reproducible

    Each simulation should save the rule version, parameter configuration, random seed, strategy version, and result summary. If anomalies occur, event records sufficient to replay the match should also be retained.

    To increase the number of tests, teams must not use a simplified simulator that differs significantly from the actual rules and then directly interpret the results as real game behavior. If a simplified model is necessary, its applicable scope should be stated clearly, and deviations should be validated through a small number of actual runs.

    4.3 Interpret Test Volume Correctly

    Running a large number of matches does not guarantee reliable conclusions. Whether the tests cover key scenarios is often more important than the total number of runs.

    For approximately independent binary outcomes, the uncertainty of a win-rate estimate is related to sample size. But if all matches use similar strategies, the same maps, or highly correlated initial conditions, the nominal sample size may overstate the strength of the evidence.

    A more reasonable approach is to perform stratified sampling first, identify sensitive scenarios, and then add experiments for anomalous combinations. A model can help locate “under which conditions imbalance occurs” rather than merely declaring that a parameter should be increased or decreased.

    5. Rendering Performance Must Be Evaluated Separately from Numerical Simulation

    Combat simulation mainly tests rules and strategies; it cannot replace rendering performance testing. Running a large number of matches in the background may barely trigger real interface rendering, so it cannot prove that the visuals are smooth.

    Rendering tests should be conducted on representative devices and scenarios, with attention to:

    • Frame time and its variance;
    • Main-thread blocking;
    • Graphics processing load;
    • Memory peaks and resource release;
    • Behavior when high-frequency effects or objects appear in bursts;
    • Whether performance degrades after sustained operation.

    Average frame rate can mask noticeable stutter, so frame time series should be retained and abnormal spikes analyzed. It is also necessary to distinguish bottlenecks caused by CPU, GPU, resource loading, and synchronization waits.

    If the bottleneck comes from resource loading, reducing geometric complexity may not be effective. If the main issue is a large amount of logic executing on the main thread, simply compressing textures may also fail to improve performance. Optimization must be based on localization results.

    6. Build Multi-Role Collaboration, Not Voting Across Multiple Answers

    LLMs may perform differently in requirement analysis, engineering implementation, and defect review, but a given capability should not be permanently bound to a specific model. A more controllable approach is to define roles and deliverables clearly.

    6.1 Requirement Analysis Role

    Responsible for turning vague goals into constraints and acceptance criteria, and for producing the problem definition, user paths, priorities, and immutable business boundaries.

    6.2 Engineering Implementation Role

    Responsible for locating relevant code, designing the minimum change scope, and explaining data flow, state transitions, concurrency risks, and rollback methods.

    6.3 Validation and Review Role

    Responsible for finding counterexamples and checking failure paths, insufficient test coverage, and overextended conclusions. The review focus is not whether the writing is polished, but whether the evidence is sufficient to support release.

    The three roles should share factual materials, but during review it is better for each to form an independent judgment first and then compare it with candidate solutions, reducing the risk of being biased by a previous answer.

    When disagreements arise, simple majority voting should not be used. Instead, disagreements should be converted into experiments: which log can distinguish between two explanations, which input group can reproduce the risk, and which test can validate the benefit.

    7. Bring LLM Usage into Engineering Quality Management

    Once models enter the development workflow, they also require permission control and auditing.

    Project code, field photos, logs, and business data should be properly de-identified before being provided to a model. The execution environment should follow the principle of least privilege, and high-risk operations, production data modifications, and formal releases still require human confirmation.

    Code generated by a model must go through normal code review and testing. For changes that affect capture, billing, data persistence, or permission decisions, review standards must not be lowered simply because the model provided a detailed explanation.

    Each task should also retain a concise decision record:

    • The original problem and constraints;
    • Verified facts;
    • Unverified assumptions;
    • Adopted and abandoned solutions;
    • Test methods and results;
    • Post-launch observation metrics and rollback conditions.

    These records reduce repeated analysis later and prevent a model from gradually presenting speculation as fact over a long conversation.

    8. Conclusion: Practical Value Comes from a Verifiable Closed Loop

    The workflow optimization of the indoor measurement tool shows that the real bottleneck may not be the most visible algorithmic step, but waiting, repeated operations, and rework. Game simulation and rendering tests show that textual reasoning can only suggest directions; it cannot replace real execution and measurement.

    Mature LLM engineering practice should form a closed loop: goal definition, evidence collection, solution generation, independent review, experimental validation, and post-launch observation.

    The final criterion is not how much the model said or how many simulations it ran, but whether it helped the team identify problems more accurately, implement changes with lower risk, and prove results with reproducible evidence.