Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Infiniflow Ragflow TestingResult Component

From Leeroopedia
Knowledge Sources
Domains Frontend, Knowledge_Base
Last Updated 2026-02-12 06:00 GMT

Overview

Test retrieval results display with similarity score rendering, document file filtering, and pagination.

Description

TestingResult renders retrieved chunks with three similarity scores per chunk (Hybrid, Term, Vector) via ChunkTitle, which formats each score as a percentage. Results are displayed in scrollable FormContainer cards. A FilterPopover allows filtering by document (doc_ids) using doc_aggs from the response data. RAGFlowPagination provides pagination. The component handles three states: results found, no results after search (with isRuned distinction for messaging), and loading. Similarity scores are computed as (value * 100).toFixed(2) and labels are resolved via camelCase translation keys.

Usage

Rendered alongside TestingForm on the dataset testing page to display chunk retrieval results and their relevance scores.

Code Reference

Source Location

Signature

export function TestingResult({
  filterValue, handleFilterSubmit, page, pageSize,
  onPaginationChange, data, loading,
}: TestingResultProps): JSX.Element;

Import

import { TestingResult } from './testing-result';

I/O Contract

Inputs

Name Type Required Description
data object Yes Retrieval response with chunks, doc_aggs, total, isRuned
filterValue object Yes Current filter state
handleFilterSubmit function Yes Filter change callback
page number Yes Current page
pageSize number Yes Items per page
onPaginationChange function Yes Page change callback
loading boolean Yes Loading state

Outputs

Name Type Description
JSX.Element React element Results list with scores, filters, pagination, or empty state

Usage Examples

<TestingResult
  data={testData}
  filterValue={filterValue}
  handleFilterSubmit={handleFilter}
  page={page}
  pageSize={pageSize}
  onPaginationChange={onPageChange}
  loading={loading}
/>

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment