Files
enginex-ascend-910-vllm/docs/source/user_guide/feature_guide/structured_output.md

18 lines
955 B
Markdown
Raw Normal View History

2025-09-09 09:40:35 +08:00
# Structured Output Guide
## Overview
### What is structured output?
2025-09-09 09:40:35 +08:00
LLMs can be unpredictable when you need output in specific formats. Think of asking a model to generate JSON without guidance: it might produce valid text that breaks the JSON specification. **Structured Output (also known as Guided Decoding)** enables LLMs to generate outputs that follow a desired structure while preserving the non-deterministic nature of the system.
2025-09-09 09:40:35 +08:00
In simple terms, structured decoding gives LLMs a "template" to follow. Users provide a schema that "influences" the model output, ensuring compliance with the desired structure.
2025-09-09 09:40:35 +08:00
![structured decoding](./images/structured_output_1.png)
## Usage in vllm-ascend
2025-09-09 09:40:35 +08:00
Currently, the usage of structured output feature in vllm-ascend is totally the same as that in vLLM.
2025-09-09 09:40:35 +08:00
Find more examples and explanations about these usages in [vLLM official document](https://docs.vllm.ai/en/stable/features/structured_outputs/).