{ "cells": [ { "cell_type": "markdown", "id": "5c4d8348", "metadata": {}, "source": [ "Define our prompt" ] }, { "cell_type": "code", "execution_count": 2, "id": "346e1b5c", "metadata": {}, "outputs": [], "source": [ "prompt = \"\"\"\n", "Generate a dataset of fake user orders. Each row of the dataset should be valid. The format should not be a list, it should be a JSON object.\n", "${gr.complete_xml_suffix}\n", "\n", "an example of output may look like this:\n", "{\n", "\t\"user_orders\": [{ │ │\n", " \"user_id\": 1,\n", " \"user_name\": \"John Mcdonald\",\n", " \t\"num_orders\": 6\n", " }]\n", "}\n", "\n", "\"\"\"" ] }, { "cell_type": "markdown", "id": "3b9f4250", "metadata": {}, "source": [ "Install validators" ] }, { "cell_type": "code", "execution_count": 8, "id": "6a7c7d4a", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Installing hub:\u001b[35m/\u001b[0m\u001b[35m/guardrails/\u001b[0m\u001b[95mvalid_length...\u001b[0m\n", "✅Successfully installed guardrails/valid_length!\n", "\n", "\n", "Installing hub:\u001b[35m/\u001b[0m\u001b[35m/guardrails/\u001b[0m\u001b[95mtwo_words...\u001b[0m\n", "✅Successfully installed guardrails/two_words!\n", "\n", "\n", "Installing hub:\u001b[35m/\u001b[0m\u001b[35m/guardrails/\u001b[0m\u001b[95mvalid_range...\u001b[0m\n", "✅Successfully installed guardrails/valid_range!\n", "\n", "\n" ] } ], "source": [ "!guardrails hub install hub://guardrails/valid_length --quiet\n", "!guardrails hub install hub://guardrails/two_words --quiet\n", "!guardrails hub install hub://guardrails/valid_range --quiet\n", "!pip install cohere --quiet" ] }, { "cell_type": "markdown", "id": "72d3938a", "metadata": {}, "source": [ "Defined what our data should look like in pydantic\n", "\n", "Note: 1-indexed is an example of passing non-validator instructions on a per field level via the `format` field.\n", "It will throw a validator warning and is to be expected." ] }, { "cell_type": "code", "execution_count": 3, "id": "3088fd99", "metadata": {}, "outputs": [], "source": [ "from pydantic import BaseModel, Field\n", "from guardrails.hub import ValidLength, TwoWords, ValidRange\n", "from typing import List\n", "\n", "\n", "class Order(BaseModel):\n", " user_id: int = Field(\n", " description=\"The user's id.\", validators=[(\"1-indexed\", \"noop\")]\n", " )\n", " user_name: str = Field(\n", " description=\"The user's first name and last name\",\n", " validators=[TwoWords(on_fail=\"noop\")],\n", " )\n", "\n", " num_orders: int = Field(\n", " description=\"The number of orders the user has placed\",\n", " validators=[ValidRange(0, 50, on_fail=\"noop\")],\n", " )\n", "\n", "\n", "class Orders(BaseModel):\n", " user_orders: List[Order] = Field(\n", " description=\"Generate a list of users and how many orders they have placed in the past.\",\n", " validators=[ValidLength(10, 10, on_fail=\"noop\")],\n", " )" ] }, { "cell_type": "markdown", "id": "75b52529", "metadata": {}, "source": [ "Set up the cohere client. In this notebook, we use an environment variable to pass the cohere API key through" ] }, { "cell_type": "code", "execution_count": 5, "id": "840006ca-21ca-4f76-9ce1-e406d5d68412", "metadata": {}, "outputs": [], "source": [ "# Add your OPENAI_API_KEY as an environment variable if it's not already set\n", "# import os\n", "# os.environ[\"COHERE_API_KEY\"] = \"YOUR_COHERE_API_KEY\"" ] }, { "cell_type": "markdown", "id": "38bd3386", "metadata": {}, "source": [ "Create the guard and prompt" ] }, { "cell_type": "code", "execution_count": null, "id": "42766922-14d0-4b5e-853a-23f05b896a09", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/Users/dtam/dev/guardrails/guardrails/validator_base.py:590: UserWarning: Validator with id 1-indexed was not found in the registry! Ignoring...\n", " warn(f\"Validator with id {name} was not found in the registry! Ignoring...\")\n", "WARNING:guardrails-ai:Validator with id 1-indexed was not found in the registry! Ignoring...\n", "WARNING:guardrails-ai:Invalid arguments! ('1-indexed', 'noop')\n", "/Users/dtam/dev/guardrails/guardrails/validator_service/__init__.py:85: UserWarning: Could not obtain an event loop. Falling back to synchronous validation.\n", " warnings.warn(\n" ] } ], "source": [ "from rich import print\n", "import guardrails as gd\n", "\n", "guard = gd.Guard.for_pydantic(output_class=Orders)\n", "\n", "raw_llm_response, validated_response, *rest = guard(\n", " messages=[{\"role\": \"user\", \"content\": prompt}],\n", " model=\"command-r-08-2024\",\n", " max_tokens=1024,\n", " temperature=0.3,\n", ")" ] }, { "cell_type": "markdown", "id": "368f39df", "metadata": {}, "source": [ "By printing the guard's state, we can see the final, validated output, as well as the steps guardrails took to ensure structure." ] }, { "cell_type": "code", "execution_count": 7, "id": "0e910d87", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
Logs\n",
"└── ╭────────────────────────────────────────────────── Step 0 ───────────────────────────────────────────────────╮\n",
" │ ╭─────────────────────────────────────────────── Messages ────────────────────────────────────────────────╮ │\n",
" │ │ ┏━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ │ │\n",
" │ │ ┃ Role ┃ Content ┃ │ │\n",
" │ │ ┡━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩ │ │\n",
" │ │ │ user │ │ │ │\n",
" │ │ │ │ Generate a dataset of fake user orders. Each row of the dataset should be valid. The format │ │ │\n",
" │ │ │ │ should not be a list, it should be a JSON object. │ │ │\n",
" │ │ │ │ │ │ │\n",
" │ │ │ │ Given below is XML that describes the information to extract from this document and the tags │ │ │\n",
" │ │ │ │ to extract it into. │ │ │\n",
" │ │ │ │ │ │ │\n",
" │ │ │ │ <output> │ │ │\n",
" │ │ │ │ <list description=\"Generate a list of users and how many orders they have placed in the │ │ │\n",
" │ │ │ │ past.\" format=\"guardrails/valid_length: 10 10\" name=\"user_orders\" required=\"true\"> │ │ │\n",
" │ │ │ │ <object format=\"guardrails/valid_length: 10 10\" required=\"true\"> │ │ │\n",
" │ │ │ │ <integer description=\"The user's id.\" name=\"user_id\" required=\"true\"></integer> │ │ │\n",
" │ │ │ │ <string description=\"The user's first name and last name\" │ │ │\n",
" │ │ │ │ format=\"guardrails/two_words\" name=\"user_name\" required=\"true\"></string> │ │ │\n",
" │ │ │ │ <integer description=\"The number of orders the user has placed\" │ │ │\n",
" │ │ │ │ format=\"guardrails/valid_range: 0 50\" name=\"num_orders\" required=\"true\"></integer> │ │ │\n",
" │ │ │ │ </object> │ │ │\n",
" │ │ │ │ </list> │ │ │\n",
" │ │ │ │ </output> │ │ │\n",
" │ │ │ │ │ │ │\n",
" │ │ │ │ ONLY return a valid JSON object (no other text is necessary), where the key of the field in │ │ │\n",
" │ │ │ │ JSON is the `name` attribute of the corresponding XML, and the value is of the type │ │ │\n",
" │ │ │ │ specified by the corresponding XML's tag. The JSON MUST conform to the XML format, including │ │ │\n",
" │ │ │ │ any types and format requests e.g. requests for lists, objects and specific types. Be │ │ │\n",
" │ │ │ │ correct and concise. If you are unsure anywhere, enter `null`. │ │ │\n",
" │ │ │ │ │ │ │\n",
" │ │ │ │ Here are examples of simple (XML, JSON) pairs that show the expected behavior: │ │ │\n",
" │ │ │ │ - `<string name='foo' format='two-words lower-case' />` => `{'foo': 'example one'}` │ │ │\n",
" │ │ │ │ - `<list name='bar'><string format='upper-case' /></list>` => `{\"bar\": ['STRING ONE', │ │ │\n",
" │ │ │ │ 'STRING TWO', etc.]}` │ │ │\n",
" │ │ │ │ - `<object name='baz'><string name=\"foo\" format=\"capitalize two-words\" /><integer │ │ │\n",
" │ │ │ │ name=\"index\" format=\"1-indexed\" /></object>` => `{'baz': {'foo': 'Some String', 'index': │ │ │\n",
" │ │ │ │ 1}}` │ │ │\n",
" │ │ │ │ │ │ │\n",
" │ │ │ │ │ │ │\n",
" │ │ │ │ an example of output may look like this: │ │ │\n",
" │ │ │ │ { │ │ │\n",
" │ │ │ │ \"user_orders\": [{ │ │ │\n",
" │ │ │ │ │ │ │ │ │\n",
" │ │ │ │ \"user_id\": 1, │ │ │\n",
" │ │ │ │ \"user_name\": \"John Mcdonald\", │ │ │\n",
" │ │ │ │ \"num_orders\": 6 │ │ │\n",
" │ │ │ │ }] │ │ │\n",
" │ │ │ │ } │ │ │\n",
" │ │ │ │ │ │ │\n",
" │ │ │ │ │ │ │\n",
" │ │ └──────┴──────────────────────────────────────────────────────────────────────────────────────────────┘ │ │\n",
" │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │\n",
" │ ╭──────────────────────────────────────────── Raw LLM Output ─────────────────────────────────────────────╮ │\n",
" │ │ { │ │\n",
" │ │ \"user_orders\": [ │ │\n",
" │ │ { │ │\n",
" │ │ \"user_id\": 2, │ │\n",
" │ │ \"user_name\": \"Jane Smith\", │ │\n",
" │ │ \"num_orders\": 12 │ │\n",
" │ │ }, │ │\n",
" │ │ { │ │\n",
" │ │ \"user_id\": 5, │ │\n",
" │ │ \"user_name\": \"Michael Jones\", │ │\n",
" │ │ \"num_orders\": 18 │ │\n",
" │ │ }, │ │\n",
" │ │ { │ │\n",
" │ │ \"user_id\": 10, │ │\n",
" │ │ \"user_name\": \"Mary Sue\", │ │\n",
" │ │ \"num_orders\": 9 │ │\n",
" │ │ }, │ │\n",
" │ │ { │ │\n",
" │ │ \"user_id\": 3, │ │\n",
" │ │ \"user_name\": \"David Miller\", │ │\n",
" │ │ \"num_orders\": 7 │ │\n",
" │ │ }, │ │\n",
" │ │ { │ │\n",
" │ │ \"user_id\": 15, │ │\n",
" │ │ \"user_name\": \"Eva Gonzalez\", │ │\n",
" │ │ \"num_orders\": 15 │ │\n",
" │ │ }, │ │\n",
" │ │ { │ │\n",
" │ │ \"user_id\": 8, │ │\n",
" │ │ \"user_name\": \"William Martinez\", │ │\n",
" │ │ \"num_orders\": 1 │ │\n",
" │ │ }, │ │\n",
" │ │ { │ │\n",
" │ │ \"user_id\": 12, │ │\n",
" │ │ \"user_name\": \"Sophia Lee\", │ │\n",
" │ │ \"num_orders\": 10 │ │\n",
" │ │ }, │ │\n",
" │ │ { │ │\n",
" │ │ \"user_id\": 6, │ │\n",
" │ │ \"user_name\": \"Robert Wilson\", │ │\n",
" │ │ \"num_orders\": 22 │ │\n",
" │ │ }, │ │\n",
" │ │ { │ │\n",
" │ │ \"user_id\": 18, │ │\n",
" │ │ \"user_name\": \"Albert Taylor\", │ │\n",
" │ │ \"num_orders\": 3 │ │\n",
" │ │ }, │ │\n",
" │ │ { │ │\n",
" │ │ \"user_id\": 14, │ │\n",
" │ │ \"user_name\": \"Olivia Davis\", │ │\n",
" │ │ \"num_orders\": 17 │ │\n",
" │ │ }, │ │\n",
" │ │ { │ │\n",
" │ │ \"user_id\": 17, │ │\n",
" │ │ \"user_name\": \"Jonathan Smith\", │ │\n",
" │ │ \"num_orders\": 5 │ │\n",
" │ │ } │ │\n",
" │ │ ] │ │\n",
" │ │ } │ │\n",
" │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │\n",
" │ ╭─────────────────────────────────────────── Validated Output ────────────────────────────────────────────╮ │\n",
" │ │ { │ │\n",
" │ │ 'user_orders': [ │ │\n",
" │ │ {'user_id': 2, 'user_name': 'Jane Smith', 'num_orders': 12}, │ │\n",
" │ │ {'user_id': 5, 'user_name': 'Michael Jones', 'num_orders': 18}, │ │\n",
" │ │ {'user_id': 10, 'user_name': 'Mary Sue', 'num_orders': 9}, │ │\n",
" │ │ {'user_id': 3, 'user_name': 'David Miller', 'num_orders': 7}, │ │\n",
" │ │ {'user_id': 15, 'user_name': 'Eva Gonzalez', 'num_orders': 15}, │ │\n",
" │ │ {'user_id': 8, 'user_name': 'William Martinez', 'num_orders': 1}, │ │\n",
" │ │ {'user_id': 12, 'user_name': 'Sophia Lee', 'num_orders': 10}, │ │\n",
" │ │ {'user_id': 6, 'user_name': 'Robert Wilson', 'num_orders': 22}, │ │\n",
" │ │ {'user_id': 18, 'user_name': 'Albert Taylor', 'num_orders': 3}, │ │\n",
" │ │ {'user_id': 14, 'user_name': 'Olivia Davis', 'num_orders': 17}, │ │\n",
" │ │ {'user_id': 17, 'user_name': 'Jonathan Smith', 'num_orders': 5} │ │\n",
" │ │ ] │ │\n",
" │ │ } │ │\n",
" │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │\n",
" ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────╯\n",
"\n"
],
"text/plain": [
"Logs\n",
"└── ╭────────────────────────────────────────────────── Step 0 ───────────────────────────────────────────────────╮\n",
" │ \u001b[48;2;231;223;235m╭─\u001b[0m\u001b[48;2;231;223;235m──────────────────────────────────────────────\u001b[0m Messages \u001b[48;2;231;223;235m───────────────────────────────────────────────\u001b[0m\u001b[48;2;231;223;235m─╮\u001b[0m │\n",
" │ \u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m┏━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m │\n",
" │ \u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m┃\u001b[0m\u001b[1;48;2;231;223;235m \u001b[0m\u001b[1;48;2;231;223;235mRole\u001b[0m\u001b[1;48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m┃\u001b[0m\u001b[1;48;2;231;223;235m \u001b[0m\u001b[1;48;2;231;223;235mContent \u001b[0m\u001b[1;48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m┃\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m │\n",
" │ \u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m┡━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m │\n",
" │ \u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235muser\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m │\n",
" │ \u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235mGenerate a dataset of fake user orders. Each row of the dataset should be valid. The format \u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m │\n",
" │ \u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235mshould not be a list, it should be a JSON object. \u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m │\n",
" │ \u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m │\n",
" │ \u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235mGiven below is XML that describes the information to extract from this document and the tags\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m │\n",
" │ \u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235mto extract it into. \u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m │\n",
" │ \u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m │\n",
" │ \u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m │\n",
" │ \u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m │\n",
" │ \u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235mONLY return a valid JSON object (no other text is necessary), where the key of the field in \u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m │\n",
" │ \u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235mJSON is the `name` attribute of the corresponding XML, and the value is of the type \u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m │\n",
" │ \u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235mspecified by the corresponding XML's tag. The JSON MUST conform to the XML format, including\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m │\n",
" │ \u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235many types and format requests e.g. requests for lists, objects and specific types. Be \u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m │\n",
" │ \u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235mcorrect and concise. If you are unsure anywhere, enter `null`. \u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m │\n",
" │ \u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m │\n",
" │ \u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235mHere are examples of simple (XML, JSON) pairs that show the expected behavior: \u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m │\n",
" │ \u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m│\u001b[0m\u001b[48;2;231;223;235m \u001b[0m\u001b[48;2;231;223;235m- `