Add project name to thought search metadata/indexing #30

Closed
opened 2026-04-20 19:04:36 +00:00 by sgcommand · 0 comments
Member

Project-scoped retrieval currently works, but project-name semantic search does not when the project token is absent from the thought body.

Observed behavior

For project svelix:

  • recall_context(project="svelix", query="svelix") returns the expected recent thoughts
  • get_project_context(project="svelix", query="latest thoughts") returns the same expected thoughts
  • the project record exists and resolves correctly
  • search_thoughts(query="svelix", project="svelix") returns no results

Diagnosis

This strongly suggests:

  • thoughts are correctly associated with the project
  • project-aware retrieval paths are healthy
  • plain semantic/name search is weak when the project name is not present in the stored thought body

Right now, project-scoped context retrieval works because it combines explicit project filtering with recency and fallback behavior. But project-name search inside a project behaves unintuitively unless the literal project name appears in the thought content.

Expected behavior

When searching inside a project, the retrieval path should be able to match or boost against project metadata, not only the body embedding/text.

At minimum, a query like search_thoughts(query="svelix", project="svelix") should surface thoughts stored under that project even if the token svelix is absent from the thought text itself.

Suggested fixes

Possible implementation options:

  1. Include the project name in indexed searchable metadata for thoughts
  2. Inject project name into the searchable text at capture or index time
  3. Boost project metadata during search_thoughts(..., project=...)
  4. Add a metadata-aware fallback when query token matches the scoped project exactly

Why this matters

User expectation is straightforward: if a thought belongs to project svelix, then searching for svelix within that project should find it. Right now the memory is healthy, but the retrieval mode is misleading.

Practical workaround for now

Until fixed:

  • use list_thoughts(project="svelix") for latest entries
  • use recall_context(project="svelix") for semantic recall within a project
  • use get_project_context(project="svelix") for project-aware summaries
  • do not rely on search_thoughts("svelix") unless the project name is present in thought content

Repro summary

  • project exists: svelix
  • project-aware recall works
  • project-aware context works
  • plain project-name thought search fails

That points to a gap in thought search metadata/indexing, not broken project storage.

Project-scoped retrieval currently works, but project-name semantic search does not when the project token is absent from the thought body. ## Observed behavior For project `svelix`: - `recall_context(project="svelix", query="svelix")` returns the expected recent thoughts - `get_project_context(project="svelix", query="latest thoughts")` returns the same expected thoughts - the project record exists and resolves correctly - `search_thoughts(query="svelix", project="svelix")` returns no results ## Diagnosis This strongly suggests: - thoughts are correctly associated with the project - project-aware retrieval paths are healthy - plain semantic/name search is weak when the project name is not present in the stored thought body Right now, project-scoped context retrieval works because it combines explicit project filtering with recency and fallback behavior. But project-name search inside a project behaves unintuitively unless the literal project name appears in the thought content. ## Expected behavior When searching inside a project, the retrieval path should be able to match or boost against project metadata, not only the body embedding/text. At minimum, a query like `search_thoughts(query="svelix", project="svelix")` should surface thoughts stored under that project even if the token `svelix` is absent from the thought text itself. ## Suggested fixes Possible implementation options: 1. Include the project name in indexed searchable metadata for thoughts 2. Inject project name into the searchable text at capture or index time 3. Boost project metadata during `search_thoughts(..., project=...)` 4. Add a metadata-aware fallback when query token matches the scoped project exactly ## Why this matters User expectation is straightforward: if a thought belongs to project `svelix`, then searching for `svelix` within that project should find it. Right now the memory is healthy, but the retrieval mode is misleading. ## Practical workaround for now Until fixed: - use `list_thoughts(project="svelix")` for latest entries - use `recall_context(project="svelix")` for semantic recall within a project - use `get_project_context(project="svelix")` for project-aware summaries - do not rely on `search_thoughts("svelix")` unless the project name is present in thought content ## Repro summary - project exists: `svelix` - project-aware recall works - project-aware context works - plain project-name thought search fails That points to a gap in thought search metadata/indexing, not broken project storage.
sgcommand changed title from Add to Add project name to thought search metadata/indexing 2026-04-20 19:06:52 +00:00
sam was assigned by sgcommand 2026-04-20 21:28:25 +00:00
Sign in to join this conversation.