checking

package
v0.1.74 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 3, 2026 License: Apache-2.0 Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

View Source
const (
	VerdictCorrect    = "correct"
	VerdictIncorrect  = "incorrect"
	VerdictUnreadable = "unreadable"
	VerdictNoAnswer   = "no_answer"
)

The verdicts of a task, as the schema names them.

View Source
const (
	ConfidenceLow    = "low"
	ConfidenceMedium = "medium"
	ConfidenceHigh   = "high"
)

The confidences of a verdict, as the schema names them.

View Source
const MaxOutputTokens = 16000

MaxOutputTokens is the most a call may write, thinking included: the bound of every call of the library that reasons.

View Source
const MaxTasks = 20

MaxTasks is the most tasks of a frame, as one page begins attempts for.

View Source
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

View Source
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

func Answered(slots []Slot, words string, hints []string) (string, error)

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 Instructions

func Instructions() string

Instructions are the instructions of every request.

func RequestOf

func RequestOf(p Prompt) (provider.Request, error)

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 Box

type Box struct {
	X1 int `json:"x1"`
	Y1 int `json:"y1"`
	X2 int `json:"x2"`
	Y2 int `json:"y2"`
}

Box is a box as the model gives it, in pixels of the work.

type Check

type Check struct {
	Slots      []Slot
	TutorWords string
	Hints      []string
}

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

func Read(answer string, tasks, width, height int) (*Check, error)

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

type Picture struct {
	Image         provider.Image
	Width, Height int
}

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.

type Turn

type Turn struct {
	Verdicts []string
	Words    string
	Rungs    []string
}

Turn is a Check of the attempt before this one, as api keeps it: the verdict of each task, in order, the tutor's words it gave, and the hints of its ladder the learner was shown.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL