Dosu LogoDosu Logo
Ask
Join our Discord
ragflowPublic
InfiniFlow
Documentsragflow
Dataset Parsing Mode
Dataset Parsing Mode
Type
Topic
Status
Published
Created
Jul 27, 2026
Updated
Jul 27, 2026

Dataset Parsing Mode (BuiltIn vs Pipeline)#

Overview#

Every RAGFlow dataset has a parse_type that selects one of two mutually exclusive document-ingestion paths:

ParseTypeValueWhat happens
BuiltIn1Documents are processed by one of RAGFlow's built-in chunk-method parsers (naive, paper, book, etc.)
Pipeline2Documents are routed through a custom DataFlow Canvas pipeline (File → Parser → Chunker → Indexer) identified by pipeline_id

The enum is defined in web/src/constants/knowledge.ts.


How parse_type Controls the UI#

The dataset settings page (web/src/pages/dataset/dataset-setting/index.tsx) watches parse_type via useWatch and conditionally renders two entirely different configuration panels :

  • ParseType.BuiltIn: Shows the ChunkMethodItem dropdown (to pick a chunk method) and the ChunkMethodForm (the per-method configuration panel). A "Learn More" sidebar also appears.
  • ParseType.Pipeline: Hides chunk-method fields entirely and shows DataFlowSelect — a searchable dropdown that lets the user attach any existing DataFlow Canvas pipeline via pipeline_id.

Switching modes triggers a side-effect :

  • Switching to BuiltIn clears pipeline_id.
  • Switching to Pipeline resets chunk_method back to DocumentParserType.Naive (default).

The toggle itself is rendered by ParseTypeItem — a radio group with two options labeled "Built-In" and "Manual Setup" (i18n keys builtIn / manualSetup).


BuiltIn Mode: Chunk Methods#

When parse_type === BuiltIn, the active chunk_method is read from DocumentParserType, which maps to 14 parser slugs:

naive, qa, resume, manual, table, paper, book, laws, presentation, picture, one, audio, email, tag, knowledge_graph

ChunkMethodForm dispatches to a per-method configuration component via ConfigurationComponentMap (in chunk-method-form.tsx). See the Dataset Configuration UI article for the full dispatch table and per-method field breakdown.

The default is DocumentParserType.Naive .


Pipeline Mode: DataFlow Canvas#

When parse_type === Pipeline, the form field pipeline_id stores the ID of a DataFlow Canvas agent. DataFlowSelect (in web/src/components/data-pipeline-select/) fetches available pipelines via the /agents endpoint filtered by canvas_category: AgentCategory.DataflowCanvas.

A pipeline executes a fixed linear chain: File → Parser → Chunker → Indexer. See the Pipeline Canvas Architecture article for runtime details.


Backend Behavior#

parse_type is a request-only field — it is used at API validation time but is not persisted to the database. The service layer explicitly deletes it before saving (in api/apps/dataset_api_service.py). What gets stored instead are:

  • parser_id — the chosen chunk method slug (e.g. "naive")
  • pipeline_id — the DataFlow Canvas ID (nullable)

The API validation model (CreateDatasetReq) enforces mutual exclusivity: if chunk_method (i.e. parser_id) is provided, pipeline_id must be absent, and vice versa. If neither is present, the system defaults to chunk_method="naive".

The Knowledgebase and Document DB models both carry parser_id and pipeline_id fields, allowing per-document overrides at the document level as well.


Zod Form Validation#

The frontend enforces the same mutual-exclusivity constraint in formSchema (Zod): a superRefine validator requires a non-empty pipeline_id when parse_type === Pipeline, and requires a valid chunk_method otherwise.


Key Source Files#

FileRole
web/src/constants/knowledge.tsParseType enum definition
web/src/pages/dataset/dataset-setting/index.tsxSettings page: parse_type watcher, conditional rendering
web/src/components/parse-type-form-field.tsxParseTypeItem radio toggle
web/src/components/data-pipeline-select/index.tsxDataFlowSelect pipeline picker
web/src/pages/dataset/dataset-setting/form-schema.tsZod validation schema
api/apps/dataset_api_service.pyDrops parse_type before DB write; stores parser_id / pipeline_id

Related articles:

  • Dataset Configuration UI — chunk method dispatch and per-method form components
  • Pipeline Canvas Architecture — DataFlow Pipeline runtime, components, and execution model
Documents
Agent Import and DSL Compatibility
Agent Retrieval
API Authorization
Ascend Inference Pipeline
Authentication
Canvas Architecture
Chat Assistant Configuration
Chat Completion API
Chunk Metadata Extraction
Chunker Pipeline
Compilation Template Management
Component Variable Propagation
Connection and Resource Management
Connector Architecture
Connector Document Sync
Conversation Session Management
What is the complete API flow for building a frontend UI with RAGFlow, covering dialogs, conversations, message history, streaming responses, and deletion?
Database Migrations
Dataflow Pipeline Execution
Dataset Access Control
Dataset Configuration UI
Dataset Parsing Mode
DeepDoc Module
Dify External Knowledge Integration
Docker Build Configuration
Document Parsing Pipeline
Elasticsearch Index Management
Encrypted Storage
GPU and Accelerator Support
Hybrid Search and Retrieval
Infinity Database Stability
Internal Compilation Artifact Indexing
Keyword Extraction
Knowledge Compilation Pipeline
Knowledge Graph
Knowledge Graph Retrieval
Knowledge Graph Visualization
Layout Element Overlap Detection
LLM Driver Integration
LLM Provider Integration
MCP Server Integration
Metadata Filtering
MinerU Configuration and Provider Resolution
Model Provider Architecture
Model Selection UI
Model Thinking and Reasoning
Multi-Backend Object Storage
OCR Backend and Model Loading
Parser Configuration
Parser Output Lifecycle
Parser-Chunk Contract
Picture Chunker Media Processing
Pipeline Canvas Architecture
Python Dependency Management
RAGFlow Python SDK
Redis Cache Architecture
Retrieval API
Retrieval Pipeline
SSRF Protection
Table Column Field Normalization
Table Structure Parsing
Task Cancellation
Tenant Model Resolution
Text2SQL
TSR Coordinate System Alignment