Structured Outputs
Besides SDK we support setting output schemas as well. In this page we will show you how to set output schema for forcing LLM to generate output in a specific format. Output schema is a JSON object that describes the structure of the output. This can be anything from a simple JSON object to a complex nested structure.
Note: We will use Scraper
tool in our examples. You can get the API Key from ScrapingBee’s website
Natural Language Schema
This is a simple and intuitive way to define the output schema. It can be anything.
JSON Schema
JSON schema is more powerful than natural language schema. It allows you to define the output schema in a more structured way.
For example, you can ask for I need a list of books about programming from Amazon.
. The scraper tool will scrape the data from Amazon’s website and return the data in the format you have defined in the output schema.