import SimilaritySlider from '@/components/similarity-slider'; import { Button, Card, Divider, Flex, Form, Input, Slider, Tag } from 'antd'; import { FormInstance } from 'antd/lib'; import { useOneNamespaceEffectsLoading } from '@/hooks/storeHooks'; import styles from './index.less'; type FieldType = { similarity_threshold?: number; vector_similarity_weight?: number; top_k?: number; question: string; }; interface IProps { form: FormInstance; handleTesting: () => Promise; } const TestingControl = ({ form, handleTesting }: IProps) => { const question = Form.useWatch('question', { form, preserve: true }); const loading = useOneNamespaceEffectsLoading('testingModel', [ 'testDocumentChunk', ]); const buttonDisabled = !question || (typeof question === 'string' && question.trim() === ''); return (
Retrieval testing

Final step! After success, leave the rest to Infiniflow AI.

label="Top K" name={'top_k'} tooltip="For the computaion cost, not all the retrieved chunk will be computed vector cosine similarity with query. The bigger the 'Top K' is, the higher the recall rate is, the slower the retrieval speed is." > name={'question'} rules={[ { required: true, message: 'Please input your question!' }, ]} > 10/200
{/*
Test history
{list.map((x) => ( {x}
content dcjsjl snldsh svnodvn svnodrfn svjdoghdtbnhdo sdvhodhbuid sldghdrlh
time
))}
*/}
); }; export default TestingControl;