dimensionalOS / dimensionalOS/dimos

SemanticSearch.search() can raise “No matching observation” after finding matches

Open
#4,034 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
4.5k
Forks
808
Avg merge
3d 5h
Merged PRs (30d)
233

Description

Found this while testing a Go2 recording. Vector search returned matches, but SemanticSearch.search() still raised LookupError: No matching observation.

search() sorts by similarity, but peaks() expects time order. Descending scores have no interior peaks, so it returns nothing. Separately, .last() chooses the latest peak instead of the strongest one.

I reproduced it on main at 1875e3e5a with a small SQLite test. Sorting by timestamp before finding peaks, then choosing the strongest peak, makes the regression tests pass.

I have the fix and regression tests locally. Happy to open a PR.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in dimos/memory/module.py at the referenced .last() method and trace SemanticSearch.search() and peaks(); then inspect the small SQLite regression test mentioned in the issue. Run the regression tests and confirm that matches no longer raise LookupError and that the strongest peak is selected.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, sqlite
Domain
backend, databases, search
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.