> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xpertai.cn/llms.txt
> Use this file to discover all available pages before exploring further.

# Knowledge Base Overview

> Turn enterprise documents into manageable, searchable, and citable knowledge for agents.

XpertAI Knowledge Base turns enterprise documents, web pages, and business material into trusted knowledge that digital experts and workflows can use. It handles content extraction, chunking, embedding, structured filtering, retrieval, and citation so agent answers remain grounded in traceable source material.

A knowledge base can be exposed as a tool that an agent calls autonomously or as an explicit retrieval step in a workflow. One knowledge base can serve several business domains, while fixed and agent-generated filters on each agent-to-knowledge-base binding control the scope used for a particular application.

## Core capabilities

| Capability                                                                     | Product value                                                                                                                                              |
| ------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Multi-source ingestion                                                         | Upload PDF, DOCX, Markdown, TXT, HTML, XLSX, PPTX, CSV, and other files, or import content from web pages and knowledge pipelines.                         |
| Parsing and chunking                                                           | Clean content and create chunks with configurable strategies and parent-child context.                                                                     |
| PDF layout analysis and linked preview                                         | Extract pages, tables, images, formulas, and coordinates through document converter plugins, then navigate between source PDF regions and analysis blocks. |
| Semantic vector retrieval                                                      | Match the meaning of a question instead of relying only on identical keywords.                                                                             |
| Intelligent retrieval filtering                                                | Narrow Vector, Graph, or Hybrid candidates by file name, logical folder, file type, MIME type, and business metadata before ranking and merge.             |
| Typed metadata                                                                 | Define string, enum, number, datetime, boolean, array, and object fields at document or chunk scope.                                                       |
| Autonomous agent retrieval                                                     | Let agents decide when to search and generate request-specific conditions inside administrator-defined boundaries.                                         |
| [Knowledge Graph and GraphRAG](/en/ai/knowledge-base/knowledge-graph-graphrag) | Extract evidence-backed entities and relationships, explore and curate the graph, and convert graph discoveries into cited chunk retrieval.                |
| Testing, citations, and audit                                                  | Inspect retrieved chunks, source documents, effective filters, candidate counts, hit counts, and retrieval latency.                                        |
| Live maintenance                                                               | Apply file-name, logical-folder, and metadata changes to filtering without recomputing embeddings.                                                         |

## From document to grounded answer

1. **Ingest content**: upload files, scrape web pages, or connect business document sources through a knowledge pipeline.
2. **Parse and chunk**: extract and clean text, then create chunks suitable for retrieval.
3. **Embed and index**: use the configured embedding model and write vectors to the vector database.
4. **Constrain candidates**: apply access boundaries, enabled-content checks, fixed filters, and agent-generated filters.
5. **Explore relationships when useful**: for GraphRAG-enabled knowledge bases, let the agent discover entities and relations before forming the final retrieval query.
6. **Rank semantically**: rank the remaining chunks by vector similarity and apply TopK and score thresholds.
7. **Generate with citations**: pass the results to downstream models while preserving traceable document sources.

<img src="https://mintcdn.com/xpertai/CUk-Ab9Rv7YWeJmd/public/img/ai/rag_indexing.png?fit=max&auto=format&n=CUk-Ab9Rv7YWeJmd&q=85&s=2ddfab0b1b1e89f3ab49dfb39bb89465" alt="RAG indexing" width="2583" height="1299" data-path="public/img/ai/rag_indexing.png" />

## PDF processing and source linking

For scans, engineering manuals, contracts, and complex table PDFs, the Baidu PaddleOCR‑VL document converter can preserve paged layouts, tables, images, coordinates, and source maps. After processing, document details provide a side-by-side analysis preview: the original PDF and layout bounds appear on the left, while Markdown, structure, tables, images, and JSON appear on the right. Scrolling, active pages, and selected analysis blocks synchronize in both directions.

Baidu Unlimited‑OCR focuses on long-document Markdown extraction. MinerU supports both its official Precise Parsing API and self-hosted services, with OCR, formula, table, and VLM/pipeline options. The Pdfium **PDF to Markdown** tool lets an agent process a task attachment temporarily. See [PDF Processing and Linked Analysis Preview](/en/ai/knowledge-base/pdf-processing-and-preview) to choose and configure the appropriate capability.

