RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.
Go agent-harnessagent-native-databaseagentic-aiagentic-retrievalagentic-searchaiai-agentscontext-enginecontext-engineeringcontext-managementharness-engineeringknowledge-compilationragretrieval-augmented-generationretrieval-harnesssearch-harness
Fix: UI Placeholder and Hint Optimization (#13416)
chanx8b534c895ee0
diff --git a/web/src/components/cross-language-form-field.tsx b/web/src/components/cross-language-form-field.tsxindex 8855112e5e..17c52eb379 100644--- a/web/src/components/cross-language-form-field.tsx+++ b/web/src/components/cross-language-form-field.tsx@@ -60,7 +60,7 @@ export const CrossLanguageFormField = ({<FormControl><MultiSelectoptions={crossLanguageOptions}- placeholder={t('fileManager.pleaseSelect')}+ placeholder={t('chat.crossLanguagePlaceholder')}maxCount={100}{...field}onValueChange={field.onChange}diff --git a/web/src/components/knowledge-base-item.tsx b/web/src/components/knowledge-base-item.tsxindex 35df932f6b..9ced7bfc26 100644--- a/web/src/components/knowledge-base-item.tsx+++ b/web/src/components/knowledge-base-item.tsx@@ -127,7 +127,7 @@ export function KnowledgeBaseFormField({onValueChange={(value) => {handleDatasetSelectChange(value, field.onChange);}}- placeholder={t('chat.knowledgeBasesMessage')}+ placeholder={t('chat.knowledgeBasesPlaceholder')}variant="inverted"maxCount={100}defaultValue={field.value}diff --git a/web/src/components/parse-configuration/raptor-form-fields.tsx b/web/src/components/parse-configuration/raptor-form-fields.tsxindex 110493009f..cbc6b9cbfa 100644--- a/web/src/components/parse-configuration/raptor-form-fields.tsx+++ b/web/src/components/parse-configuration/raptor-form-fields.tsx@@ -227,7 +227,10 @@ const RaptorFormFields = ({render={({ field }) => (<FormItem className=" items-center space-y-0 "><div className="flex items-center">- <FormLabel className="text-sm whitespace-wrap w-1/4">+ <FormLabel+ className="text-sm whitespace-wrap w-1/4"+ tooltip={t('randomSeedTip')}+ >{t('randomSeed')}</FormLabel><div className="w-3/4">diff --git a/web/src/components/rerank.tsx b/web/src/components/rerank.tsxindex 808940bace..4d395ca234 100644--- a/web/src/components/rerank.tsx+++ b/web/src/components/rerank.tsx@@ -39,6 +39,7 @@ function RerankFormField() {<FormControl><SelectWithSearchallowClear+ placeholder={t('rerankPlaceholder')}{...field}options={options}></SelectWithSearch>diff --git a/web/src/locales/en.ts b/web/src/locales/en.tsindex 2dc113b951..6b392c61c6 100644--- a/web/src/locales/en.ts+++ b/web/src/locales/en.ts@@ -4,7 +4,7 @@ export default {confirm: 'Confirm',back: 'Back',noResults: 'No results found',- selectPlaceholder: 'select value',+ selectPlaceholder: 'Select value',selectAll: 'Select all',delete: 'Delete',deleteModalTitle: 'Are you sure to delete it ?',@@ -172,6 +172,7 @@ Procedural Memory: Learned skills, habits, and automated procedures.`,action: 'Action',},config: {+ descriptionPlaceholder: 'Describe your memory',memorySizeTooltip: `Accounts for each message's content + its embedding vector (≈ Content + Dimensions × 8 Bytes).Example: A 1 KB message with 1024-dim embedding uses ~9 KB. The 5 MB default limit holds ~500 such messages.`,avatar: 'Avatar',@@ -390,7 +391,7 @@ Example: A 1 KB message with 1024-dim embedding uses ~9 KB. The 5 MB default limcancel: 'Cancel',close: 'Close',rerankModel: 'Rerank model',- rerankPlaceholder: 'Please select',+ rerankPlaceholder: 'Select value',rerankTip: `Optional. If left empty, RAGFlow will use a combination of weighted keyword similarity and weighted vector cosine similarity; if a rerank model is selected, a weighted reranking score will replace the weighted vector cosine similarity. Please be aware that using a rerank model will significantly increase the system's response time. If you wish to use a rerank model, ensure you use a SaaS reranker; if you prefer a locally deployed rerank model, ensure you start RAGFlow with docker-compose-gpu.yml.`,topK: 'Top-K',topKTip: `Used together with the Rerank model, this setting defines the number of text chunks to be sent to the specified reranking model.`,@@ -437,6 +438,10 @@ Example: A 1 KB message with 1024-dim embedding uses ~9 KB. The 5 MB default limreRankModelWaring: 'Re-rank model is very time consuming.',},knowledgeConfiguration: {+ randomSeedTip:+ 'Seed is the starting point for a pseudo-random algorithm that ensures reproducibility of the same output across different runs.',+ datasetDescription: 'Describe your dataset',+ overlappedPercentTip: 'The overlapped percent between two nearby chunks',globalIndexModelTip:'Used to generate Knowledge graphs, RAPTOR, auto-metadata, auto-keyword and auto-question. Model performance will affects generation quality.',globalIndexModel: 'Indexing model',@@ -772,16 +777,26 @@ This auto-tagging feature enhances retrieval by adding another layer of domain-sassistantAvatar: 'Assistant avatar',language: 'Language',emptyResponse: 'Empty response',+ emptyResponsePlaceholder:+ 'The answer you are looking for is not found in the dataset!',emptyResponseTip: `Set this as a response if no results are retrieved from the knowledge bases for your query, or leave this field blank to allow the LLM to improvise when nothing is found.`,emptyResponseMessage: `Empty response will be triggered when nothing relevant is retrieved from knowledge bases. You must clear the 'Empty response' field if no knowledge base is selected.`,setAnOpener: 'Opening greeting',setAnOpenerInitial: `Hi! I'm your assistant. What can I do for you?`,setAnOpenerTip: 'Set an opening greeting for users.',knowledgeBases: 'Datasets',+ knowledgeBasesPlaceholder: 'Select value',knowledgeBasesMessage: 'Please select',knowledgeBasesTip:'Select the datasets to associate with this chat assistant. An empty knowledge base will not appear in the dropdown list.',system: 'System prompt',+ systemPlaceholder: `You are an intelligent assistant. Your primary function is to answer questions based strictly on the provided knowledge base.++**Essential Rules:**+ - Your answer must be derived **solely** from this dataset: {knowledge}.+ - **When information is available**: Summarize the content to give a detailed answer.+ - **When information is unavailable**: Your response must contain this exact sentence: "The answer you are looking for is not found in the knowledge base!"+ - **Always consider** the entire conversation history.`,systemInitialValue: `You are an intelligent assistant. Your primary function is to answer questions based strictly on the provided knowledge base.**Essential Rules:**@@ -879,7 +894,7 @@ This auto-tagging feature enhances retrieval by adding another layer of domain-s'This optimizes user queries using context in a multi-round conversation. When enabled, it will consume additional LLM tokens.',howUseId: 'How to use chat ID?',description: 'Description of assistant',- descriptionPlaceholder: 'e.g. A chat assistant for resume.',+ descriptionPlaceholder: "I'm a chat assistant.",useKnowledgeGraph: 'Use knowledge graph',useKnowledgeGraphTip:'Whether to use knowledge graph(s) in the specified knowledge base(s) during retrieval for multi-hop question answering. When enabled, this would involve iterative searches across entity, relationship, and community report chunks, greatly increasing retrieval time.',@@ -897,6 +912,7 @@ This auto-tagging feature enhances retrieval by adding another layer of domain-stavilyApiKeyMessage: 'Please enter your Tavily API Key',tavilyApiKeyHelp: 'How to get it?',crossLanguage: 'Cross-language search',+ crossLanguagePlaceholder: 'Select value',crossLanguageTip: `Select one or more languages for cross‑language search. If no language is selected, the system searches with the original query.`,createChat: 'Create chat',metadata: 'Meta data',diff --git a/web/src/locales/zh.ts b/web/src/locales/zh.tsindex 020abcc4fa..8326a673d1 100644--- a/web/src/locales/zh.ts+++ b/web/src/locales/zh.ts@@ -142,6 +142,7 @@ export default {action: '操作',},config: {+ descriptionPlaceholder: '描述你的记忆',memorySizeTooltip: `记录每条消息的内容 + 其嵌入向量(≈ 内容 + 维度 × 8 字节)。例如:一条带有 1024 维嵌入的 1 KB 消息大约使用 9 KB。5 MB 的默认限制大约可容纳 500 条此类消息。`,avatar: '头像',@@ -386,6 +387,10 @@ export default {theDocumentBeingParsedCannotBeDeleted: '正在解析的文档不能被删除',},knowledgeConfiguration: {+ randomSeedTip:+ '种子是伪随机算法的起点,它确保在不同运行中产生相同的输出,从而保证可重复性。',+ datasetDescription: '你的数据集描述。',+ overlappedPercentTip: '相邻两个块之间的重叠百分比',settings: '设置',autoMetadataTip:'自动生成元数据。适用于解析新文件。现有文件需要重新解析才能更新(chunk将保留)。请注意,配置中指定的索引模型将消耗额外的 Token。',@@ -698,17 +703,26 @@ General:实体和关系提取提示来自 GitHub - microsoft/graphrag:基于assistantAvatar: '助理头像',language: '语言',emptyResponse: '空回复',+ emptyResponsePlaceholder: '在数据集中未找到您要寻找的答案!',emptyResponseTip: `如果在知识库中没有检索到用户的问题,它将使用它作为答案。 如果您希望 LLM 在未检索到任何内容时提出自己的意见,请将此留空。`,emptyResponseMessage: `当知识库中未检索到任何相关信息时,将触发空响应。由于未选择任何知识库,因此请清除“空响应”。`,setAnOpener: '设置开场白',setAnOpenerInitial: `你好! 我是你的助理,有什么可以帮到你的吗?`,setAnOpenerTip: '您想如何欢迎您的客户?',knowledgeBases: '知识库',+ knowledgeBasesPlaceholder: '请选择',knowledgeBasesMessage: '请选择',knowledgeBasesTip:'选择关联的知识库。新建或空知识库不会在下拉菜单中显示。',system: '系统提示词',- systemInitialValue: `你是一个智能助手,请总结知识库的内容来回答问题,请列举知识库中的数据详细回答。当所有知识库内容都与问题无关时,你的回答必须包括“知识库中未找到您要的答案!”这句话。回答需要考虑聊天历史。+ systemPlaceholder: `你是一个智能助手,主要功能是基于提供的知识库严格回答问题。++**重要规则:**+ - 你的回答必须**仅**来自此数据集:{knowledge}。+ - **当信息可用时**: 总结内容以给出详细答案。+ - **当信息不可用时**: 你的回答必须包含这句确切的话:"在知识库中未找到您要的答案!"+ - **始终考虑**整个对话历史。`,+ systemInitialValue: `你是一个智能助手,请总结知识库的内容来回答问题,请列举知识库中的数据详细回答。当所有知识库内容都与问题无关时,你的回答必须包括"知识库中未找到您要的答案!"这句话。回答需要考虑聊天历史。以下是知识库:{knowledge}以上是知识库。`,@@ -802,8 +816,7 @@ General:实体和关系提取提示来自 GitHub - microsoft/graphrag:基于'在多轮对话时,对查询问题根据上下文进行优化。会调用大模型额外消耗 token。',howUseId: '如何使用聊天ID?',description: '助理描述',- descriptionPlaceholder:- '例如 你是一个专业的简历助手,只能回答简历的问题。',+ descriptionPlaceholder: '我是一个聊天助手。',useKnowledgeGraph: '使用知识图谱',useKnowledgeGraphTip:'是否检索与所选知识库对应的知识图谱相关文本块,以处理复杂的多跳问题?这一过程将涉及对实体、关系和社区报告文本块的多次检索,会显著延长检索时间。',@@ -817,6 +830,7 @@ General:实体和关系提取提示来自 GitHub - microsoft/graphrag:基于tavilyApiKeyMessage: '请输入你的 Tavily API Key',tavilyApiKeyHelp: '如何获取?',crossLanguage: '跨语言搜索',+ crossLanguagePlaceholder: '请选择',crossLanguageTip: `选择一种或多种语言进行跨语言搜索。如果未选择任何语言,系统将使用原始查询进行搜索。`,metadata: '元数据',metadataTip:diff --git a/web/src/pages/dataset/dataset-setting/components/tag-item.tsx b/web/src/pages/dataset/dataset-setting/components/tag-item.tsxindex 42d7b699e3..b487bd63e6 100644--- a/web/src/pages/dataset/dataset-setting/components/tag-item.tsx+++ b/web/src/pages/dataset/dataset-setting/components/tag-item.tsx@@ -60,7 +60,7 @@ export const TagSetItem = () => {<MultiSelectoptions={knowledgeOptions}onValueChange={field.onChange}- placeholder={t('chat.knowledgeBasesMessage')}+ // placeholder={t('chat.knowledgeBasesMessage')}variant="inverted"maxCount={10}{...field}diff --git a/web/src/pages/dataset/dataset-setting/configuration/common-item.tsx b/web/src/pages/dataset/dataset-setting/configuration/common-item.tsxindex 66ad986f93..fca3070e0c 100644--- a/web/src/pages/dataset/dataset-setting/configuration/common-item.tsx+++ b/web/src/pages/dataset/dataset-setting/configuration/common-item.tsx@@ -370,6 +370,7 @@ export function OverlappedPercent() {percentage={true}name="parser_config.overlapped_percent"label={t('knowledgeConfiguration.overlappedPercent')}+ tooltip={t('knowledgeConfiguration.overlappedPercentTip')}max={0.3}step={0.01}sliderTestId="ds-settings-parser-overlapped-percent-slider"diff --git a/web/src/pages/dataset/dataset-setting/general-form.tsx b/web/src/pages/dataset/dataset-setting/general-form.tsxindex 0d1a772103..1f214ba2f4 100644--- a/web/src/pages/dataset/dataset-setting/general-form.tsx+++ b/web/src/pages/dataset/dataset-setting/general-form.tsx@@ -99,7 +99,7 @@ export function GeneralForm() {render={({ field }) => {// null initialize empty stringif (typeof field.value === 'object' && !field.value) {- form.setValue('description', ' ');+ form.setValue('description', '');}return (<FormItem className="items-center space-y-0">@@ -110,6 +110,7 @@ export function GeneralForm() {<FormControl className="w-3/4"><Input{...field}+ placeholder={t('knowledgeConfiguration.datasetDescription')}data-testid="ds-settings-basic-description-input"></Input></FormControl>diff --git a/web/src/pages/memory/memory-setting/basic-form.tsx b/web/src/pages/memory/memory-setting/basic-form.tsxindex 0ba3168b21..3ffb47218c 100644--- a/web/src/pages/memory/memory-setting/basic-form.tsx+++ b/web/src/pages/memory/memory-setting/basic-form.tsx@@ -46,7 +46,12 @@ export const BasicInfo = () => {// labelClassName={labelClassName || field.labelClassName}>{(field) => {- return <Input {...field}></Input>;+ return (+ <Input+ {...field}+ placeholder={t('memory.config.descriptionPlaceholder')}+ ></Input>+ );}}</RAGFlowFormItem></>diff --git a/web/src/pages/next-chats/chat/app-settings/chat-basic-settings.tsx b/web/src/pages/next-chats/chat/app-settings/chat-basic-settings.tsxindex 76212fcc72..2900edb762 100644--- a/web/src/pages/next-chats/chat/app-settings/chat-basic-settings.tsx+++ b/web/src/pages/next-chats/chat/app-settings/chat-basic-settings.tsx@@ -66,6 +66,7 @@ export default function ChatBasicSetting() {<FormControl><Textarea{...field}+ placeholder={t('descriptionPlaceholder')}dir={getDirAttribute(descriptionValue || '')}></Textarea></FormControl>@@ -84,6 +85,7 @@ export default function ChatBasicSetting() {<FormControl><Textarea{...field}+ placeholder={t('emptyResponsePlaceholder')}dir={getDirAttribute(emptyResponseValue || '')}></Textarea></FormControl>diff --git a/web/src/pages/next-chats/chat/app-settings/chat-prompt-engine.tsx b/web/src/pages/next-chats/chat/app-settings/chat-prompt-engine.tsxindex 8f84f09097..a94b323e1f 100644--- a/web/src/pages/next-chats/chat/app-settings/chat-prompt-engine.tsx+++ b/web/src/pages/next-chats/chat/app-settings/chat-prompt-engine.tsx@@ -36,7 +36,7 @@ export function ChatPromptEngine() {<Textarea{...field}rows={8}- placeholder={t('messagePlaceholder')}+ placeholder={t('systemPlaceholder')}className="overflow-y-auto"dir={getDirAttribute(systemPromptValue || '')}/>