Description
Create a plugin architecture to allow users to add custom chunking strategies without modifying the core codebase.
Use cases
- Custom domain-specific chunkers (legal, medical, code)
- Proprietary chunking algorithms
- Integration with internal tools
Proposed design
Plugin location
~/.atlasrag/plugins/
└── my_chunker.py
Plugin interface
# ~/.atlasrag/plugins/legal_chunker.py
from ragctl.plugins import ChunkerPlugin, Chunk
class LegalChunker(ChunkerPlugin):
"""Chunker optimized for legal documents."""
name = "legal"
description = "Splits by legal sections and clauses"
def chunk(self, text: str, **options) -> list[Chunk]:
# Custom implementation
chunks = []
# ... split by ARTICLE, SECTION, CLAUSE patterns
return chunks
Usage
ragctl chunk contract.pdf --strategy legal
Tasks
Description
Create a plugin architecture to allow users to add custom chunking strategies without modifying the core codebase.
Use cases
Proposed design
Plugin location
Plugin interface
Usage
Tasks
ChunkerPluginbase class)ragctl plugins listcommand