Overview
Ingestion pipelines transform raw documents into indexed, queryable data through a series of transformations like parsing, chunking, and embedding.IngestionPipeline
Pipeline for processing documents with transformations.Constructor Options
TransformComponent[]
required
Array of transformation components to apply
VectorStore
Optional vector store to persist nodes
IngestionCache
Optional cache for deduplication
BaseDocumentStore
Optional document store for persistence
Transformation Pipeline
Common pipeline pattern:Running the Pipeline
Basic Run
With Vector Store
Incremental Ingestion
Cache nodes to avoid reprocessing:Metadata Extractors
Enrich nodes with extracted metadata:TitleExtractor
Extract titles from content:SummaryExtractor
Generate summaries:QuestionsAnsweredExtractor
Extract potential questions:KeywordExtractor
Extract keywords:Custom Transformations
Create custom transformation components:Document Readers
Load documents from various sources:SimpleDirectoryReader
LlamaParseReader
Parallel Processing
Process documents in parallel:Error Handling
Progress Tracking
Complete Example
Best Practices
- Order transformations correctly: Parse → Extract metadata → Embed
- Use appropriate chunk sizes: 512-1024 for most use cases
- Cache for large datasets: Avoid reprocessing unchanged documents
- Extract relevant metadata: Improves retrieval quality
- Parallelize when possible: Speed up processing of large document sets
- Persist to vector stores: Enable distributed and scalable storage
- Monitor progress: Track ingestion for large batches