Docs
Workflows
Instructor

Instructor

Supplies the input prompt to an LLM and structures the response to match the output schema

Input Parameters

  • Prompt Template: An effective prompt designed to use JavaScript variables from the workflow to achieve the best JSON output.
  • Generative Model Name: Choose LLM from your activated models to use for the query
  • Output Schema (Zod JSON): Structure the desired output using Zod JSON

Expected Output

A JavaScript variable defined by the output schema

Example Use Case

In this recipe generation workflow, the input parameters are given to an instructor node named “CookingDetails” which tells the model, in this case GPT-4o, to generate the details for a recipe and structure the output as the JSON output schema requires.

Workflow View

Sample Prompt

Was this page useful?

Questions? We're here to help

Subscribe to updates