Skip to main content

Experiments: zero-shot LLM deployments in minutes

Experiment is the fastest way to try the Emissary platform. In under a minute, you can spin up a customized model and call it from your application through a ready-made API endpoint — no training data, no tuning, no infrastructure setup required.

Every experiment starts as a zero-shot model built from the class definitions you provide. You can begin sending traffic immediately, then iterate by uploading data, labeling, and re-training as your use case matures.

Experiment currently supports four modes:

ModeWhat it does
judgeEvaluate outputs against a single criterion (LLM-as-Judge)
decisionClassify inputs into one of several mutually exclusive categories
routingRoute requests to the right downstream model, agent, or workflow
regressionScore inputs on a continuous numeric scale

Common Workflow​

Each mode follows the same two-step pattern:

  1. Create the experiment by POSTing to /v1/experiments with a mode and a list of classes. You receive an id and latest_version.
  2. Call the model at the mode's inference endpoint using the format EXPERIMENT_ID/VERSION as the model parameter.

All requests require your API key in the X-API-Key header.


judge — LLM-as-Judge​

Score a model's output against a single quality criterion. The model returns a probability that the criterion holds, which you can threshold or log for offline analysis.

Use it for: automated evaluation of LLM outputs in CI, online quality monitoring of a production assistant (helpfulness, safety, groundedness), or filtering low-quality generations from a synthetic dataset.

Create the experiment:

import json
import requests

response = requests.post(
'https://api.withemissary.com/v1/experiments',
headers={
'Content-Type': 'application/json',
'X-API-Key': YOUR_API_KEY
},
data=json.dumps({
'name': 'MyJudge',
'mode': 'judge',
'classes': [
{'name': 'helpful', 'description': 'Is the response to the query helpful?'}
]
})
)
print(response.json())
{"id": "ex-ahejacuehandheha", "latest_version": "0.0.0"}

Call the model:

response = requests.post(
'https://api.withemissary.com/v1/classification',
headers={
'Content-Type': 'application/json',
'X-API-Key': YOUR_API_KEY
},
data=json.dumps({
'model': 'ex-ahejacuehandheha/0.0.0', # EXPERIMENT_ID/VERSION
'input': "User: Explain quantum computing in simple terms.\nAssistant: I don't know, Google it.",
'data_format': 'probs'
})
)
print(response.json())
{
"id": "classify-3c52592c7a404f97aa494861a79db220",
"model": "ex-ahejacuehandheha/0.0.0",
"data": [{"index": 0, "probs": {"helpful": 0}}],
"created": 1779906329
}

decision​

Classify an input into exactly one of several mutually exclusive labels. The model returns a probability distribution across all classes that sums to 1.

Use it for: sentiment analysis, intent detection, content moderation, support ticket triage, or any task where each input belongs to one and only one category.

Create the experiment:

response = requests.post(
'https://api.withemissary.com/v1/experiments',
headers={
'Content-Type': 'application/json',
'X-API-Key': YOUR_API_KEY
},
data=json.dumps({
'name': 'MyDecision',
'mode': 'decision',
'classes': [
{'name': 'positive', 'description': 'The text expresses a positive sentiment, satisfaction, or approval.'},
{'name': 'negative', 'description': 'The text expresses a negative sentiment, dissatisfaction, or complaint.'},
{'name': 'neutral', 'description': 'The text is factual or does not express a strong opinion.'}
]
})
)
print(response.json())
{"id": "ex-ahejacuehandhehe", "latest_version": "0.0.0"}

Call the model:

response = requests.post(
'https://api.withemissary.com/v1/classification',
headers={
'Content-Type': 'application/json',
'X-API-Key': YOUR_API_KEY
},
data=json.dumps({
'model': 'ex-ahejacuehandhehe/0.0.0',
'input': 'This product is absolutely wonderful!',
'data_format': 'probs'
})
)
print(response.json())
{
"id": "classify-eac7451c54174ebc8da47be77dfe9581",
"model": "ex-ahejacuehandhehe/0.0.0",
"data": [{
"index": 0,
"probs": {
"negative": 0.017637422308325768,
"neutral": 0.024233082309365273,
"positive": 0.9581295251846313
}
}],
"created": 1779907078
}

