This page provides definitions and technical pointers for codebase-specific terms, domain concepts, and architectural jargon used within RAGFlow.
The RAGFlow glossary serves as a reference for onboarding engineers to understand the specific nomenclature used in the Python backend, the Go server, and the React frontend. It bridges high-level RAG (Retrieval-Augmented Generation) concepts with their specific implementations in the rag/, api/, and agent/ directories.
The core architectural pattern of the system. It involves retrieving relevant document chunks from a data store to provide context for a Large Language Model (LLM) to generate grounded responses README.md78
A logical collection of documents belonging to a tenant. In the code, this is often referred to as Knowledgebase or KB.
KnowledgebaseService api/db/services/knowledgebase_service.py35Knowledgebase api/db/db_models.py26datasetsHandler in the Go router internal/router/router.go31The process of breaking down a document into smaller, searchable units. RAGFlow uses various parsers based on document structure.
ParserType common/constants.py76FACTORY in task_executor.py maps parser types (e.g., naive, paper, book, qa, laws) to specific implementation modules rag/svr/task_executor.py114-131The process of converting text chunks into numerical vectors. These vectors are stored in a document store for similarity search.
Base embedding class rag/llm/embedding_model.py145DEFAULT_MAX_TOKENS rag/llm/embedding_model.py44A second-stage retrieval process where a specialized model (Reranker) scores the relevance of retrieved chunks against the query to improve precision.
Base rerank class rag/llm/rerank_model.py28A configuration object that defines how a chat behaves, including which datasets it searches, which LLM it uses, and its system prompt.
DialogService api/db/services/dialog_service.py140-141Dialog api/db/db_models.py32A specific instance of an interaction between a user and a Dialog or Agent. It maintains the message history.
ConversationService api/db/services/conversation_service.py26 (referenced in api/db/services/dialog_service.py178-183)The top-level entity for multi-tenancy. All datasets, documents, and LLM configurations are scoped to a tenant_id.
LLMBundle api/db/services/llm_service.py79get_tenant_default_model_by_type retrieves tenant-specific LLM settings api/db/joint_services/tenant_model_service.py82The background worker process that handles heavy lifting like document parsing, embedding, and GraphRAG indexing. It consumes tasks from Redis Streams.
set_progress() updates task status and handles cancellation rag/svr/task_executor.py189-210dataflow, raptor, memory to PipelineTaskType rag/svr/task_executor.py133-147A feature for AI agents to persist information across sessions, categorized into types like raw, semantic, episodic, and procedural.
handle_save_to_memory_task api/db/joint_services/memory_message_service.py44PipelineTaskType.MEMORY rag/svr/task_executor.py138This diagram shows how user-facing concepts in the UI/Docs map to specific classes and database models in the backend.
Concept Mapping Diagram
Sources: api/db/db_models.py25-32 api/db/services/knowledgebase_service.py35 api/db/services/dialog_service.py140-141 api/db/services/document_service.py42-43
Mapping the lifecycle of a document upload from the "Natural Language Space" (User Action) to the "Code Entity Space" (Background Processing).
Task Lifecycle Diagram
Sources: rag/svr/task_executor.py114-131 rag/svr/task_executor.py189-210 api/db/services/document_service.py42-43 api/db/services/task_service.py80-81 common/constants.py103 docs/references/http_api_reference.md42
| Abbreviation | Full Name | Description | Code Pointer |
|---|---|---|---|
| DSL | Domain Specific Language | The JSON representation of an agent workflow graph. | agent/canvas.py29 |
| MCP | Model Context Protocol | Protocol for connecting LLMs to external data and tools. | internal/router/router.go45-46 |
| RAPTOR | Recursive Abstractive Processing... | A tree-organized retrieval method for long documents. | rag/svr/task_executor.py48-56 |
| OCR | Optical Character Recognition | Used in document parsing to extract text from images or PDFs. | rag/svr/task_executor.py125 |
| KG | Knowledge Graph | Graph-based parsing and retrieval strategy. | rag/svr/task_executor.py129 |
| ReAct | Reasoning and Acting | A prompting strategy for agents to use tools iteratively. | rag/llm/chat_model.py59-61 |
| TTS | Text To Speech | Model type for generating audio from text. | rag/llm/chat_model.py37 |
| SVR | Server | Prefix used for internal consumer groups or services. | common/constants.py103 |
Sources: rag/llm/embedding_model.py145-151 rag/svr/task_executor.py48-141 agent/canvas.py29 rag/llm/chat_model.py59-61 internal/router/router.go45-46 common/constants.py103
Refresh this wiki
This wiki was recently refreshed. Please wait 4 days to refresh again.