[GH-ISSUE #23826] issue: search_memories returns all results regardless of query string #90819

Closed
opened 2026-05-15 16:05:49 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @JeslynMcKenzie on GitHub (Apr 17, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/23826

Check Existing Issues

  • I have searched for any existing and/or related issues.
  • I have searched for any existing and/or related discussions.
  • I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!).
  • I am using the latest version of Open WebUI.

Installation Method

Docker

Open WebUI Version

v0.8.12

Ollama Version (if applicable)

No response

Operating System

Ubuntu 22.04 (Docker Container)

Browser (if applicable)

Microsoft Edge

Confirmation

  • I have read and followed all instructions in README.md.
  • I am using the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have provided every relevant configuration, setting, and environment variable used in my setup.
  • I have clearly listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc).
  • I have documented step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation. My steps:
  • Start with the initial platform/version/OS and dependencies used,
  • Specify exact install/launch/configure commands,
  • List URLs visited, user input (incl. example values/emails/passwords if needed),
  • Describe all options and toggles enabled or changed,
  • Include any files or environmental changes,
  • Identify the expected and actual result at each stage,
  • Ensure any reasonably skilled user can follow and hit the same issue.

Expected Behavior

NOTE: I tried posting on another account accidentally and it didn't show up in the issue list? Reposting on this account. You can delete the other as duplicate if it shows up!

When a model calls search_memories with a specified query, it will only return results relevant to that query.

Actual Behavior

When a model calls search_memories with a specified query, it is returning all memory results related to the user.

Steps to Reproduce

  1. Install Ubuntu 24.04.4 LTS
  2. Install Docker (29.4.0).
  3. Pull the latest Open WebUI docker image (v0.8.12 in the web console).
  4. Pull the latest llama-cpp docker image.
  5. Configure llama-cpp to run [unsloth] gemma-4-31B model.
  6. Load the Gemma 4 model
  7. Run the Open WebUI docker container using the compose file on GitHub.
  8. Log into Open WebUI and enable memories.
  9. Add a bunch of memories that aren't related and thus shouldn't come up in the same search.
  10. Connect Open WebUI to the llama-cpp endpoint.
  11. Bring in the gemma-4-31B model.
  12. Edit the model.
  13. Enable Native function calling.
  14. Enable memories in the built in tools for the model.
  15. Start a new chat and ask the model to search for a phrase unrelated to the memories.
  16. You will get all results instead of the filtered results.

Logs & Screenshots

Image

Additional Information

I'm happy to provide any information I may have missed. I didn't attach the Docker logs or the Console logs because they weren't outputting anything relevant but if you want me to do so anyways just ask! I'm not sure if my verbosity in docker is set to extra low because it honestly didn't output anything but chunk related logs.

Oh! I did confirm this just pulls in the active users memories. It doesn't pull in other users memories.

Edit: I also am not sure if the steps are completely correct since I can only follow steps 16 and 17 myself. The rest have already been completed and I recalled based on memory. I did observe the issue in two separate models though, Qwen 3.5 4B and Gemma 4 31B.

The inputs look correct too so I'm not sure if maybe I'm missing something or not! Maybe I need to index something or make sure an index job is running? If this isn't a true bug and I'm doing something wrong let me know! I did research quite a bit and everything says this function should only bring back relevant articles and the fact it's pulling in all memories is a bug (AI's words alongside mine!).

Originally created by @JeslynMcKenzie on GitHub (Apr 17, 2026). Original GitHub issue: https://github.com/open-webui/open-webui/issues/23826 ### Check Existing Issues - [x] I have searched for any existing and/or related issues. - [x] I have searched for any existing and/or related discussions. - [x] I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!). - [x] I am using the latest version of Open WebUI. ### Installation Method Docker ### Open WebUI Version v0.8.12 ### Ollama Version (if applicable) _No response_ ### Operating System Ubuntu 22.04 (Docker Container) ### Browser (if applicable) Microsoft Edge ### Confirmation - [x] I have read and followed all instructions in `README.md`. - [x] I am using the latest version of **both** Open WebUI and Ollama. - [ ] I have included the browser console logs. - [ ] I have included the Docker container logs. - [x] I have **provided every relevant configuration, setting, and environment variable used in my setup.** - [x] I have clearly **listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup** (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc). - [x] I have documented **step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation**. My steps: - Start with the initial platform/version/OS and dependencies used, - Specify exact install/launch/configure commands, - List URLs visited, user input (incl. example values/emails/passwords if needed), - Describe all options and toggles enabled or changed, - Include any files or environmental changes, - Identify the expected and actual result at each stage, - Ensure any reasonably skilled user can follow and hit the same issue. ### Expected Behavior NOTE: I tried posting on another account accidentally and it didn't show up in the issue list? Reposting on this account. You can delete the other as duplicate if it shows up! When a model calls search_memories with a specified query, it will only return results relevant to that query. ### Actual Behavior When a model calls search_memories with a specified query, it is returning all memory results related to the user. ### Steps to Reproduce 1. Install Ubuntu 24.04.4 LTS 2. Install Docker (29.4.0). 3. Pull the latest Open WebUI docker image (v0.8.12 in the web console). 4. Pull the latest llama-cpp docker image. 5. Configure llama-cpp to run [unsloth] gemma-4-31B model. 6. Load the Gemma 4 model 7. Run the Open WebUI docker container using the compose file on GitHub. 8. Log into Open WebUI and enable memories. 9. Add a bunch of memories that aren't related and thus shouldn't come up in the same search. 10. Connect Open WebUI to the llama-cpp endpoint. 11. Bring in the gemma-4-31B model. 12. Edit the model. 13. Enable Native function calling. 14. Enable memories in the built in tools for the model. 15. Start a new chat and ask the model to search for a phrase unrelated to the memories. 16. You will get all results instead of the filtered results. ### Logs & Screenshots <img width="1416" height="1324" alt="Image" src="https://github.com/user-attachments/assets/10520211-8c7f-4745-9e61-b698061c4d1e" /> ### Additional Information I'm happy to provide any information I may have missed. I didn't attach the Docker logs or the Console logs because they weren't outputting anything relevant but if you want me to do so anyways just ask! I'm not sure if my verbosity in docker is set to extra low because it honestly didn't output anything but chunk related logs. Oh! I did confirm this just pulls in the active users memories. It doesn't pull in other users memories. Edit: I also am not sure if the steps are completely correct since I can only follow steps 16 and 17 myself. The rest have already been completed and I recalled based on memory. I did observe the issue in two separate models though, Qwen 3.5 4B and Gemma 4 31B. The inputs look correct too so I'm not sure if maybe I'm missing something or not! Maybe I need to index something or make sure an index job is running? If this isn't a true bug and I'm doing something wrong let me know! I did research quite a bit and everything says this function should only bring back relevant articles and the fact it's pulling in all memories is a bug (AI's words alongside mine!).
GiteaMirror added the bug label 2026-05-15 16:05:49 -05:00
Author
Owner

