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
| Parameter | Type | Default | Description |
|---|---|---|---|
max_chunk_size | int | 2000 | Maximum characters per chunk |
header_levels | list[int] | [1, 2, 3] | Header levels to split on |
min_chunk_size | int | 100 | Minimum characters per chunk |
Chunk Structure
Each chunk contains: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
Avoid
Supported Formats
| Format | Extension | Support |
|---|---|---|
| Markdown | .md | Full support |
| MDX | .mdx | Parsed as markdown |
Custom Loaders
Create custom loaders for other formats:Next Steps
Strategies
Learn about chunk selection strategies
BaseGenerator
Learn about the generator class