Skip to main content

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

  1. Order transformations correctly: Parse → Extract metadata → Embed
  2. Use appropriate chunk sizes: 512-1024 for most use cases
  3. Cache for large datasets: Avoid reprocessing unchanged documents
  4. Extract relevant metadata: Improves retrieval quality
  5. Parallelize when possible: Speed up processing of large document sets
  6. Persist to vector stores: Enable distributed and scalable storage
  7. Monitor progress: Track ingestion for large batches

See Also