---
sidebar_position: 3
keywords: [structured output, json, information extraction, with_structured_output]
---
# How to return structured data from a model

> This guide assumes familiarity with the following concepts:
> - [Chat models](/docs/concepts/#chat-models)
> - [Function/tool calling](/docs/concepts/#functiontool-calling)


It is often useful to have a model return output that matches a specific schema. One common use-case is extracting data from text to insert into a database or use with some other downstream system. This guide covers a few strategies for getting structured outputs from a model.


