Built knowledge base chatflow: knowledge retrieval returns empty with no feedback during testing and running

The story points for this post can be organized as follows (with added Ollama provider information):


1. Symptoms

  • Scenario: User is working on a ‘Knowledge Base Chatflow’.
  • Phenomenon:
    • During testing and actual operation, the knowledge retrieval node appears to have ‘no feedback’;
    • The returned content shows result: [], an empty array, which looks like ‘no response at all’.

2. Environment and Provider

  • Application Form: Dify Knowledge Base Chatflow.
  • LLM Provider: Ollama (This post is about the Ollama scenario, which needs to be noted in the story points).
  • Model Form: Local / Self-built model, loaded and run by the user on the Ollama side.

3. Investigation

  • Admin starts by checking the flow configuration, confirming:
    • Chatflow general structure: whether there are only 3 nodes, and if the first one is the start node;
    • Ask the user to provide:
      • Screenshot of the LLM node configuration;
      • Screenshot of the reply node.
  • Investigation focuses on:
    • Whether the flow connections are correct;
    • Whether there are issues with the LLM model configuration, especially in local model / Ollama scenarios, if the model is truly in an available state.

4. Root Cause

  • The user later checked on their own and found:

    The reason was that the model was not loaded.
    It might be that we, the user, loaded the model.

  • Summary:

    • The Ollama model selected in the Chatflow was not truly ‘loaded / started’ on the Ollama side;
    • This led to the knowledge retrieval and answer nodes executing, but failing to get a response from the LLM, ultimately outputting an empty result: [].

5. Resolution

  • Complete correct loading and activation on both the Ollama + Dify model configuration sides:

    1. On the Ollama side

      • Confirm the corresponding model has been pulled and is in an available state;
      • The Ollama service process is running and port configuration is correct;
    2. On the Dify side

      • The corresponding Ollama model connection in model management is normal, with no errors;
      • In the Chatflow’s LLM node, this available Ollama model has been selected.
  • After the user completed the above operations, the problem disappeared, Chatflow output returned to normal, and the user expressed gratitude multiple times.


6. Checklist for Future Users (with Ollama focus)

When encountering ‘knowledge base retrieval no response / result is empty’, especially in Ollama scenarios, you can troubleshoot in the following order:

  1. Is the Ollama model correctly loaded?

    • Confirm in Ollama:
      • The model has been pulled and loaded;
      • The Ollama process is running normally, with no port conflicts or abnormal exits.
  2. Ollama model connection status in Dify

    • Check on the model configuration page:
      • Does this Ollama model show as ‘Available’?
      • If there are connection errors or timeouts, prioritize resolving connection issues.
  3. Does the Chatflow LLM node configuration point to this model?

    • Confirm that a deleted / non-existent model has not been selected;
    • If there are multiple providers, confirm that the current node is using the Ollama path.
  4. Are the flow connections complete?

    • Start node → Knowledge retrieval node → LLM/Reply node;
    • Is the retrieval result correctly passed to the LLM, and is the LLM output connected to the final reply?
  5. Check logs

    • If the interface only shows result: [], check backend logs / browser console for:
      • Ollama call failed;
      • Model not loaded, connection refused, timeout, or other errors.
  6. Confirm the knowledge base itself is fine

    • Are KB documents successfully vectorized / indexed?
    • Does the query content have matching text?

Story point key tags:

  • Feature: Knowledge Base Chatflow
  • Provider: Ollama
  • Symptoms: Retrieval node no feedback, returns result: []
  • Root Cause: Ollama model not loaded / unavailable on the provider side
  • Resolution: Load and enable the model on the Ollama side, then select the available model in Dify to restore normal operation.