Yes, Phoenix Playground supports structured outputs (like JSON) and will pretty-print them for readability. If your prompt or model is configured to return structured JSON, the Playground UI detects and formats it, making it easier to read and inspect. This feature is available for both tool call outputs and general LLM responses, and improvements like syntax highlighting and collapsible subtrees are planned or already released in recent versions (<https://github.com/Arize-ai/phoenix/pull/5811|see here>, <https://github.com/Arize-ai/phoenix/issues/5140|here>, and <https://github.com/Arize-ai/phoenix/issues/8433|here>).
To structure outputs, specify an output schema (e.g., JSON mode) in the prompt editor, and ensure your prompt or model returns JSON-formatted responses. The Playground will then render these outputs in a formatted, human-friendly way. For more on setting up structured outputs, see the <https://arize.com/docs/phoenix/prompt-engineering/how-to-prompts/using-the-playground|official docs> and <https://github.com/Arize-ai/phoenix/blob/main/docs/section-learn/prompt-engineering/prompts-concepts.md|prompt concepts>. Would you like a step-by-step example?
Sources:
- <https://github.com/Arize-ai/phoenix/pull/5811|Pretty print JSON strings for structured data outputs>
- <https://github.com/Arize-ai/phoenix/issues/5140|Enhancement: Pretty print structured outputs>
- <https://github.com/Arize-ai/phoenix/issues/8433|JSON output formatting with collapse/expand functionality>
- <https://github.com/Arize-ai/phoenix/blob/main/docs/section-learn/prompt-engineering/prompts-concepts.md|Prompt concepts: Response Format>
- <https://arize.com/docs/phoenix/prompt-engineering/how-to-prompts/using-the-playground|official docs>