Skip to content
Get started

Recipes

Use with an AI tool

Recipes are ready question packs with carefully worded instructions and options. Each one is the questions object of a /v1/decide request. They are built into the curva binary: curva recipe show <name> prints one as JSON.

Terminal window
curva recipe list
curva recipe show support-triage > questions.json
Recipe Questions
support-triage team (Choice, abstains below 0.8), urgency, frustration (Score), refund_requested, churn_risk (Noul)
content-moderation violation (Choice, no escape option, abstains below 0.85), severity (Score), targets_individual, minor_involved (Noul)
lead-qualification fit (Score), intent, timeline (Choice), decision_maker, enterprise (Noul)
phishing-check phishing (Noul), tactics (Multi), risk (Score), sender_mismatch (Noul)
llm-output-qa answers_question (Score), grounded, unsafe, leaks_data (Noul), issues (Multi), verdict (Choice: pass, revise, block)
rag-check state {question, passages, answer?}: needs_retrieval, answerable (before an answer exists), grounded (once it does) (Noul), next_step (Choice: send, retrieve_more, rewrite, handoff)
rag-rerank state {question, passage}: relevant (Noul); its probability is a reranking score, so run it over every retrieved passage with curva map
guardrails any text: prompt_injection (Noul), personal_data (Multi: email, phone, address, government_id, payment_card, health, secret), toxicity (Score), verdict (Choice: allow, review, block; abstains below 0.8). In Python: curva.guard(text)
voice-call a live call’s last turns: handoff, end_of_call, voicemail, consent, identity_confirmed (all Noul). In Python: call.signals() on a voice call
emotion call audio, judged from the voice and the words: emotion (Choice: calm, happy, frustrated, angry, sad, scared, confused), intensity (Score: none, mild, clear, strong), getting_angrier, stays_upset, tone_differs (Noul). ask="emotion" on a live call or a recording. Accuracy: measured numbers pending
Terminal window
# One decision
jq -n --slurpfile q questions.json '{state: {ticket: "Charged twice, refund please"}, questions: $q[0]}' \
| curl -s localhost:7777/v1/decide -H 'content-type: application/json' -d @-
# A file of states
curva map tickets.jsonl -q questions.json -o answers.jsonl
# Against your current system first
curva shadow traffic.jsonl -q questions.json -o shadow.jsonl

From Python, load the questions.json that curva recipe show wrote and pass the questions as dicts:

import json
import curva
questions = json.load(open("questions.json"))
d = curva.decide({"ticket": "Charged twice, refund please"}, questions)

Recipes are a starting point: edit the wording and options for your domain. Rewording a question starts a fresh calibration, so settle the wording before collecting feedback.