processing_mode | enum (whole_content, each_item) | No | whole_content | whole_content (default): evaluate all content together, including a conversation or related records. each_item: apply the same questions independently to each list item, automatically batching many evaluations per API request. |
content | string or object or array of any | Yes | - | Text, a JSON object, or a list to evaluate. Accepts native objects/lists or JSON text. In each_item mode provide a list, e.g. [{“query”:“buy running shoes”,“clicks”:120}]. Content is supplied as text/structured data; media URLs are not fetched. |
content_fields | array of string | No | - | In each_item mode, top-level keys to evaluate from each object, e.g. [‘query’]. Omit or pass [] to evaluate the entire item. Other fields are preserved in the output. Selected keys must exist in every item. |
questions | object or string | Yes | - | Nonempty map of questions keyed by output name, or its JSON string. Use the exact types choice, score, and noul; yes/no uses noul, not boolean or yes_no. Each question needs instructions describing the task; its output name is only an ID. You can combine different question types in one map. Questions run independently. Classification (choice): choose one category. criteria is an object mapping category names to descriptions (or null). Include an other/no-match category when appropriate. Example: {“intent”:{“type”:“choice”,“instructions”:“Classify the search intent.”,“criteria”:{“informational”:“Users seeking information or answers”,“transactional”:“Users ready to make a purchase or complete an action”}}}. Returns choice, confidence, and probabilities for the categories. Scoring (score): rate one dimension using criteria as an ordered array of descriptive levels, lowest to highest. Use 2 to 10 concrete descriptions, not numeric labels. Example: {“offer_clarity”:{“type”:“score”,“instructions”:“How clearly does the ad describe its offer?”,“criteria”:[“No product or service is identified”,“The product or service is named but its benefit is unclear”,“The product or service and its customer benefit are explicit”]}}. Returns score, confidence, probabilities, and legend. Levels start at 0; this example returns a score from 0 to 2, including fractional values. Yes/no (noul): ask whether a condition holds. criteria is optional; when supplied, it is an object with true and false descriptions. Example: {“has_cta”:{“type”:“noul”,“instructions”:“Does the ad explicitly ask the reader to take an action?”,“criteria”:{“true”:“Explicitly asks the reader to buy, sign up, book, call, or visit”,“false”:“No explicit request to take an action”}}}. Returns noul, the probability of yes from 0 to 1, not a boolean or a separate confidence. Use several noul questions when multiple labels can apply. In each_item mode define questions once, referring to the current item or its field names; Markifact binds each question to its item. No {item} placeholder is needed. Instructions and criteria descriptions also accept structured objects/arrays; these pass through without losing nested fields. |
flatten_output | boolean | No | False | Default false: return native answer objects keyed by question ID; list results are an array of {item, answers}. True: add flat fields named after each question, with _confidence/_probabilities for choice and score, _legend for score, and _probability for noul. A flattened noul is true at probability >= 0.5; use its probability for your own threshold. Existing columns are never overwritten. |
model | string | No | jev-latest | Jev model ID or alias. Defaults to jev-latest, which follows the latest stable release. |