Skip to main content

Context Loaders

Context loaders prepare your documentation for test generation by parsing and chunking content.

Markdown Loader

The primary loader for markdown documentation:

Parameters

create_markdown_loader

Chunk Structure

Each chunk contains:
The chunk_id is derived from the file name and headers:

Examples

Basic Loading

Custom Chunk Sizes

Header-Based Splitting

With Generator

Document Structure Best Practices

Good Structure

This creates logical, well-sized chunks.

Avoid

This results in one huge chunk or arbitrary splitting.

Supported Formats

Custom Loaders

Create custom loaders for other formats:

Next Steps

Strategies

Learn about chunk selection strategies

BaseGenerator

Learn about the generator class