## Intelligent filtering for multi-domain knowledge

When engineering, water-resources, logistics, and other material share one knowledge base, unrestricted semantic matching may retrieve similar but inapplicable content. XpertAI can apply structured conditions before vector search:

* administrators define **fixed filters** for a domain, project, folder, or document-status boundary that the agent cannot change;
* when **Allow agent automatic filtering** is enabled, the agent can infer a year, file format, region, or keyword from the question and add request-specific conditions;
* both layers are always combined with `AND`, so the agent can narrow but never bypass the fixed scope;
* if no reliable dynamic condition can be inferred, the agent omits it and still searches within the fixed scope.

For example, an administrator can constrain a quoting agent to “water resources + effective documents.” For “2025 PDF rate schedules,” the agent can additionally filter for `file extension = pdf`, `effective year = 2025`, and `file name contains rate schedule`.

See [Intelligent Retrieval Filtering](/en/ai/knowledge-base/intelligent-filtering) for fields, operators, configuration steps, runtime behavior, and the support matrix.

## Document and metadata management

XpertAI automatically maintains these system attributes:

* file name and logical knowledge base folder path;
* file extension and MIME type;
* document category and source type;
* creation and update timestamps.

Teams can define business fields in the metadata schema and supply typed values during upload, document editing, chunk editing, or bulk maintenance. Document-scoped fields apply to the whole document; chunk-scoped fields distinguish sections or content categories inside a document.

Renaming or moving a file and updating metadata refresh retrieval attributes without regenerating vectors, so day-to-day classification changes take effect quickly. See [Maintaining Documents](/en/ai/knowledge-base/maintain-documents).

## Ways to retrieve knowledge

| Method                             | Best for                                                                                                     |
| ---------------------------------- | ------------------------------------------------------------------------------------------------------------ |
| Agent knowledge base tool          | Letting an agent decide whether to search and whether a dynamic filter is useful.                            |
| Workflow Knowledge Retrieval node  | Running retrieval at an explicit point and passing chunks to model, decision, or formatting nodes.           |
| Project-shared knowledge           | Giving several project agents a consistent source for Q\&A, analysis, and content generation.                |
| Knowledgebase Workbench            | Browsing folders, previewing documents, asking questions, and tracing citations in one workspace.            |
| External knowledge base connection | Reusing services such as RAGFlow, Dify, or FastGPT. Available capabilities depend on the provider interface. |

See [Ways to Use the Knowledge Base](/en/ai/knowledge-base/ways-to-use-knowledge-base) and [Knowledgebase Workbench](/en/ai/knowledge-base/knowledge-workbench).

## Testing and observability

Recall testing validates queries, filters, TopK, and similarity thresholds before release. Debug views distinguish fixed, test, and agent-generated filters and show the effective filter, candidate documents, candidate chunks, final hits, backend, and timing.

Retrieval log access follows knowledge base permissions, and logs do not contain document body text. Normal agent answers show only content and citations by default, not internal filtering decisions. See [Recall Test](/en/ai/knowledge-base/recall-test).

## Current support

Intelligent filtering supports **Vector**, **Graph**, and **Hybrid** retrieval. PGVector and Milvus are the supported vector branches; Milvus Server 2.6.2 or later is required. Graph applies the filter to seed eligibility, relationship expansion, and evidence chunks. Hybrid filters both branches before merge and can fall back only to its already-filtered Vector branch. Chroma and Weaviate still return an explicit unsupported error for new vector filter conditions; XpertAI never silently degrades to an unrestricted search.

## Recommended reading

1. [Maintain documents and metadata](/en/ai/knowledge-base/maintain-documents)
2. [Process and preview PDFs](/en/ai/knowledge-base/pdf-processing-and-preview)
3. [Build and use Knowledge Graph and GraphRAG](/en/ai/knowledge-base/knowledge-graph-graphrag)
4. [Configure intelligent retrieval filtering](/en/ai/knowledge-base/intelligent-filtering)
5. [Test recall](/en/ai/knowledge-base/recall-test)
6. [Choose a knowledge base usage pattern](/en/ai/knowledge-base/ways-to-use-knowledge-base)
7. [Create a knowledge base through a pipeline](/en/ai/knowledge-base/create-knowledge-base-via-pipeline/step-1-create-pipeline)
