Request the author's support to view the contents of the recall #5453

Closed
opened 2026-02-21 18:11:02 -05:00 by yindo · 4 comments
Owner

Originally created by @liulian3564 on GitHub (Sep 8, 2024).

Self Checks

  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

1. Is this request related to a challenge you're experiencing? Tell me about your story.

Does dify support viewing recalled content in rag scenarios? I added the corpus and asked the model some questions in the corpus, but the model still gave wrong answers. I want to know whether there was a problem in the retrieval or a problem in the generation, which requires me to check the contents recalled in the middle.This is the recall result from my experiment with flashrag, "intermediate_data.jsonl."
微信图片_20240908221117

2. Additional context or comments

I want to look at the results of the different model retrieval, as well as the results of generating the responses, and then explore why the hallucinations/answer errors occur.

3. Can you help us with this feature?

  • I am interested in contributing to this feature.
Originally created by @liulian3564 on GitHub (Sep 8, 2024). ### Self Checks - [X] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [X] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [X] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [X] Please do not modify this template :) and fill in all the required fields. ### 1. Is this request related to a challenge you're experiencing? Tell me about your story. Does dify support viewing recalled content in rag scenarios? I added the corpus and asked the model some questions in the corpus, but the model still gave wrong answers. I want to know whether there was a problem in the retrieval or a problem in the generation, which requires me to check the contents recalled in the middle.This is the recall result from my experiment with flashrag, "intermediate_data.jsonl." ![微信图片_20240908221117](https://github.com/user-attachments/assets/5c2efa1e-5b94-4b73-9778-725b82048a24) ### 2. Additional context or comments I want to look at the results of the different model retrieval, as well as the results of generating the responses, and then explore why the hallucinations/answer errors occur. ### 3. Can you help us with this feature? - [X] I am interested in contributing to this feature.
yindo added the 👻 feat:rag label 2026-02-21 18:11:02 -05:00
yindo closed this issue 2026-02-21 18:11:02 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Sep 8, 2024):

Yes, Dify supports viewing recalled content in RAG scenarios to diagnose retrieval or generation issues. You can use the text retrieval testing feature to debug the recall effects under different retrieval methods and parameter configurations. The recalled results can be viewed in the Recalled Paragraph section, and you can also view the history of query records in the Recent Queries section. Additionally, enabling the citation attribution feature allows you to view specific citation paragraph information below the response content, which includes details like the original segment text, segment number, and matching degree. You can also adjust the retrieval methods and parameters during the testing phase to optimize the recall results, and these changes will be effective only during the debugging session. For permanent changes, you need to update the settings in the Knowledge Base Settings > Search Settings [1][2].

