Who it is forA data or backend engineer whose pipeline needs machine-readable fields from an LLM, not free text.
The problemFree-form model replies break parsers, so each extraction job needs fragile post-processing.
The outcomeModel responses that follow a requested structure, ready for direct parsing.
What you need first
- Python with uv or pip installed
- A supported NVIDIA, AMD or Intel GPU, or an x86, ARM or PowerPC CPU
- A Hugging Face model you are allowed to download and use
Steps
- Install vLLM with
uv pip install vllm. - Start a served model with
vllm serve <model-id>, as described in the Quickstart. (inferred, check the README) - Enable structured output using the xgrammar or guidance backend as described in the official documentation. (inferred, check the README)
- Send a request that includes your JSON schema and a sample input.
- Parse the reply with a JSON parser and check that every required field is present.
Prompt for your agent
Using the vllm-project/vllm repo, set up a served model <model-id> with structured output enabled. Send the sample input <sample-text> with a JSON schema and return the parsed object. Verify that the output parses as JSON and contains every required field.
Caveat. The README names xgrammar and guidance but does not show how to enable them, so the exact option must come from the official docs.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for vllm-project/vllm and "Get structured JSON output from a self-hosted model"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer