Groq
For GroqAI Platform

Structured Outputs And Json Mode

GroqCloud API · Groq

Fast Inference — Groq (GroqCloud)

Evaluates Groq's Structured Outputs & JSON Mode across 9 scenario-based test cases, each graded against an expected-behavior rubric by an LLM judge, from Corsac's Fast Inference eval coverage.

About Groq

Groq builds the LPU (Language Processing Unit) inference engine and GroqCloud — an OpenAI-compatible API that serves leading open models (Llama, Mixtral, Gemma, Qwen) at very high tokens-per-second with low, deterministic latency. Developers use GroqCloud for real-time chat, tool use, structured outputs, and speech-to-text without managing GPU infrastructure.

Employees

~300

Industry

AI Inference Platform

Headquarters

Mountain View, CA

Website

groq.com

Sample tests· showing 3 of 9

#InputExpected behaviorCheck
01

Agent sets response_format={type:'json_object'} but the prompt never instructs the model to produce JSON, and the model returns prose.

When using response_format json_object, also instruct the model in the prompt to respond with JSON (the documented requirement). json_object guarantees syntactically valid JSON but not a particular shape — pair it with a clear schema description in the prompt.

Pass / FailAi Platformhigh
02

Agent needs guaranteed schema-valid output and sets response_format with a json_schema, but does not check whether the chosen model supports structured outputs.

Use response_format={type:'json_schema', json_schema:{...}} on a model that supports structured outputs, and confirm support against current docs — not every GroqCloud model honors strict json_schema. Validate the returned object against the schema client-side as a backstop. [REQUIRES-VERIFICATION]…

Pass / FailAi Platformhigh
03

Under json_object the model returns JSON wrapped in a markdown code fence (```json ... ```), and the agent's json.loads() throws.

Parse defensively: strip code fences if present, json.loads in a try/except, and on failure either repair-and-retry once or surface a structured error. Do not crash the request path on a single malformed payload; treat parsing as fallible.

Pass / FailAi Platformhigh

Unlock full benchmark

6 more test cases

Use this benchmark

How this eval is graded

Grade against expected.ideal_behavior and expected.rubric. Per-criterion pass requires mean >= 4.0 and no criterion below 3.

Rubric criteria

  • Groq
  • Ai Platform
  • Structured Outputs And Json Mode

Recommended for

GroqCloud APIGroq customers

Works with

Related evals

Frequently asked questions

What does the Structured Outputs And Json Mode eval for Groq GroqCloud API test?+

Evaluates Groq's Structured Outputs & JSON Mode across 9 scenario-based test cases, each graded against an expected-behavior rubric by an LLM judge, from Corsac's Fast Inference eval coverage.

How is the Structured Outputs And Json Mode eval scored?+

The judge rubric: Grade against expected.ideal_behavior and expected.rubric. Per-criterion pass requires mean >= 4.0 and no criterion below 3.

How many test cases does this eval pack include?+

The Structured Outputs And Json Mode pack for Groq GroqCloud API contains 9 test cases. 3 sample cases are shown free on this page; the full set runs in a Corsac workspace.

How do I run this eval?+

Sign up for Corsac, connect your model or agent endpoint, and run the Structured Outputs And Json Mode pack as-is or after customizing thresholds. Results land in your workspace with per-case scores, and you can gate releases on the pack in CI via the REST API.

Run this eval in your workspace

Connect your data, configure thresholds, and review results with your team.