For more detailed steps on how to perform these actions, you can refer to the retrieval test and citation guide [1].

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Sep 8, 2024): <!-- Answer --> Yes, Dify supports viewing recalled content in RAG scenarios to diagnose retrieval or generation issues. You can use the text retrieval testing feature to debug the recall effects under different retrieval methods and parameter configurations. The recalled results can be viewed in the **Recalled Paragraph** section, and you can also view the history of query records in the **Recent Queries** section. Additionally, enabling the citation attribution feature allows you to view specific citation paragraph information below the response content, which includes details like the original segment text, segment number, and matching degree. You can also adjust the retrieval methods and parameters during the testing phase to optimize the recall results, and these changes will be effective only during the debugging session. For permanent changes, you need to update the settings in the **Knowledge Base Settings > Search Settings** <sup>[[1]](https://github.com/langgenius/dify-docs/blob/main/en/guides/knowledge-base/retrieval-test-and-citation.md)</sup><sup>[[2]](https://github.com/langgenius/dify-docs/blob/main/jp/guides/knowledge-base/retrieval-test-and-citation.md)</sup>. For more detailed steps on how to perform these actions, you can refer to the [retrieval test and citation guide](https://github.com/langgenius/dify-docs/blob/main/en/guides/knowledge-base/retrieval-test-and-citation.md) <sup>[[1]](https://github.com/langgenius/dify-docs/blob/main/en/guides/knowledge-base/retrieval-test-and-citation.md)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

@liulian3564 commented on GitHub (Sep 8, 2024):

@dosu

是的,Dify 支持在 RAG 场景下查看认知内容,以诊断检索或生成问题。您可以使用文本搜索测试功能调试不同的检索方式和参数配置下的认知效果。认知结果可以在认知场景部分查看**,也可以在****最近查询部分查看查询记录历史。另外,启用引文精准功能可以让您在响应内容底部查看特定引文段落信息,包括原始句段文本、句段编号、匹配度等详细信息。您还可以在测试阶段调整搜索方式和参数以优化回调结果,这些更改仅在调试会话期间生效。对于永久性更改,您需要在知识库设置 > 搜索设置** [1] [2]中更新设置。

有关如何执行这些操作的更多步骤,可以参考搜索测试和引用指南 [1]

要继续与Dosu交谈,请提及@dosu。

@dosu Want to know if the retrieval tests/references are consistent with what the model ultimately retrieves? How reliable is it? Also, is the retrieval model used for retrieval tests/references consistent with the system model Settings? Because my experiment is to test the model retrieval ability and generation ability, and then find the wrong answer to the question. So you need reliable search results.

@liulian3564 commented on GitHub (Sep 8, 2024): @dosu > 是的,Dify 支持在 RAG 场景下查看认知内容,以诊断检索或生成问题。您可以使用文本搜索测试功能调试不同的检索方式和参数配置下的认知效果。认知结果可以在认知场景部分查看**,也可以在****最近查询**部分查看查询记录历史。另外,启用引文精准功能可以让您在响应内容底部查看特定引文段落信息,包括原始句段文本、句段编号、匹配度等详细信息。您还可以在测试阶段调整搜索方式和参数以优化回调结果,这些更改仅在调试会话期间生效。对于永久性更改,您需要在**知识库设置 > 搜索设置** [[1] ](https://github.com/langgenius/dify-docs/blob/main/en/guides/knowledge-base/retrieval-test-and-citation.md)[[2]](https://github.com/langgenius/dify-docs/blob/main/jp/guides/knowledge-base/retrieval-test-and-citation.md)中更新设置。 > > 有关如何执行这些操作的更多步骤,可以参考[搜索测试和引用指南](https://github.com/langgenius/dify-docs/blob/main/en/guides/knowledge-base/retrieval-test-and-citation.md) [[1]](https://github.com/langgenius/dify-docs/blob/main/en/guides/knowledge-base/retrieval-test-and-citation.md)。 > > _要继续与[Dosu](https://dosu.dev)交谈,请提及@dosu。_ @dosu Want to know if the retrieval tests/references are consistent with what the model ultimately retrieves? How reliable is it? Also, is the retrieval model used for retrieval tests/references consistent with the system model Settings? Because my experiment is to test the model retrieval ability and generation ability, and then find the wrong answer to the question. So you need reliable search results.
Author
Owner

@dosubot[bot] commented on GitHub (Sep 8, 2024):

Yes, the retrieval tests and references are consistent with what the model ultimately retrieves, and they are reliable.

Dify's text retrieval testing feature allows you to debug the recall effects under different retrieval methods and parameter configurations. This ensures that the retrieval methods and parameters are fine-tuned before being applied in real scenarios. You can adjust the retrieval strategy (vector search, full-text search, or hybrid search) and fine-tune parameters like the number of top results (TopK) and the recall score threshold to ensure optimal performance.

The citation and attribution feature provides specific citation paragraph information below the response content, including the original segment text, segment number, and matching degree. This transparency ensures that the references are consistent and reliable. When the LLM uses the knowledge base content to answer questions, you can see the exact segments it referenced, making it easier to verify and debug the responses.

The HitTestingService class in Dify's codebase supports this by providing a method to retrieve documents based on a query and retrieval model. The retrieval process includes options for semantic search, reranking, and score thresholds, ensuring that the retrieval is both accurate and reliable [1][2][3][4].

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Sep 8, 2024): <!-- Answer --> Yes, the retrieval tests and references are consistent with what the model ultimately retrieves, and they are reliable. Dify's text retrieval testing feature allows you to debug the recall effects under different retrieval methods and parameter configurations. This ensures that the retrieval methods and parameters are fine-tuned before being applied in real scenarios. You can adjust the retrieval strategy (vector search, full-text search, or hybrid search) and fine-tune parameters like the number of top results (TopK) and the recall score threshold to ensure optimal performance. The citation and attribution feature provides specific citation paragraph information below the response content, including the original segment text, segment number, and matching degree. This transparency ensures that the references are consistent and reliable. When the LLM uses the knowledge base content to answer questions, you can see the exact segments it referenced, making it easier to verify and debug the responses. The `HitTestingService` class in Dify's codebase supports this by providing a method to retrieve documents based on a query and retrieval model. The retrieval process includes options for semantic search, reranking, and score thresholds, ensuring that the retrieval is both accurate and reliable <sup>[[1]](https://github.com/langgenius/dify-docs/blob/main/en/guides/knowledge-base/retrieval-test-and-citation.md)</sup><sup>[[2]](https://github.com/langgenius/dify-docs/blob/main/zh_CN/guides/knowledge-base/retrieval-test-and-citation.md)</sup><sup>[[3]](https://github.com/langgenius/dify-docs/blob/main/jp/guides/knowledge-base/retrieval-test-and-citation.md)</sup><sup>[[4]](https://github.com/langgenius/dify/blob/main/api/services/hit_testing_service.py)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

@VincePotato commented on GitHub (Sep 11, 2024):

Knowledge Citation feature: https://docs.dify.ai/guides/knowledge-base/retrieval-test-and-citation#id-2.-citation-and-attribution

@VincePotato commented on GitHub (Sep 11, 2024): Knowledge Citation feature: https://docs.dify.ai/guides/knowledge-base/retrieval-test-and-citation#id-2.-citation-and-attribution
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#5453