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 RerankFormFields Component

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

Overview

Concrete form fields for reranking model selection with top-K parameter and Zod validation schemas provided by the RAGFlow frontend.

Description

Exports RerankFormFields (combined rerank model selector with top-K slider), rerankFormSchema (Zod validation schema), topKSchema, and initialTopKValue. The rerank model field conditionally shows the top-K parameter only when a rerank model is selected.

Usage

Import these components when building retrieval configuration forms that include reranking model selection, such as chat and search application settings.

Code Reference

Source Location

Signature

export const topKSchema: ZodSchema;
export const initialTopKValue: { top_k: number };
export const rerankFormSchema: ZodObject;

export function RerankFormFields(): JSX.Element;

Import

import { RerankFormFields, rerankFormSchema, topKSchema } from '@/components/rerank';

I/O Contract

Inputs

Name Type Required Description
Form context react-hook-form Yes Must be within a FormProvider

Outputs

Name Type Description
rerankFormSchema ZodSchema Validation schema for rerank fields
Form values object rerank_id and top_k values

Usage Examples

import { RerankFormFields, rerankFormSchema } from '@/components/rerank';

const schema = z.object({
  ...rerankFormSchema.shape,
  // other fields
});

<FormProvider {...methods}>
  <RerankFormFields />
</FormProvider>

Related Pages

Page Connections

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