Skip to content

Conversation

@m1rl0k
Copy link
Collaborator

@m1rl0k m1rl0k commented Jan 27, 2026

Refactors all uses of the 'under' parameter to normalize as a suffix and use MatchText for substring matching, improving path filtering consistency. Adds support for remote embedding services in memory.py and mcp_memory_server.py, routing embedding calls to remote or local as appropriate. Updates documentation and skill usage tips to reflect new search strategies, parallel execution, and token efficiency defaults.

Refactors all uses of the 'under' parameter to normalize as a suffix and use MatchText for substring matching, improving path filtering consistency. Adds support for remote embedding services in memory.py and mcp_memory_server.py, routing embedding calls to remote or local as appropriate. Updates documentation and skill usage tips to reflect new search strategies, parallel execution, and token efficiency defaults.
@m1rl0k m1rl0k merged commit 3a6cc0d into test Jan 27, 2026
1 check passed
@augmentcode
Copy link

augmentcode bot commented Jan 27, 2026

🤖 Augment PR Summary

Summary: This PR standardizes how the under filter is handled across search/rerank/expand flows and adds support for routing embeddings to a remote embedding service for MCP memory operations.

Changes:

  • Normalizes under as a path “suffix” (e.g. scripts/scripts) for more consistent path filtering.
  • Updates Qdrant filters on metadata.path_prefix to use MatchText (substring/token-style matching) instead of exact MatchValue.
  • Applies the normalized under behavior in hybrid search, embedding expansion, and local rerank tooling.
  • Adds remote-embedding routing in scripts/mcp_impl/memory.py and scripts/mcp_memory_server.py by detecting RemoteEmbeddingStub and delegating to embed_batch().
  • Keeps local embedding behavior unchanged when not in remote mode.
  • Extends user-facing docs and skill guidance with a two-phase search strategy, parallel tool-call patterns, and TOON/token-efficiency defaults.

Technical Notes: Remote embedding is performed via the existing scripts.ingest.qdrant.embed_batch routing logic; local embedding continues to use model.embed().

🤖 Was this summary useful? React with 👍 or 👎

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 1 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

norm_under = "/".join([p for p in norm_under.split("/") if p])
if norm_under:
norm_under = "/" + norm_under
must.append(models.FieldCondition(key="metadata.path_prefix", match=models.MatchText(text=norm_under)))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

metadata.path_prefix filtering is now using MatchText, but the indexer currently creates a KEYWORD payload index for metadata.path_prefix (see ensure_payload_indexes in scripts/ingest/qdrant.py), which may cause Qdrant to reject the filter or change matching semantics. Consider aligning the payload schema/index type (and any migration path) so under filtering stays reliable.

Other Locations
  • scripts/hybrid_search.py:1111
  • scripts/hybrid/expand.py:811
  • scripts/rerank_tools/local.py:372
  • scripts/rerank_tools/local.py:453

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants