Generation API¶
evret.generation.dataset
¶
LLM-assisted evaluation dataset generation.
ChunkingConfig
dataclass
¶
Settings for structure-aware text chunking.
CompletionProvider
¶
Bases: Protocol
Minimal LLM interface used by the dataset generator.
complete(prompt)
¶
Return a completion for the prompt.
DatasetGenerator
¶
Generate diverse retrieval-evaluation examples from documents.
GeneratedChunk
dataclass
¶
Chunk emitted by the dataset-generation chunker.
to_document_example()
¶
Convert to Evret's evaluation document shape.
GeneratedDataset
dataclass
¶
GeneratedExample
dataclass
¶
SourceDocument
dataclass
¶
Input document for dataset generation.
build_generation_prompt(chunk, *, num_examples=6)
¶
Build the single diverse generation prompt for one chunk.
chunk_documents(documents, *, config=None)
¶
Split documents into structure-aware chunks.