Skip to main content
Dataset generation creates synthetic question-answer pairs from your documents to serve as ground truth during optimization. This eliminates the need for manual labeling while providing diverse test cases.

Overview

The DatasetGenerator uses an LLM to automatically create questions of varying difficulty levels (easy, medium, hard) from your source documents.

Basic Usage

Custom Document Parsing

If you need custom document loading:

Difficulty Distribution

Questions are automatically distributed across difficulty levels:
  • 30% Easy: Basic recall questions (e.g., “What is X?”)
  • 50% Medium: Analytical questions requiring synthesis
  • 20% Hard: Complex reasoning and inference questions
This distribution ensures comprehensive evaluation across different query types.

Custom Prompts

Customize the generation prompt:

Async Generation

For faster generation with large datasets:

Dataset Structure

Generated datasets follow this structure:

Loading Existing Datasets