SPB Git

spb/llmindex Public

The discriminative, contamination-resistant, fully transparent LLM ranking — updated live.

TypeScript 77.9% TeX 15.2% Python 3.7% SQL 1.4% JavaScript 1.1% Shell 0.5%
1.6 KB · 54 lines typescript
Raw Blame History
1/**2 * llmindex.io — item bank types: templates, generated items3 * Author:  Simon-Pierre Boucher4 * Contact: contact@spboucher.ai5 * License: Proprietary — © Simon-Pierre Boucher, all rights reserved6 */7import type { Domain } from '@llmindex/scoring';8import type { GradingMode } from './answer';9import type { Rng } from './rng';1011/**12 * A generated, gradeable item. `answerKey` stays server-side only —13 * never shipped to the client bundle or public API.14 */15export interface GeneratedItem {16  templateId: string;17  domain: Domain;18  prompt: string;19  answerKey: string;20  /**21   * Grading mode: exact/numeric use line extraction ("ANSWER: x" cascade);22   * json/lines use fenced-block extraction (call sequences, terminal output).23   */24  grading: GradingMode;25  perturbSeed: string;26  /**27   * Vision items: SVG scene source. The worker rasterizes it to PNG and sends28   * it as image input; the prompt text never contains the answer.29   */30  svg?: string;31}3233/**34 * A versioned dynamic template. Template *shapes* are public (methodology35 * transparency); each render is a fresh perturbation (values + paraphrase),36 * so no fixed test set can be memorized.37 */38export interface ItemTemplate {39  id: string; // e.g. "math.arith.chain-v1"40  domain: Domain;41  description: string;42  /** Approximate size of the value/paraphrase space (contamination audit). */43  paramSpace: number;44  render(rng: Rng, perturbSeed: string): GeneratedItem;45}4647/** Open-ended duel prompt (writing / safety_refusal_quality) — judged pairwise, no key. */48export interface DuelPrompt {49  templateId: string;50  domain: Domain;51  prompt: string;52  perturbSeed: string;53}54