How it works
Flip Response Format from Default to JSON on the prompt template.
Assign an Object-based Lightning type that declares the return fields — String, Boolean, Integer, Date, DateTime.
The platform enforces the shape. No prompt gymnastics, no stripping Markdown fences.