Using Isomeric is like prompting an LLM. Behind every Isomeric prompt is an LLM trained on billions of tokens of text.
schema
key of your request POST body. Each schema strictly follows the JSON Schema spec.
A valid Isomeric POST request body looks like this:
title
before generating a price
will get you a better result because the price being generated will be inferred given the context of the title.
For example:
price
output the prompt sent to the model will actually be:
recipe
data, it’s best to make that your top-level object. Like this:
description
value is the most powerful value to consider when designing your prompt. This informs the LLM what data specifically you’re looking for. Use plain english when describing the data definition. For example:
string
. This is good for things like titles, descriptions, summaries, etc.
number
type will constrain the model only to generate a number as a result. Valid number examples are: 2
, 22
, 22.01
, and 22.202
. The resulting JSON will be a number therefore not wrapped in quotes.
boolean
types will return only true
or false
. This type is great for keys used to determine something like page type. For example:
object
must have a properties
key describing each property of the object.
For example:
array
type must have an items
attribute describing each item of the array. Let’s use reviews as an example.
max_items
to control how many items in the list you want generated. This can be specified like so:
type
specified above, we have added a default stop sequence. You can override these by specifying your own via the stop
key like so:
max_tokens
attribute like so:
Pattern
is a powerful tool to use regular expressions giving you fine-grained control of the output of the model. Remember that because this is being passed in as json
you need to escape your escape characters too.
This is an example that will constrain the model to produce prices according to a strict format:
red
, green
, or blue
.
strings
, numbers
, and booleans
can be marked as nullable
. This is helpful to prevent the model from hallucinating if a value does not exist on a website. In which case, a nullable
type will return null
instead of producing a hallucinated value because no value exists.