Implementing LLMs in Practice: Case Studies on Room Measurement Optimization and Game Validation

    Evaluating the practical application of Large Language Models (LLMs) requires shifting focus from raw performance metrics to whether they actually solve engineering tasks. This article explores a methodology for deploying LLMs, emphasizing testable hypotheses, evidence-based modifications, and repeatable validation. Through two case studies—optimizing a mobile room measurement tool and validating game design via simulation—we illustrate how to define bottlenecks, structure model outputs, and establish permission boundaries. The goal is to leverage LLMs to accelerate engineering judgment without replacing hard evidence.

    From “How Strong is the Model” to “Is the Task Solved”

    When discussing LLM capabilities, people often focus on response speed, completeness, and code length. However, for developers and enterprise users, these are merely process metrics, not final outcomes.

    An expert-sounding suggestion that fails to identify real bottlenecks, or cannot be validated in existing engineering workflows, is hard to turn into productivity. Conversely, a plainly worded analysis that accurately identifies time-consuming sources, proposes rollback-friendly modifications, and includes validation methods can significantly shorten R&D cycles.

    To evaluate the practical application value of LLMs, four questions must be answered:

    1. Did it understand the business goals and immutable constraints?
    2. Did it make judgments based on logs, code, and runtime data?
    3. Does its proposed solution have clear implementation boundaries?
    4. After implementation, can the results be confirmed through repeatable experiments?

    Below, we introduce a practice method independent of specific models or platforms using a mobile room measurement tool and a mini-game as case studies.

    Case Study 1: Optimizing the Whole-House Drawing Flow in a Mobile Room Measurement Tool

    1. Define “Fast” Before Discussing Technical Solutions

    Imagine a mobile room measurement tool where users use depth-sensing devices to capture indoor spaces, generate 2D or 3D floor plans, supplement wall dimensions and photos, and export reports. When users complain that “large floor plans take too long,” developers might immediately think of optimizing recognition algorithms or rendering performance. But “slow” can occur in entirely different phases:

    • Prolonged collection time (related to route and operation prompts)
    • Waiting time (related to model processing and resource loading)
    • Editing time (related to dimension entry and photo binding)
    • Export time (related to image processing, file generation, or task scheduling)

    Therefore, “whole-house drawing time” should be defined as the total time from task start to obtaining a deliverable result that meets business requirements, not just a backend function’s execution time.

    Constraints must also be clear: Can the underlying recognition capability be adjusted? Are there hard limits on measurement error? Can exported content be reduced? Are offline scenarios mandatory? Without this information, models often propose technically sound but commercially unacceptable solutions.

    2. Use Timelines to Locate Bottlenecks, Not Intuition

    Establish event logging for the core flow:
    Task Start -> Space Collection -> Geometry Processing -> Drawing Preview -> Manual Correction -> Photo Sorting -> Report Export -> Task Complete

    Each event should log at least the task ID, start/end times, success/failure status, and necessary scene information. Scene information can include space scale groupings, room count, device capability groupings, and photo count, but should not default to logging full layouts or photo content.

    Total time can be broken down as follows:
    Total Time = Operation Time + System Wait Time + Rework Time

    These three components correspond to different optimization directions. Long operation time means you should check interaction steps; long wait time requires analyzing computation and resource scheduling; long rework time requires investigating recognition quality, state feedback, and error recovery mechanisms.

    Note that some tasks run in parallel; you cannot simply add all stage durations. Observe both the end-to-end time visible to users and the local durations of each stage to identify the critical path that actually affects completion time. If logs show geometry processing takes a small fraction, compressing it has a ceiling. It is more worthwhile to check for redundant confirmations, whether photo association interrupts collection, or whether users must wait for all processing to finish before viewing results.

    3. Have Models Output a “Hypothesis Checklist” Instead of Direct Code Changes

    Provide the model with sanitized logs, key flow code, business constraints, and acceptance criteria. Ask it to propose suggestions in a unified structure:

    • Problem Phenomenon: Where does the user encounter waiting or repetitive actions?
    • Evidence: Which logs, code paths, or state transitions does this correspond to?
    • Hypothesis: What mechanism might be causing the problem?
    • Modification: What is the minimum viable solution?
    • Risk: Does it affect accuracy, data consistency, or user rights?
    • Validation: How can the hypothesis be confirmed through experiments?

    For example, “show an editable basic drawing first, then gradually supplement non-critical content” is a candidate solution, but it must answer further questions: When is the basic drawing reliable? Will later updates overwrite user edits? How is content completeness ensured during export? Can background tasks resume if interrupted? These questions dictate whether the solution can be implemented, rather than just saying “adopt asynchronous processing.”

    4. Reduce Process Friction First, Then Handle High-Risk Reengineering

    Room measurement tools can usually evaluate optimization opportunities across three layers:

    • First Layer: Operation Path. Check for redundant entries, cross-page jumps, and unnecessary confirmation steps. Consider consolidating dimension entry, photo association, and drawing correction within the same context, but do not hide critical states or weaken error prompts just to reduce clicks.
    • Second Layer: Task Orchestration. Run independent processing tasks in parallel to avoid non-critical work blocking the main flow. Parallelism is not always better; mobile devices have limited CPU, memory, and power. Excessive concurrency can cause lag.
    • Third Layer: Computation and Rendering. Only invest higher costs in optimizing these after confirming they are on the critical path. Common checks include redundant geometric object construction, invalid redraws, frequent memory allocation, and large image processing. Specific measures must be based on measurement results.

    5. Acceptance Must Cover UX, Quality, and Business Rules

    Faster drawing doesn’t necessarily mean a better product. Acceptance should cover end-to-end completion time, task completion rate, manual correction count, export failure rate, and user evaluation of result usability.

    If the business restricts usage rights by project, export count, or other metrics, ensure that process changes haven’t altered counting triggers. For example, auto-pre-generating a report shouldn’t be mistakenly counted as a formal export, and failed retries shouldn’t cause double deductions. These issues are not mere performance defects but directly affect user trust. Model review shouldn’t be limited to algorithms and code but must cover state machines, permission boundaries, and failure recovery.

    Case Study 2: Validating Game Design via Simulation

    1. Rewrite “Feels Unbalanced” into Testable Hypotheses

    Common mini-game issues include certain strategies dominating long-term, obvious first-mover advantage, overly long matches, or resource growth rendering late-game choices meaningless.

    LLMs are suitable for assisting in organizing rules, analyzing potential feedback loops, and generating simulation logic. But they cannot prove game balance just by reading the rules.

    An effective task description should clarify: What phenomenon is considered abnormal? What factors might cause it? What results would be sufficient to support or reject the hypothesis?

    For example, you can ask: “Under identical decision strategies, does swapping turn order still produce a significant difference in win distribution?” This question is easier to execute and review than “help me balance the game.”

    2. Simulations Must Reuse Real Rules

    If a simulator reimplements a simplified set of rules, its results may deviate from the real game. A more robust approach is to separate rule calculations from UI representation, allowing both interactive play and batch simulation to share the same state transition logic.

    Simulation inputs should include rule configurations, initial states, decision strategies, and random seeds. Outputs should log wins/losses, match lengths, key resource changes, illegal states, and abnormal termination causes.

    Below is language-agnostic pseudocode:

    1. For each candidate rule configuration:
    2. For each test seed:
    3. Initialize match
    4. Run to completion or step limit using specified strategy
    5. Save win/loss, rounds, and exception info
    6. Aggregate results and compare with baseline config

    The step limit here prevents infinite loops; matches hitting the limit should not be arbitrarily counted as a win for either side. Abnormal samples need separate analysis.

    3. Many Simulations Do Not Mean Sufficient Evidence

    The value of batch matches lies not just in quantity but in sample coverage and experimental design.

    If all matches use the same simple strategy, even a large sample size only proves the rule’s behavior under that specific strategy. Different test strategies should be chosen based on game characteristics, such as random selection, short-term greedy choices, and counter-strategies against known advantages.

    When comparing different configurations, use the same set of random seeds to reduce interference from random condition differences. Simultaneously, record the uncertainty of win rates rather than treating a single statistical result as a definitive conclusion.

    It is also necessary to distinguish rule balance from player experience. Simulations can detect dominant strategies, infinite loops, and resource spirals, but they cannot fully replace real player feedback on comprehensibility, pacing, and fun.

    4. Separate Numerical Simulation from Rendering Tests

    Rule simulation focuses on whether state changes are correct; rendering tests focus on whether UI updates are smooth. The two are not interchangeable.

    Rendering tests should fix scene complexity, object count, interaction trajectories, and device conditions, then observe frame time distribution, long frame frequency, memory changes, and performance over sustained operation. Looking only at average frame rates might hide occasional stutters or ignore performance drops due to rising device temperatures.

    If a model suggests caching, batching, or lowering update frequency, require it to explain when the cache invalidates, how object lifecycles are managed, and whether visual quality changes. Optimization cannot come at the cost of introducing visual artifacts or resource leaks.

    Assign Models to Different Work Phases Instead of Pursuing a Single Ranking

    A single R&D task can be split into four phases: requirement sorting, solution design, code implementation, and independent review. Different phases require different capabilities, rarely handled entirely in one conversation.

    • Requirement Sorting: Asks the model to clarify goals, constraints, and missing scenarios.
    • Solution Design: Asks it to provide alternative paths and trade-off rationales.
    • Code Implementation: Emphasizes modification scope, test coverage, and rollbackability.
    • Independent Review: Actively seeks counterexamples, failure paths, and evidence gaps.

    Cross-review is valuable because it reduces the continuous self-reinforcement of a single thought process. Even using the same model, you can obtain more differentiated review results through independent contexts and different role requirements. However, multiple models reaching a consensus still doesn’t equal a correct conclusion; final judgment must return to runtime results and business acceptance.

    It is recommended to adopt the following closed loop:
    Define Goal -> Collect Evidence -> Form Hypothesis -> Minimal Modification -> Comparative Validation -> Independent Review -> Batch Release -> Continuous Observation

    Each step should leave traceable artifacts to avoid ending up with only a seemingly reasonable explanation.

    Establish Permission and Evidence Boundaries for Tool Execution

    An LLM proposing an experiment is not the same as it having executed the experiment. Results can only be called “tested” when there is an authorized execution environment, actual runtime logs, and inspectable artifacts.

    For conclusions like “test completed” or “no issues found,” you should further request the test scope, execution logs, raw results, and failure samples. Without these materials, treat the conclusions as unverified judgments.

    Engineering environments should also follow the principle of least privilege: default to read-only code access, restrict write operations to isolated branches or directories, use temporary environments for running tests, keep production credentials, user photos, and complete layout data out of irrelevant contexts, and require mandatory human confirmation for actions involving publishing, deleting, or modifying online data.

    Calling costs should also be evaluated. Rather than repeatedly submitting the entire project, it is better to locate relevant modules first, provide necessary context, and supplement gradually based on evidence gaps. This reduces invalid processing and helps control the exposure scope of sensitive information.

    How to Judge if This Method is Worth Continuing

    Teams should not just count how much code a model generated, but evaluate whether it lowered problem location costs, reduced rework, and improved validation efficiency.

    You can choose a well-bounded pilot task: determine the baseline performance of the existing process, list quality floors, limit modification scope, and then record manual effort, tool execution costs, and rollback situations. Test scenarios should cover common cases and high-risk boundaries, avoiding only picking the easiest samples to succeed.

    If the task ultimately still requires massive manual fixes, analyze whether the root cause is insufficient context, wrong solutions, missing execution environments, or unclear acceptance criteria, rather than simply concluding that “the model isn’t strong enough.”

    The most reliable way to apply LLMs is to assign them divisible, auditable, and verifiable R&D tasks: helping developers find what to measure faster, construct more complete experiments, and discover easily missed failure paths. They can accelerate engineering judgment, but they cannot replace evidence. What is truly worth reusing is not a brilliant answer, but a workflow that can consistently produce trustworthy results.