Skip to navigation

Sarvam Prism

View as Markdown

Sarvam Prism (System-1 Decision Model)

Sarvam Prism is a System-1 decision model built on Sarvam 105B: a model for the fast, intuitive judgements that make up most of an enterprise’s daily work, where each decision is a choice among a known set of options. You send it a state (the input to decide on) and a set of typed questions, and it returns a calibrated probability for every option of every question in one call. It does not generate text, so there is nothing to parse and no output format to enforce: every answer is already a typed value.

Use it where you would otherwise prompt a chat model to “answer yes or no” or “reply with one of these labels” and then parse the reply: routing, triage, moderation, judging agent runs, security checks, and scoring.

Highlights:

  • 71.8 average across three decision indices, including 82.5 on an Indian-language benchmark
  • Calibrated confidence: makes fewer mistakes than its confidence promises at every level measured, in English and in Indian languages
  • Same answer in any order: options are scored in a fixed internal order, so shuffling them does not change the result

At a Glance

Model IDsarvam-prism
Built onSarvam 105B
What it doesAnswers yes/no (noul), pick-one (choice) and ordered-scale (score) questions about your input, with a probability for every option
APIDecisions API (POST /v2/systemone, reference), synchronous JSON, no streaming
InputText, or any JSON object or array (rendered as compact JSON). Images are not supported.
LanguagesEnglish, 10 Indian languages, and Hinglish
Input limits32,768 tokens per question (state + question + options), 2–255 options per choice, 2–10 levels per score. No cap on the number of questions. Each request must finish within 60 seconds. Details
OutputProbabilities that sum to 1 for each question, plus the top option and a confidence value.
Pricing₹4 per 1M input tokens and ₹0 per 1M output tokens, on every plan. Pricing page
Best forRouting, triage, moderation, judging agent runs, security checks (such as prompt injection), and scoring, wherever a confident answer can run on its own
Known limitationsSee below

Key Features

Accurate

Scores 71.8 averaged across the Jev Decision Index (67.0), a recreation of the Artificial Analysis Decision Index (65.9), and an Indian-language benchmark (82.5).

Confidence You Can Trust

On answers given with at least 90% confidence, Prism expects 3.3% to be wrong and gets 2.2% wrong across 37 public benchmarks, and expects 5.4% and gets 4.4% in Indian languages. Act on confident answers automatically and send only the uncertain ones to a person.

Same Answer in Any Order

Options often come from code, such as a catalogue, a tool list, or a set of intents, so their order is arbitrary. Prism sorts them into a fixed order before scoring and returns probabilities under your option names, so reordering options changes nothing.

Built for Enterprise Decisions

78.5% accuracy judging recorded agent runs (task success, need for review, the agent responsible for a failure) and 89.0% on a security benchmark that includes prompt-injection and jailbreak checks.

How It Answers

Prism scores every option of every question and returns one probability per option. It generates no text, so there is no output to parse and output costs nothing. Each option is scored independently of the others, so one option’s wording cannot sway another’s score.

For benchmarks and methodology, see the Sarvam Prism blog.

Quickstart

Send one request with three questions about the same support ticket:

The SDK examples need sarvamai 0.1.43 or later for Python (pip install -U "sarvamai>=0.1.43") and sarvamai 1.1.15 or later for JavaScript (npm install sarvamai@latest).

from sarvamai import SarvamAI
client = SarvamAI(api_subscription_key="YOUR_SARVAM_API_KEY")
response = client.decisions.create(
model="sarvam-prism",
state="My Stripe integration stopped working and all checkout payments are failing.",
questions={
"urgent": {
"type": "noul",
"instructions": "Is this urgent and revenue-impacting?",
},
"department": {
"type": "choice",
"instructions": "Which team should handle this?",
"criteria": {
"billing": "Payments or invoices",
"technical": "Bugs or outages",
"sales": "New business enquiries",
},
},
"severity": {
"type": "score",
"instructions": "Rate the severity.",
"criteria": ["trivial", "minor", "moderate", "major", "critical"],
},
},
)
answers = response.answers
if answers["urgent"].noul > 0.5:
print("Escalate to", answers["department"].choice)

