ragflow icon indicating copy to clipboard operation
ragflow copied to clipboard

[Question]: Is there a way to prioritize source material over knowledge graph reports in chat citations?

Open homewmt opened this issue 9 months ago • 3 comments

Self Checks

  • [x] I have searched for existing issues search for existing issues, including closed ones.
  • [x] I confirm that I am using English to submit this report (Language Policy).
  • [x] Non-english title submitions will be closed directly ( 非英文标题的提交将会被直接关闭 ) (Language Policy).
  • [x] Please do not modify this template :) and fill in all the required fields.

Describe your problem

I've gotten the knowledge graph working exceptionally well (with the configuration below), but one issue I'm seeing is that a lot of the in-line citations returned by the chat agent are from the knowledge graph/community reports summaries.

Ideally only source material in the knowledge base should be cited. I would just like to use the knowledge graph and community reports to add context to the answer, I don't want the user to be able to directly see it. Is there a way to adjust the weights for source material vs. summary material?

Ragflow 0.17.2 Configuration (anything not mentioned is default):

Knowledge base

  • Chat model: casperhansen/deepseek-r1-distill-qwen-14b-awq
  • Embedding model: BAAI/bge-large-en-v1.5
  • Extract knowledge graph: Yes
  • Entity resolution: Yes
  • Community reports generation: Yes

Chat configuration

  • Chat model: Qwen/QwQ-32B-AWQ
  • Rerank model: BAAI/bge-reranker-v2-m3
  • Use knowledge graph: Yes
  • Temperature: 0.6
  • Top P: 0.95
  • Presence penalty: Disabled
  • Frequency penalty: Disabled

homewmt avatar Mar 27 '25 03:03 homewmt

@homewmt Hello there! I'm here to help you with any bugs, questions, or contributions.

I couldn't find specific information in the Ragflow repository about prioritizing source material over knowledge graph reports in chat citations or adjusting weights for citation sources. However, Ragflow integrates the knowledge graph and community reports into the chat model's response generation by extracting entities, retrieving relationships, and ranking them based on PageRank values and similarity scores [1][2].

To achieve your goal of using the knowledge graph and community reports for context without direct citations, you might need to explore customizing the ranking or retrieval process. This could involve modifying how entities and relationships are ranked or retrieved, potentially by adjusting the PageRank or similarity scoring mechanisms. Unfortunately, without specific documentation or configuration options available, this might require diving into the codebase to implement custom logic.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

dosubot[bot] avatar Mar 27 '25 03:03 dosubot[bot]

Not supported yet. We're gona figure it out.

KevinHuSh avatar Mar 27 '25 06:03 KevinHuSh

Could we change the type of issue from a question to a feature request?

raikloe avatar Apr 02 '25 07:04 raikloe