Principle:Hpcaitech ColossalAI Document Loading
| Knowledge Sources | |
|---|---|
| Domains | RAG, Data_Engineering |
| Last Updated | 2026-02-09 00:00 GMT |
Overview
A multi-format document ingestion pattern that loads various file types into a unified Document representation for downstream processing in RAG pipelines.
Description
Document Loading abstracts the complexity of reading different file formats (PDF, CSV, JSON, HTML, Markdown, TXT) into a common Document object containing text content and metadata. This is the entry point for the RAG pipeline, converting heterogeneous data sources into processable text.
Usage
Use this as the first step in any RAG application to ingest user documents.
Theoretical Basis
The loading pattern uses format-specific loaders dispatched by file extension:
- .pdf -> PyPDFLoader
- .csv -> CSVLoader
- .json/.jsonl -> JSONLoader with JQ schema
- .html -> UnstructuredHTMLLoader
- .md -> UnstructuredMarkdownLoader
- .txt -> TextLoader