Response:

{
"model": "sarvam-prism",
"answers": {
"urgent": { "type": "noul", "noul": 0.9782 },
"department": {
"type": "choice",
"choice": "billing",
"confidence": 0.7065,
"probabilities": { "billing": 0.8044, "technical": 0.1869, "sales": 0.0087 }
},
"severity": {
"type": "score",
"score": 3.832,
"confidence": 0.916,
"legend": { "0": "trivial", "1": "minor", "2": "moderate", "3": "major", "4": "critical" },
"probabilities": { "0": 0.0026, "1": 0.0034, "2": 0.0115, "3": 0.1245, "4": 0.8581 }
}
},
"usage": { "input_tokens": 153, "output_tokens": 0 }
}

You can also authenticate with Authorization: Bearer $SARVAM_API_KEY.

Request

FieldTypeRequiredDescription
modelstringYessarvam-prism. A request without model returns 400; an unknown ID returns 404.
statestring, object or arrayYesThe input to decide on. Objects and arrays are rendered as compact JSON. An empty string is allowed; a missing or null state returns 422. Never truncated, see Limits.
questionsobjectYesMap of your question ID to a question, at least one. Each answer comes back under the same ID. A missing or empty questions returns 422.

Generation fields such as temperature, max_tokens, stream and images are not supported and return 422 (an image URL returns 400).

Question types

Every question has a type (noul, choice or score, lowercase) and usually an instructions string: the question to ask about the state. instructions can also be an object or array, rendered as JSON. Only type, instructions and criteria are accepted; any other key in a question, including a misspelling such as instruction, returns 422.

typecriteriaAnswer
noul (yes/no)Optional. Object with true and false keys describing when each answer applies. Send instructions, criteria, or both.noul: probability of yes
choiceRequired. Object of option ID → description, 2 to 255 optionschoice: the most likely option ID, confidence, and probabilities for every option
scoreRequired. List of level descriptions, lowest first, 2 to 10 levelsscore: expected level, confidence, legend, and probabilities for every level

For choice, write each description as the condition under which that option applies. An option whose description is null or empty is shown to the model as the bare ID.

Response

FieldDescription
modelsarvam-prism
answersOne answer per question, keyed by your question ID. Each answer carries its type.
usage.input_tokensPrompt tokens for the request, see Token usage
usage.output_tokensAlways 0: Prism returns probabilities, not text

Reading answers

  • noul: probability from 0 to 1 that the answer is yes.
  • choice: the option ID with the highest probability, and probabilities keyed by your option IDs. confidence is the top probability rescaled so that an even split across all options is 0 and certainty is 1: (p_top − 1/n) / (1 − 1/n) for n options. With 3 options, a top probability of 0.80 gives a confidence of 0.70.
  • score: score is the expected level, Σ index × probability with levels indexed from 0 (lowest first), so it is a float such as 3.83. Round it if you need an integer level. probabilities and legend are keyed "0", "1", … in the order you sent the levels, and legend maps each key back to your level text. confidence runs from 0, when probability is spread across the scale, to 1, when it all sits on one level.

Each question’s probabilities are a softmax over that question’s options only and sum to 1.

Acting on confidence

Prism’s probabilities are calibrated: an answer given with 90% confidence is wrong about 10% of the time or less. That makes a confidence threshold a safe way to automate:

  • Act on an answer automatically when its top probability (noul, or probabilities[choice]) is at or above your threshold, for example 0.9. The calibration figures below refer to this probability, not to the rescaled confidence field.
  • Send answers below the threshold to a person.

At a 0.9 threshold, about 68.5% of English answers clear the bar. In Indian languages Prism is more cautious and about 38.4% clear it, so more of those decisions go to a person.

Option order

For choice questions, the order of options in criteria does not affect the answer: Prism scores options in a fixed internal order and returns probabilities under your option IDs, in the order you sent them. For score questions, order does matter, because it defines the scale from lowest to highest.

Repeatability

