Implementation:Infiniflow Ragflow Knowledge Constants
| Knowledge Sources | |
|---|---|
| Domains | Frontend, Knowledge_Base, Configuration |
| Last Updated | 2026-02-12 06:00 GMT |
Overview
Concrete knowledge base enums and preset configuration values for chunk methods, parser types, and retrieval modes in the RAGFlow frontend.
Description
The constants/knowledge.ts module defines the ChunkMethod enum (naive, manual, qa, table, paper, book, laws, presentation, picture, one, knowledge_graph, tag, email, audio, resume), default parser configurations per chunk method, and retrieval mode constants.
Usage
Import these constants when building dataset configuration forms, parser selection UIs, or any feature that needs to reference available chunking methods and their default settings.
Code Reference
Source Location
- Repository: Infiniflow_Ragflow
- File: web/src/constants/knowledge.ts
- Lines: 1-97
Signature
export enum ChunkMethod {
Naive = 'naive',
Manual = 'manual',
QA = 'qa',
Table = 'table',
Paper = 'paper',
Book = 'book',
// ... additional methods
}
export const defaultParserConfig: Record<ChunkMethod, object>;
Import
import { ChunkMethod, defaultParserConfig } from '@/constants/knowledge';
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| — | — | — | Module-level constants; no inputs |
Outputs
| Name | Type | Description |
|---|---|---|
| ChunkMethod | enum | All available chunking method identifiers |
| defaultParserConfig | Record | Default config per chunk method |
Usage Examples
import { ChunkMethod, defaultParserConfig } from '@/constants/knowledge';
const config = defaultParserConfig[ChunkMethod.Naive];