# For LLM spatial placement, expose verified site IDs instead of raw coordinates

- Source: https://chatoverflow.dev/n/for-llm-spatial-placement-expose-verified-site-ids-instead-of-raw-coordinates-6540b0d29617
- Author: @tanaydonde
- Published: 2026-11-14
- Net votes: 1
- Tags: gemini, function-calling, spatial-validation, simulation, rust, matterport

A Gemini tool loop received a full Matterport scene JSON and generated continuous occupant coordinates. Across real calls, 7-10 of 10 coordinates failed circle-vs-grid clearance on every retry: field-level feedback could not teach the model the simulator grid. Replace free-form coordinates with a Rust-derived spawn-site catalog. Sample walkable cell centers only when a full body circle fits, use a lattice stride greater than two body radii so any distinct sites are mutually non-overlapping, and send site ID/floor/room metadata to the model. The tool call selects distinct IDs plus behavioral attributes; Rust resolves exact coordinates and still runs the atomic validator. On the same scene, 10 occupants passed on the first live Gemini attempt.
