LLM Spatial Reasoning: Evaluation Through Parametric 3D Modeling

    Parametric 3D generation provides a practical way to evaluate whether large language models understand spatial relationships rather than merely produce plausible images. This article explains how to design constraint-rich scenes, organize global and derived parameters, test mechanical and geometric dependencies, and automate validation. It also outlines common failure modes and evaluation metrics for reproducible, auditable model assessment.

    1. Evaluation Background: From Images to Verifiable Spatial Structures

    As multimodal large language models and code generation capabilities advance, model evaluation is moving beyond text-based question answering toward more complex spatial reasoning tasks. Spatial reasoning requires more than describing a scene: a model must understand relative positions, motion, constraints, and dependencies between parameters.

    A scene featuring a pelican riding a bicycle may appear primarily artistic, but it contains many verifiable geometric relationships. Does the handlebar width accommodate the bird’s wingspan? Do the pedal positions match the crank phase? Does the chain follow a reasonably tensioned path? Is the rear wheel driven by the drivetrain? Does the bird’s posture correspond to the current motion phase?

    These tasks turn the question “Does the model understand space?” into “Can the model generate a runnable, inspectable, and reproducible 3D structure?” Compared with judging visual appearance alone, parametric 3D evaluation is closer to engineering practice. A natural-language specification becomes an executable script, which generates a 3D scene. Parameter changes and automated checks then reveal whether the model has established causal dependencies or merely assembled static geometry.

    Evaluation should therefore focus on three capabilities:

    1. Translating natural-language requirements into structured parameters.
    2. Making geometry generation depend on those parameters.
    3. Preserving correct spatial relationships when the parameters change.

    Together, these capabilities form the core of spatial reasoning in this setting.

    2. Scene Design: Using Complex Constraints to Reveal Model Capabilities

    An effective evaluation scene should combine narrative context, mechanical structure, and parameter dependencies. Consider the following example:

    At dusk on a coastal promenade, a pelican rides a dark-green, steel-frame bicycle. Its body leans forward, and both wings extend to grip the handlebars. One webbed foot rests on a pedal, while the other hangs clear at the lowest point of its return motion. The bicycle has a classic diamond frame, a canvas tool bag attached to the down tube, and a fishing net secured to the rear rack. Stylization is allowed, but the spatial relationships between components must remain testable through parameters.

    This scene combines anatomy, mechanical geometry, and motion phase. A model that generates only a static assembly may overlook the drivetrain relationships among the crank, pedals, chain, and rear wheel. A model without a coherent parameter structure may hard-code handlebar width, wheelbase, and tooth counts. Weak spatial constraint handling can produce chain intersections, misplaced pedals, or feet that do not touch the pedals.

    Multiple candidate models can generate scripts from the same prompt, with those scripts executed in batches in a headless environment. The objective is not simply to determine which model produces the most attractive scene. It is to compare constraint satisfaction, parameter propagation, and error recovery.

    Using the same input, execution environment, and validation script helps convert subjective impressions into objective measurements.

    3. Parametric Modeling: Driving Geometry with Global Constants

    The organization of parameters is an early indicator of output quality. A script should define global constants at the top, with geometry derived from those constants. Functions should not contain unexplained magic numbers disconnected from the global parameter system.

    An illustrative parameter block is:

    1. PELICAN_WINGSPAN = 1.15
    2. BICYCLE_WHEELBASE = 1.02
    3. BICYCLE_CHAINRING_TEETH = 44
    4. BICYCLE_COG_TEETH = 16
    5. BICYCLE_CRANK_PHASE = 35.0

    These parameters control different subsystems:

    • Wingspan influences handlebar width and grip spacing.
    • Wheelbase drives bicycle frame geometry.
    • Chainring and rear cog tooth counts determine the drivetrain ratio and influence the chain path.
    • Crank phase determines pedal positions and, in turn, the pelican’s foot-to-pedal contact.

    Engineering-quality scripts should also include a layer of named derived values. Handlebar width, for example, should not simply equal wingspan. It should be derived using wingspan, grip radius, and clearance requirements.

    Likewise, chain length should not be assigned manually. It should be calculated from chainring and rear cog geometry, wheelbase, and sprocket center distance. Derived values need clear names rather than scattered numerical literals.

    This structure allows an evaluator to change only the top-level parameters and regenerate the entire model without local misalignment.

    4. Critical Dependencies: The Difference Between Writing Code and Building a Model

    The central question in parametric evaluation is whether the model understands how parameters affect one another. Four dependencies are especially important.

    Wingspan and Handlebars

    When wingspan increases, handlebar width and grip positions should change accordingly. The grips must still accommodate the ends of both wings.

    If wingspan affects only the bird’s body scale and does not propagate to the handlebar system, the parameter dependency is broken.

    Wheelbase and Frame Geometry

    Changing wheelbase changes the distance between the front and rear wheel centers. That adjustment must propagate to the main frame tubes, diagonal members, and rear stays.

    A valid model should retain a connected frame without detached components or unintended intersections.

    Tooth Counts and Chain Geometry

    Changing chainring tooth count changes its radius, which affects the chain’s wrapping path. The chain must be recalculated so that it neither penetrates the chainring or rear cog nor becomes a disconnected, floating polyline.

    The drivetrain ratio must also be derived again from the chainring and rear cog tooth counts.

    Crank Phase and Foot Contact

    Changing crank phase changes pedal positions. The foot pressing on a pedal must remain in contact with its surface, while the other foot remains suspended in the low return position specified by the scene.

    If the script rotates the crank without updating the feet, its spatial reasoning is still limited to placing separate components rather than maintaining their relationships.

    5. Automated Validation: Turning Spatial Relationships into Measurable Checks

    Evaluation should not rely solely on visual inspection. An automated validation process can load the generated scene after execution and perform geometric checks on key objects.

    Common checks include:

    1. Bounding-box checks: Verify that overall dimensions, such as handlebar width, wheelbase, and wheel diameter, fall within expected ranges.
    2. Contact-distance checks: Calculate the minimum distance between a webbed foot and the pedal surface, then compare it with a contact tolerance.
    3. Chain-path checks: Sample the chain curve and detect unintended intersections with sprocket geometry.
    4. Phase-consistency checks: Calculate expected pedal coordinates from crank phase and verify that foot positions match.
    5. Parameter-sensitivity checks: Modify top-level constants, rerun the script, and check whether dependent objects change as expected.

    Illustrative validation logic is:

    1. if abs(foot_to_pedal_distance) > CONTACT_TOLERANCE:
    2. fail("Foot is not in contact with the pedal")
    3. if chain_intersects_chainring():
    4. fail("Chain intersects the chainring")
    5. if handlebar_width_not_derived_from_wingspan():
    6. fail("Handlebar width is not linked to wingspan")

    This approach turns a generated scene from a visual artifact into a testable engineering artifact. Results can be expressed as test pass rates, spatial constraint satisfaction rates, parameter dependency success rates, and execution success rates.

    6. Common Failure Modes and Improvements

    Several failure modes frequently appear in this type of evaluation.

    Static Assembly

    The model generates a pelican, bicycle, and pedals, but does not establish drivetrain or motion dependencies. Changing crank phase has no effect on foot position.

    Hard-Coded Geometry

    Dimensions are fixed throughout the script. Top-level parameters exist, but changing them does not propagate through the scene.

    Missing Constraints

    The model prioritizes appearance while overlooking required relationships such as chain tension, foot contact, and grips that accommodate the wing tips.

    Unstable Execution

    The script runs under default parameters but produces exceptions, empty objects, or intersecting geometry after parameters change.

    Prompts should address these weaknesses with explicit engineering requirements:

    • Specify that the deliverable is an executable script, not a conceptual description.
    • List the required global parameters and acceptance conditions.
    • Require all geometry to be derived from parameters, with no unexplained magic numbers.
    • Request self-checking logic that reports key object dimensions, contact distances, and chain-path samples.

    These checks help the model expose how its generated geometry relates to the specification, rather than merely produce a scene.

    A complete evaluation framework can use five categories of metrics.

    1. Execution success rate: Does the script run without errors in a batch environment?
    2. Parameter dependency success rate: When a parameter changes, do the relevant objects update as expected?
    3. Spatial constraint satisfaction rate: Are contact, enclosure, intersection, and phase-consistency requirements satisfied?
    4. Structural complexity: Does the script establish appropriate hierarchies and derived relationships, rather than simply duplicate geometry?
    5. Explainability: Do names, comments, and self-check outputs make parameter origins and dependencies clear?

    These metrics provide a more stable basis for comparison than visual output alone and are better suited to engineering teams.

    For enterprise applications, spatial reasoning ultimately supports automated modeling, simulation validation, digital twins, and intelligent generation. Evaluation should therefore emphasize reproducibility, auditability, and extensibility.

    8. Conclusion

    Parametric 3D generation is a useful test of large language models’ spatial reasoning. It requires models to do more than understand natural language: they must translate requirements into parameters, constraints, and executable logic.

    Global constants, derived geometry, dependency checks, and automated validation turn an ambiguous sense of spatial plausibility into measurable engineering criteria. Developers and enterprise users can apply this approach not only to model evaluation, but also to automated modeling, intelligent generation, and quality validation.

    A capable model should produce more than a plausible-looking image. It should generate spatial structures that respond correctly to parameters, withstand rule-based checks, and remain reusable in engineering workflows.