Documentation
¶
Overview ¶
Package checking is the Check of a task from the learner's paper: one call in which a model judges the learner's work on the tasks of a frame, with no key a program derived. The model sees the task's crop as printed, the work — the same crop with the learner's strokes on it and the sheet's strokes beside it —, and the instruction printed above the frame when the page has one; it finds each task's answer, solves each task itself, compares, and gives each task's verdict, how sure it is, what it read and where, what it took for given, the learner's mistakes and where they are, and its own solution and answer, which the learner never sees; and for the frame the tutor's words and a ladder of hints. The program holds the answer to its schema and checks the words and the hints for the hidden answers before they reach the learner; the verdict is the model's. It is the capability task_checking of spec's admission table.
Index ¶
Constants ¶
const ( VerdictCorrect = "correct" VerdictIncorrect = "incorrect" VerdictUnreadable = "unreadable" VerdictNoAnswer = "no_answer" )
The verdicts of a task, as the schema names them.
const ( ConfidenceLow = "low" ConfidenceMedium = "medium" ConfidenceHigh = "high" )
The confidences of a verdict, as the schema names them.
const MaxOutputTokens = 16000
MaxOutputTokens is the most a call may write, thinking included: the bound of every call of the library that reasons.
const MaxTasks = 20
MaxTasks is the most tasks of a frame, as one page begins attempts for.
const Version = 1
Version is the version of the prompt. A change to a word a model reads is a new version, and the entry of the list that admitted the prompt admits it no longer. TestFrozenV1 holds it.
Variables ¶
var Schema = map[string]any{ "type": "object", "additionalProperties": false, "required": []string{"tasks", "tutor_words", "hints"}, "properties": schemaProperties, }
Schema is the answer every model returns.
Functions ¶
func Answered ¶
Answered is the answer of a model that gives each task its verdict, confidence high, read value, and solution and answer, with no box, assumption or mistake, and the tutor's words and hints given, as Read takes it back: what the runner's stub and api's stub answer by the truth.
func Fingerprint ¶
func Fingerprint() string
Fingerprint names the prompt: the SHA-256 of every word a model reads besides the pictures, the language's name, the age category and the history — the instructions, the labels, the text and its block, and the schema, whose names the model reads too. An entry of the list of admitted models holds it (admission.Entry).
func RequestOf ¶
RequestOf is what the Check asks of a model. A count of tasks below 0 or above MaxTasks, a work that is no PNG, a crop of the task that is none, and a request with no language or no age category are refused. The language goes by its name where the checks of words know it, and otherwise by its tag. The model, its effort and how many tokens it may write the caller sets.
Types ¶
type Check ¶
Check is what a model said: a slot for each task, in the order of the frame, the tutor's words and the ladder of hints.
func Read ¶
Read takes a model's answer apart as strictly as the schema, for a frame of tasks tasks on a work of width × height px: every field and nothing else; exactly one answer of each task from 1 to tasks, or, with tasks 0, of each task from 1 to the count the model gave, 1 to MaxTasks, put in that order; each verdict and confidence one of the schema's; 2 or 3 hints; and every box within the work, its corners put in order, given in thousandths of the crop (provider.Place), a box of four zeros none.
type Error ¶
type Error struct {
Box *observationv1.CropBox
Where, Kind, Note string
}
Error is a mistake of the learner's on a task: its box on the work in thousandths of the crop, nil when the model gave it no place, the place in words, its kind and what is wrong there.
type Picture ¶
Picture is a picture of a request with its size in pixels: the task's crop and the instruction's as provider.Photo gives them, and the PNG of the work as app sent it.
type Prompt ¶
type Prompt struct {
Statement Picture
Work Picture
Instruction *Picture
Tasks int
Language string
AgeCategory string
History []Turn
}
Prompt is what a request holds: the task's crop as printed, the work, the instruction above the frame or nil, the number of tasks in the frame, or 0 for the model to count them, the language of the interface by its tag, the learner's age category as api names it, and the Checks before this one, in order.
type Slot ¶
type Slot struct {
Task int
Verdict, Confidence, Read string
ReadBox *observationv1.CropBox
Assumptions []string
Errors []Error
Solution, Answer string
}
Slot is the Check of one task, by its number in the frame, from 1: its verdict and confidence, the learner's answer read and its box in thousandths of the crop of the work, nil when nothing was read, what the model took for given, the learner's mistakes, and the model's own solution and answer, which the learner never sees.