Probabilities can vary slightly between identical requests; the top answer is stable. Leave a margin around your thresholds rather than relying on an exact value.

Limits

  • 32,768 tokens per question. The limit applies to each question separately (state + that question’s text + its options), not to the whole request.
  • The state is never truncated. If any one question is over the limit, the whole request fails with 422 and no question is answered, with a message such as question 'q' encodes to 40026 tokens, over the 32768-token limit of this server. Check the size of large inputs before you send them.
  • 2 to 255 options per choice, 2 to 10 levels per score. Outside these ranges the request fails with 422.
  • No cap on the number of questions. You can send any number of questions per request; the 32,768-token limit applies to each question.
  • 60-second request timeout. A request that takes longer than 60 seconds fails with 503 model_overloaded, and no question is answered. Time grows with the number of questions and the size of the state, so split very large batches across several requests.

Token usage

The state is counted once per request, however many questions you ask; each question adds only its own instructions and options. Putting several questions about the same state in one request is cheaper than sending them separately.

Sarvam Prism costs ₹4 per 1M input tokens and ₹0 per 1M output tokens, the same on every plan. For example, 3 short questions about a 1,000-token state use a little over 1,000 input tokens (about ₹0.004). Check usage.input_tokens in the response for the exact count.

Errors

Errors use the standard Sarvam shape. Validation errors also carry param, the path to the field at fault. Branch on the HTTP status and code, not on the message text.

{
"error": {
"message": "questions.urgent.noul.instruction: Extra inputs are not permitted",
"code": "unprocessable_entity_error",
"request_id": "20261103_78f02876-7319-4ef9-935d-adbe287f86a2",
"param": "questions.urgent.noul.instruction"
}
}
StatuscodeWhen
400invalid_request_errorThe body is not valid JSON, the body is not a JSON object, model is missing or not a string, or images contains an image URL. Each case has its own message.
402insufficient_quota_errorCredit balance is empty, see Errors and troubleshooting
403invalid_api_key_errorMissing or invalid API key
404not_found_errorUnknown model. Model IDs are case-sensitive.
422unprocessable_entity_errorMissing state or questions, a missing or unsupported type, an unknown key, options or levels outside the allowed range, an unsupported field such as temperature, or a question over the token limit. param names the field.
429rate_limit_exceeded_errorToo many requests per minute, or the token budget is used up
500internal_server_errorAn internal error occurred
502model_call_failedThe model backend could not be reached
503model_overloadedThe model is overloaded or starting up, or the request took longer than 60 seconds

Retry 429, 502 and 503 with backoff. For a 503 on a large request, split the questions across smaller requests before retrying. Do not retry other 4xx errors; fix the request instead.

Examples

One yes/no question with criteria:

{
"model": "sarvam-prism",
"state": "The customer asked for a refund within the 30-day window.",
"questions": {
"refund": {
"type": "noul",
"instructions": "Should we approve the refund?",
"criteria": {
"true": "The request meets the refund policy",
"false": "The request breaks the refund policy"
}
}
}
}

Structured state and a score:

{
"model": "sarvam-prism",
"state": { "invoice": { "vendor": "Acme", "total": 1250, "status": "overdue" } },
"questions": {
"follow_up": {
"type": "score",
"instructions": "How urgent is follow-up?",
"criteria": ["Can wait", "This week", "Today"]
}
}
}

The answer maps each level key back to your text in legend, for example {"type": "score", "score": 1.4, "confidence": 0.36, "legend": {"0": "Can wait", "1": "This week", "2": "Today"}, "probabilities": {"0": 0.02, "1": 0.57, "2": 0.41}}.

Known limitations

  • No images. Sarvam Prism reads text only and does not support images. An images field is refused: image URLs return 400 and inline images return 422.
  • No streaming. Every request returns one JSON response.
  • No text output. Use Chat Completions when you need explanations or generated text.
  • Lower coverage in Indian languages. Answers in Indian languages clear a 0.9 confidence threshold less often (about 38.4%, against 68.5% in English), so more of them need a person to review.