routing​

A specialized form of classification designed for picking the right downstream destination for each request. Behaves like decision but is optimized for routing patterns where each class represents a target model, agent, or pipeline.

Use it for: sending simple queries to a fast/cheap model and complex ones to a larger one, dispatching tasks across specialized agents (research, coding, creative), or routing customer messages to the correct team.

Create the experiment:

response = requests.post(
'https://api.withemissary.com/v1/experiments',
headers={
'Content-Type': 'application/json',
'X-API-Key': YOUR_API_KEY
},
data=json.dumps({
'name': 'MyRouter',
'mode': 'routing',
'classes': [
{'name': 'simple_task', 'description': 'Simple, straightforward queries that can be handled by a small, fast model.'},
{'name': 'complex_task', 'description': 'Complex queries requiring reasoning, code generation, or multi-step analysis.'},
{'name': 'creative_task', 'description': 'Creative writing, brainstorming, or content generation tasks.'}
]
})
)
print(response.json())
{"id": "ex-ahejacuehandheheee", "latest_version": "0.0.0"}

Call the model:

response = requests.post(
'https://api.withemissary.com/v1/classification',
headers={
'Content-Type': 'application/json',
'X-API-Key': YOUR_API_KEY
},
data=json.dumps({
'model': 'ex-ahejacuehandheheee/0.0.0',
'input': 'Write a poem about autumn leaves',
'data_format': 'probs'
})
)
print(response.json())
{
"id": "classify-23d895d52c534bfca2c24e5492d3321d",
"model": "ex-ahejacuehandheheee/0.0.0",
"data": [{
"index": 0,
"probs": {
"complex_task": 0.011172994039952755,
"creative_task": 0.9710367918014526,
"simple_task": 0.017790259793400764
}
}],
"created": 1779907385
}

regression​

Score inputs on a continuous scale rather than choosing a discrete label. You define each scale by its min/max range and what the endpoints mean; the model returns a single numeric value.

Use it for: scoring sentiment intensity, response quality on a 1–5 scale, urgency or risk levels, readability, toxicity severity — anything where "how much" matters more than "which category."

Create the experiment:

response = requests.post(
'https://api.withemissary.com/v1/experiments',
headers={
'Content-Type': 'application/json',
'X-API-Key': YOUR_API_KEY
},
data=json.dumps({
'name': 'MyRegressor',
'mode': 'regression',
'classes': [{
'name': 'valence',
'description': 'How positive the emotional tone is.',
'min_value': 0,
'max_value': 1,
'low_description': 'very negative emotional tone',
'high_description': 'very positive emotional tone',
'higher_means': 'more positive emotional tone'
}]
})
)
print(response.json())
{"id": "ex-ahejacuehandhehedfedaew", "latest_version": "0.0.0"}

Call the model:

response = requests.post(
'https://api.withemissary.com/v1/regression',
headers={
'Content-Type': 'application/json',
'X-API-Key': YOUR_API_KEY
},
data=json.dumps({
'model': 'ex-ahejacuehandhehedfedaew/0.0.0',
'input': 'I absolutely love this product — best purchase I have made all year!'
})
)
print(response.json())
{
"id": "classify-56abbf04ce9b4fc793461a21538eabcb",
"model": "ex-ahejacuehandhehedfedaew/0.0.0",
"data": [{"index": 0, "logits": 0.9821727275848389}],
"created": 1779908552
}

Endpoint Reference​

ModeEndpoint
judge, decision, routingPOST /v1/classification
regressionPOST /v1/regression

Next Steps​

The zero-shot model created here is just the starting point. Once you've validated the mode and class definitions against real traffic, you can:

  • Upload labeled examples to fine-tune the model for higher accuracy
  • Publish new versions and roll them out incrementally
  • Monitor inference logs in the dashboard to spot edge cases

Head to the Datasets and Training sections of the docs to continue.