@gaussia/sdk/schemas. Each schema is a single source of truth: it validates values at runtime, and its TypeScript type is inferred from the schema rather than hand-written. Build values through the schemas so they are validated as you create them.
Batch.parse returns a validated, fully typed value and throws on invalid input.
Core data model
These describe the evaluation input consumed by theGaussia base class.
Dataset— one evaluation session:sessionId,assistantId,context, aconversationofBatch[], and an optionallanguage.Batch— one query/answer unit:qaId,query,assistant,groundTruthAssistant, and an optionalweight.IterationLevel—full_dataset,stream_sessions, orstream_batches; selects how a retriever’s data is consumed.SessionMetadataandStreamedBatch— the streaming shapes used by the streaming iteration levels.Logprobs— token log-probability data passed through evaluation.
Generator schemas
These describe the structured output of generators.Chunk— a unit of context produced by a loader.GeneratedQueryandGeneratedQueriesOutput— single-turn generation output.ConversationTurnandGeneratedConversationOutput— multi-turn generation output.
Prompt-optimizer schemas
These describe the result of GEPA optimization.OptimizationResult— the final result: optimized prompt, initial and final scores, and history.IterationResultandCandidateResult— per-iteration detail in the history.FailingExample— an example that scored below threshold and drove candidate generation.
Why Zod
Deriving types from schemas keeps the static type and the runtime check in lockstep. Structured model output uses the same approach:generateObject on a LanguageModel validates the model’s response against the Zod schema you pass.