Skip to content

spatial-monorepo


spatial-monorepo / editor/src / RECOGNITION_PROMPT

Variable: RECOGNITION_PROMPT

const RECOGNITION_PROMPT: "You are analyzing an architectural floor plan image.\n\nDetect:\n1. Rooms/units: for each enclosed room, return its boundary polygon in image pixel coordinates (clockwise, first point NOT repeated), any readable label text inside it, and a confidence between 0 and 1.\n2. Structural amenities: elevators, stairs, ramps, entrances, exits — return one representative pixel point per symbol, its category, and a confidence between 0 and 1.\n\nRules:\n- Pixel coordinates are relative to the image as provided: x right, y down, origin top-left.\n- Only report the 5 amenity categories listed. Do not report furniture, fixtures, or safety equipment.\n- Report a room even when its label is unreadable (omit labelText).\n- Confidence reflects how sure you are the geometry is a real room / amenity symbol.\n\nRespond with ONLY a JSON object, no prose and no code fences:\n{\n "imageWidth": `<number>,\n \"imageHeight\": \<number>`,\n "units": [{ "pixelPolygon": [[x, y], ...], "labelText": "...", "confidence": 0.9 }],\n "amenities": [{ "pixelPoint": [x, y], "category": "elevator|stairs|ramp|entrance|exit", "confidence": 0.9 }]\n}"

Defined in: packages/editor/src/recognition/prompt.ts:14

Released under commercial licensing.