dimensionalOS / dimensionalOS/dimos
SemanticSearch.search() can raise “No matching observation” after finding matches
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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