v1
latestOpenAPI 3.1.02026-07-1255227258.8 KBentities
Create Instruction
Create a new instruction. Instructions are applied to documents as they are created or updated. The results of the instruction are stored as structured data in the schema defined by the entity_schema parameter. The prompt parameter is a natural language instruction which will be applied to documents. This feature is in beta and may change in the future.
post/instructions
Request body
Example request
{
"name": "Find all pizzas",
"active": true,
"scope": "document",
"prompt": "Find all pizzas described in the text.",
"context_template": "Document: {{document.name}} {{document.metadata.key_foo}}",
"filter": {
"toppings": {
"$in": [
"pizza",
"mushrooms"
]
}
}
}Response
Successful Response
Example response
{
"name": "Find all pizzas",
"active": true,
"scope": "document",
"prompt": "Find all pizzas described in the text.",
"context_template": "Document: {{document.name}} {{document.metadata.key_foo}}",
"filter": {
"toppings": {
"$in": [
"pizza",
"mushrooms"
]
}
}
}