Decisions
You send a context, the text you want to ask about, and one or more decisions. A decision is one question, with the answers you allow. Those answers are its outcomes.idis your name for the decision. The answer uses it as a key.kindsays what sort of question it is (see below).questionis plain text. You can also send JSON, as you can for the context.outcomeslists the answers you allow. You can describe each one, which helps the model draw the line between them (write a decision).
Three kinds of decision
A decision with no
kind is single.
Answers
Every decision gets its own answer, under itsid:
probabilitiesgives every outcome you allowed a probability. They add up to 1.topis the likeliest outcome, andp_topits probability.- An
ordinalanswer also hasexpected_level: the average level, counting the first level as 0.
model answered, what the call cost (charge) and how many input
tokens it was billed for (usage).
Policies
A policy turns probabilities into an action, so your code doesn’t have to:abstain_below: whenp_topis below this number, the action isabstain, and you can send the case to a person.action_costs: what each of your actions costs for each outcome. OneHot picks the action with the lowest expected cost.
policy block with the action to take
(read results).
Models
OneHot’s models are called kettei. There are three base models, smallest to largest:
A larger model costs more per token (pricing). If the model you ask for can’t
answer right now, another one answers instead unless you say not to. This is called fallback,
and the answer tells you when it happens (models and fallback).
Your own models
When the base models aren’t accurate enough for a decision, you can improve it with your own examples (improve a decision):- A dataset holds example contexts with the answers you expect.
- Labelling helps you get those answers when you have real inputs but no answers yet.
- Fine-tuning trains a model of your own on your examples.
support-router. Calling the
family gets you its current model. Each model in it also has a number, such as support-router@3,
which you can call to get exactly that model (families). Only your organisation
can call your models.
Your organisation
Everything you make and pay for belongs to an organisation. You start with your own, called Personal. To work with other people, create a Team organisation and invite them (organisations).- An API key lets your code call OneHot. Create one in the console (access and keys).
- You pay from credit you buy in advance. The more you have bought, the higher your tier, and the higher your limits (usage and limits).
- In a Team, projects keep separate pieces of work apart, such as staging and production (projects).
