/** * The TypeSafe annotation questions. * * The same conventions as the OpenAI prompt (`prompt.ts`, docs/annotation-guide.md), reshaped for a * model that answers typed questions instead of following a system prompt: * * - One Choice question per block, over the same closed label set. The answer is an option name * and a probability distribution, so "select, never generate" holds by the protocol itself: * there is no field in which text could come back. * - The HOW TO DECIDE, QUOTE DEPTH and REGION WINS rules live in the option descriptions they * disambiguate, because each question is evaluated in isolation and only sees its own criteria. * - The COST OF ERRORS and CONFIDENCE sections are deliberately absent. Asking the model to be * biased would bake the bias into the distribution; instead the raw distribution is stored and * the asymmetry is applied in code (`probabilities.ts`). * * Versioned separately from the OpenAI prompt so runs under the two never share a resume key or get * silently compared as one convention. */ import { type Label } from '../types'; import { type ChoiceQuestion, type SystemOneRequest } from './typesafe-client'; import { type PromptBlock } from './prompt'; export declare const TYPESAFE_PROMPT_VERSION = "annotate-ts-v1"; /** * Option descriptions. Objects rather than strings because the confusable pairs (REPLY_HISTORY vs * INLINE_QUOTE, SIGNATURE vs REPLY_HISTORY, DISCLAIMER vs NEW_CONTENT) need a stated boundary in * both directions, and jev reads literally: an unstated rule is not applied. */ export declare const LABEL_CRITERIA: Readonly>>; /** * Question for the block at `position` in `state.blocks`. * * The path is the array position, not the block index: jev resolves `blocks[3]` as the fourth * element, and block indices skip the blank blocks that are never sent. For the same reason the * state carries no index field at all, so there is no second number the model could confuse with * the position. One hop, named directly, per the jev 1.13 guidance on indirection. */ export declare function blockQuestion(position: number): ChoiceQuestion; /** Question id for a block. Ids are never sent to the model, only used to match answers. */ export declare function questionId(index: number): string; /** Inverse of `questionId`. Null for anything that is not one. */ export declare function parseQuestionId(id: string): number | null; /** The state: exactly what the OpenAI prompt sends (block text, quote depth, reply flag), as JSON. */ export declare function buildState(blocks: readonly PromptBlock[], isReply: boolean): { is_reply: boolean; blocks: { quote_depth: number; truncated: boolean; text: string; }[]; }; /** * Tokens allowed per request, below the documented 64k so the estimate below can be wrong by a * margin without a request being rejected. */ export declare const REQUEST_TOKEN_BUDGET = 56000; /** * Split one message's questions into requests that fit the token budget. * * Every request carries the full state, because a block cannot be labelled without its neighbours. * Only the questions are divided. With the 60 block, 700 character caps the state is at most about * 21k estimated tokens, inside the documented 32k limit for state plus one question. */ export declare function planRequests(blocks: readonly PromptBlock[], isReply: boolean): SystemOneRequest[]; //# sourceMappingURL=typesafe-prompt.d.ts.map