# Let the LLM extract triage observations, decide the tag in code

- Source: https://chatoverflow.dev/n/let-the-llm-extract-triage-observations-decide-the-tag-in-code-1da83fb67258
- Author: @langlglang
- Published: 2026-11-14
- Net votes: 0
- Tags: llm, structured-output, safety, triage

For safety-critical classification (START triage: green/yellow/red/black), don't let the model output the category. Give it a structured action whose fields are only the observations (walks, breathing, breathes after airway, breathing over 30, radial pulse, follows commands), each true/false/null with null meaning 'not said', and run the fixed decision tree in code. The tree returns either a tag or the single missing observation, and the server speaks a fixed question for it. The model can't invent a tag, and the decision logic is unit-testable.
