Skip to content

[Bug]: Errors are output when answering questions in the knowledge base #6322

Closed
@darkSuperman

Description

@darkSuperman

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).
  • Non-english title submitions will be closed directly ( 非英文标题的提交将会被直接关闭 ) (Language Policy).
  • Please do not modify this template :) and fill in all the required fields.

RAGFlow workspace code commit ID

baf3b9b

RAGFlow image version

v0.17.2 full

Other environment information

Ubuntu24

Actual behavior

When I use the assistant and select a knowledge base for question and answer, the output can be normal at the beginning, but it will not be completed and an error will be reported halfway through the output.

Expected behavior

No response

Steps to reproduce

Knowledge base questions and answers will definitely reappear

Additional information

Image

2025-03-20 14:28:55,261 ERROR    17 LLMBundle.encode_queries can't update token usage for 4b969d6ef11b11ef996c0242ac130007/EMBEDDING used_tokens: 20
Traceback (most recent call last):
  File "/ragflow/api/apps/conversation_app.py", line 232, in stream
    for ans in chat(dia, msg, True, **req):
  File "/ragflow/api/db/services/dialog_service.py", line 196, in chat
    for think in reasoner.thinking(kbinfos, " ".join(questions)):
  File "/ragflow/agentic_reasoning/deep_research.py", line 205, in thinking
    kbinfos = self._retrieve_information(search_query)
  File "/ragflow/agentic_reasoning/deep_research.py", line 98, in _retrieve_information
    kbinfos = self._kb_retrieve(question=search_query) if self._kb_retrieve else {"chunks": [], "doc_aggs": []}
  File "<@beartype(rag.nlp.search.Dealer.retrieval) at 0x7977e5fbaef0>", line 35, in retrieval
  File "/ragflow/rag/nlp/search.py", line 371, in retrieval
    sim, tsim, vsim = self.rerank(
  File "<@beartype(rag.nlp.search.Dealer.rerank) at 0x7977e5fbad40>", line 35, in rerank
  File "/ragflow/rag/nlp/search.py", line 301, in rerank
    rank_fea = self._rank_feature_scores(rank_feature, sres)
  File "/ragflow/rag/nlp/search.py", line 261, in _rank_feature_scores
    for t, sc in eval(search_res.field[i].get(TAG_FLD, "{}")).items():
  File "<string>", line 0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions