Skip to main content

Overview

The Generators module creates synthetic Dataset objects from context documents. This is useful for bootstrapping evaluations when you don’t have real conversation data.

How it works

  1. A context loader reads and chunks your documents
  2. A chunk selection strategy picks which chunks to process
  3. The generator uses an LLM to create realistic QA pairs from each chunk

Usage

Context loaders

LocalMarkdownLoader

Reads markdown files and splits them into chunks based on headers and size:

Custom loader

Implement BaseContextLoader for custom document sources:

Chunk selection strategies