import SimilaritySlider from '@/components/similarity-slider'; import { DeleteOutlined, HistoryOutlined } from '@ant-design/icons'; import { Button, Card, Divider, Flex, Form, Input, Slider, Space, Tag, } from 'antd'; import { FormInstance } from 'antd/lib'; import styles from './index.less'; const list = [1, 2, 3]; 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 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;