Skip to main content
The XpertAI Knowledge Base comes with a powerful recall testing feature that simulates real user query scenarios. By entering keywords or questions, you can evaluate the recall quality of the knowledge base. The system automatically retrieves indexed content chunks and sorts them by similarity score. Generally, the higher the match between the question and the content chunk, the closer the AI model’s answer will be to the original document’s meaning, reflecting better “knowledge recall” performance. You can freely switch between different retrieval methods and parameter configurations to intuitively assess the relevance and coverage of recall results. XpertAI’s knowledge base uses a unified chunk tree structure, so all tests are based on parent-child hierarchical semantic recall logic.

General Testing Mode

Enter common user questions or keywords in the source text input box and click the Test button to view the matched content chunks in the Recall Results Area on the right.
  • Each content chunk displays a similarity score in the upper right corner, indicating how well it matches the question.
  • Higher scores mean stronger semantic relevance between the chunk and the question.
  • Click a content chunk to view its details and source in the document.
Document source information is shown below each recall result, helping you judge whether the chunking is reasonable and the semantic boundaries are clear.

Parent-Child Structure Testing Mode

XpertAI’s knowledge base uses a tree-structured chunking approach. When recalling a child chunk, its parent context is also brought in to provide the AI model with more complete semantic information. During testing:
  • After the user enters a question, the system first matches the most relevant child chunk;
  • Then it automatically traces back to its parent chunk, integrating the context for display;
  • The match score is shown in the upper right corner to measure how well the hit segment matches the question.
Clicking the source in the recall result lets you view the original content directly. On the details page, the left side shows the parent chunk information, and the right side shows the matched child chunk. The system may hit multiple child nodes, each with its own match score, making it easy for developers to analyze chunking rationality and recall performance.

Query Records and Application Calls

In the Records panel, you can view the history of recall test queries. If the knowledge base is linked to a digital expert or other AI application, queries triggered within the application will also be displayed here, making it easy to track recall logs and effectiveness in one place. When intelligent filtering is enabled, authorized users can also inspect the fixed, test, and agent-generated filters; the effective filter; candidate document and chunk counts; final hits; vector backend; and stage timing. Logs do not contain document body text, and access follows knowledge base permissions.

Adjusting Text Retrieval Methods

Click the retrieval configuration icon in the upper right corner of the input box to switch the retrieval method and parameters for the current knowledge base. The modified settings only apply to the current recall test, allowing developers to compare the effects of different retrieval strategies. To make global changes, go to “Knowledge Base Settings > Retrieval Settings” to save.

Compare GraphRAG retrieval modes

When GraphRAG is enabled and its status is Ready, run the same relationship-oriented question in all three modes:
  • Vector checks whether chunk semantics alone find the right source;
  • Graph checks seed-entity matching, neighborhood expansion, and evidence-backed chunk recall;
  • Hybrid checks whether combining vector and graph scores improves ranking.
Review matched entities and relationships as well as the returned chunks and citations. If Graph misses the expected source, inspect the visual graph before increasing Entity Top K or Neighbor Hops—the entity, relationship, or evidence may be absent from the index. See Knowledge Graph and GraphRAG.

Testing structured filters

The recall test panel accepts typed conditions for the current test. Test conditions are combined with system boundaries and fixed filters using AND; they cannot expand the scope granted by the agent binding. Test these cases separately:
  1. Fixed filter only: confirm that results remain inside the administrator-defined scope when no dynamic filter is supplied.
  2. System fields: combine file name, logical folder, extension, and MIME type.
  3. Business metadata: verify document-scoped and chunk-scoped fields produce the intended candidates.
  4. Zero hits: confirm that the server does not automatically broaden a valid filter.
  5. Invalid conditions: verify that unknown fields, wrong value types, and unsupported operators show a structured reason.
  6. Disabled content: confirm that disabled documents and chunks never appear.
For example, with a fixed “water resources + effective document” boundary, add document.fileExtension = pdf and metadata.effectiveYear = 2025, then verify that every hit, chunk, and citation satisfies the conditions.

Testing a folder boundary

  1. Add document.folderPath as a test condition.
  2. Choose equals to test only one folder, or is under to include all of its descendants.
  3. Select the folder from the value list. The panel submits the canonical logical path, such as Water Resources/East China; do not copy a storage filePath.
  4. Run the test and inspect the candidate document count, candidate chunk count, and effective filter in diagnostics.
The root option represents an empty logical folder path. Folder paths have no leading or trailing slash, although is under normalizes those slashes when validating API input. See Intelligent Retrieval Filtering for the field catalog, operators, and agent behavior.
  1. Prepare a test set: Design a set of test questions covering common user scenarios to ensure diversity.
  2. Validate retrieval boundaries: Confirm fixed filters and disabled-content rules before testing conditions an agent may generate.
  3. Choose a retrieval strategy: Intelligent filtering currently applies to Vector mode; select a vector backend that fits the deployment.
  4. Tune parameters: Adjust the number of recalls (TopK) and similarity threshold (Score) to balance recall relevance and completeness.
  5. Inspect diagnostics: Monitor candidate counts, zero-hit rate, filter latency, and dynamic-filter fallback reasons.

Explanation of TopK and Score Parameters

  • TopK: The maximum number of content chunks to recall, sorted by similarity score in descending order.
    • Smaller values: More concise recall, but may miss some relevant segments.
    • Larger values: More comprehensive recall, but may include less relevant segments, affecting final answer quality.
  • Score (Recall Threshold): Sets the minimum similarity score allowed for recall.
    • Lower values: Looser recall, including more low-relevance content.
    • Higher values: Stricter recall, retaining only highly relevant segments, but may miss marginal information.
By dynamically adjusting these two parameters, you can quickly find the best retrieval configuration for the specific content and business semantics of your knowledge base.
Summary Recall testing in XpertAI is not only a key tool for verifying knowledge base quality, but also an important means to optimize the knowledge pipeline and improve AI answer accuracy. With recall logs, parent-child hierarchical structure, and retrieval parameter tuning, teams can iteratively improve knowledge base quality in a visual and verifiable way, making every answer closer to real business semantics.