@danielh-official commented on GitHub (Apr 17, 2026):

I tested on my end. I built out my local by cloning the repo and running docker compose up. Model is llama3.2:latest.

I added these memories:

The chemical symbol for gold is Au.

The famous painting "The Starry Night" was painted by Vincent van Gogh.

The popular video game character Mario was created by Shigeru Miyamoto.

The color of the sky on a clear summer day is blue.

The Eiffel Tower is located in Paris, France

I then prompted: "search_memories Who created Mario?"

The answer was "Mario was created by Shigeru Miyamoto."

However, here's the JSON output:

[
  {
    "id": "84728487-946f-4718-8223-dcaed0b8b83b",
    "date": "2026-04-17",
    "content": "The popular video game character Mario was created by Shigeru Miyamoto."
  },
  {
    "id": "91749c3a-9fd9-49fe-9384-957087030694",
    "date": "2026-04-17",
    "content": "The Eiffel Tower is located in Paris, France."
  },
  {
    "id": "dd44e4c9-04b2-4354-93b3-60ac2bfd1736",
    "date": "2026-04-17",
    "content": "The famous painting \"The Starry Night\" was painted by Vincent van Gogh."
  },
  {
    "id": "1b7362b2-dfdb-45e8-88c0-90b5f948e65b",
    "date": "2026-04-17",
    "content": "The chemical symbol for gold is Au."
  },
  {
    "id": "0794904d-27e6-4e16-8ec7-3f9ded2d95e1",
    "date": "2026-04-17",
    "content": "The color of the sky on a clear summer day is blue."
  }
]

I assume the problem is that we want to JSON to be filtered along with the answer, so the output should actually be:

[
  {
    "id": "84728487-946f-4718-8223-dcaed0b8b83b",
    "date": "2026-04-17",
    "content": "The popular video game character Mario was created by Shigeru Miyamoto."
  }
]
<!-- gh-comment-id:4264767954 --> @danielh-official commented on GitHub (Apr 17, 2026): I tested on my end. I built out my local by cloning the repo and running `docker compose up`. Model is llama3.2:latest. I added these memories: ``` The chemical symbol for gold is Au. The famous painting "The Starry Night" was painted by Vincent van Gogh. The popular video game character Mario was created by Shigeru Miyamoto. The color of the sky on a clear summer day is blue. The Eiffel Tower is located in Paris, France ``` I then prompted: "search_memories Who created Mario?" The answer was "Mario was created by Shigeru Miyamoto." However, here's the JSON output: ```json [ { "id": "84728487-946f-4718-8223-dcaed0b8b83b", "date": "2026-04-17", "content": "The popular video game character Mario was created by Shigeru Miyamoto." }, { "id": "91749c3a-9fd9-49fe-9384-957087030694", "date": "2026-04-17", "content": "The Eiffel Tower is located in Paris, France." }, { "id": "dd44e4c9-04b2-4354-93b3-60ac2bfd1736", "date": "2026-04-17", "content": "The famous painting \"The Starry Night\" was painted by Vincent van Gogh." }, { "id": "1b7362b2-dfdb-45e8-88c0-90b5f948e65b", "date": "2026-04-17", "content": "The chemical symbol for gold is Au." }, { "id": "0794904d-27e6-4e16-8ec7-3f9ded2d95e1", "date": "2026-04-17", "content": "The color of the sky on a clear summer day is blue." } ] ``` I assume the problem is that we want to JSON to be filtered along with the answer, so the output should actually be: ```json [ { "id": "84728487-946f-4718-8223-dcaed0b8b83b", "date": "2026-04-17", "content": "The popular video game character Mario was created by Shigeru Miyamoto." } ] ```
Author
Owner

@tjbck commented on GitHub (Apr 17, 2026):

Addressed in dev to utilize RELEVANCE_THRESHOLD

<!-- gh-comment-id:4264811298 --> @tjbck commented on GitHub (Apr 17, 2026): Addressed in dev to utilize RELEVANCE_THRESHOLD
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#90819