Skip to content

Conversation

Thuraabtech
Copy link

@Thuraabtech Thuraabtech commented Sep 6, 2025

Things that are updated for embedding search issue:

I've moved embedding search related files into the plugins/tool_search/in_mem_embeddings.
comprehensive description for model_name.


Summary by cubic

Adds an in-memory embedding-based tool search strategy as a plugin to enable semantic search. Registers the strategy in core, adds docs and tests, and supports optional Sentence-Transformers for better results.

  • New Features

    • InMemEmbeddingsSearchStrategy ("in_mem_embeddings") with cosine similarity, in-memory caching, and a simple fallback when sentence-transformers isn’t installed.
    • Pluginized and auto-discoverable via entry point; also registered in core plugin_loader for immediate use.
    • Moved embedding files to plugins/tool_search/in_mem_embeddings with README plus unit, integration, and performance tests.
  • Dependencies

    • Core: adds numpy; introduces an "embedding" optional extra with sentence-transformers and torch.
    • Plugin: supports [embedding] extra for high-quality embeddings; no breaking changes, default search remains the same.

@Copilot Copilot AI review requested due to automatic review settings September 6, 2025 19:58
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR moves embedding search functionality into a dedicated plugin structure and improves the model configuration with comprehensive documentation.

  • Moved embedding search files from core to the new plugins/tool_search/in_mem_embeddings structure
  • Added comprehensive description for the model_name field with examples and guidance
  • Created complete plugin package with tests, documentation, and proper entry point registration

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
plugins/tool_search/in_mem_embeddings/tests/test_in_mem_embeddings_search.py Comprehensive test suite covering initialization, embedding generation, search functionality, and error handling
plugins/tool_search/in_mem_embeddings/test_plugin.py Basic plugin functionality verification script
plugins/tool_search/in_mem_embeddings/test_performance.py Performance testing script for plugin with multiple tools and timing measurements
plugins/tool_search/in_mem_embeddings/test_integration.py Integration test verifying plugin works with core UTCP system
plugins/tool_search/in_mem_embeddings/src/utcp_in_mem_embeddings/in_mem_embeddings_search.py Main plugin implementation with enhanced model_name documentation
plugins/tool_search/in_mem_embeddings/src/utcp_in_mem_embeddings/init.py Plugin registration entry point
plugins/tool_search/in_mem_embeddings/pyproject.toml Plugin package configuration with proper dependencies
plugins/tool_search/in_mem_embeddings/README.md Plugin documentation and installation instructions
plugins/tool_search/embedding/README.md Legacy embedding plugin documentation update
core/src/utcp/plugins/plugin_loader.py Core plugin loader updated to include in-memory embeddings
core/pyproject.toml Core package updated with numpy dependency and embedding extras

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@@ -0,0 +1,343 @@
"""Tests for the InMemEmbeddingsSearchStrategy implementation."""
"""just test"""
Copy link
Preview

Copilot AI Sep 6, 2025

Choose a reason for hiding this comment

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

The second docstring line 'just test' appears to be a placeholder comment that should be removed. It doesn't provide meaningful documentation.

Suggested change
"""just test"""

Copilot uses AI. Check for mistakes.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

19 issues found across 11 files

React with 👍 or 👎 to teach cubic. You can also tag @cubic-dev-ai to give feedback, ask questions, or re-run the review.

@@ -0,0 +1,7 @@
from utcp.plugins.discovery import register_tool_search_strategy
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Sep 6, 2025

Choose a reason for hiding this comment

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

Imported symbol appears undefined in the codebase; this import is likely to raise ImportError at plugin load. Verify correct module path or function name.

Prompt for AI agents
Address the following comment on plugins/tool_search/in_mem_embeddings/src/utcp_in_mem_embeddings/__init__.py at line 1:

<comment>Imported symbol appears undefined in the codebase; this import is likely to raise ImportError at plugin load. Verify correct module path or function name.</comment>

<file context>
@@ -0,0 +1,7 @@
+from utcp.plugins.discovery import register_tool_search_strategy
+from utcp_in_mem_embeddings.in_mem_embeddings_search import InMemEmbeddingsSearchStrategyConfigSerializer
+
</file context>
Fix with Cubic

@h3xxit h3xxit changed the title Updated the changes Implement Embedding Search Plugin Sep 7, 2025
@h3xxit
Copy link
Member

h3xxit commented Sep 7, 2025

implements #17

@h3xxit
Copy link
Member

h3xxit commented Sep 7, 2025

Please address the Cubic reviews. If you're not sure about some, you can let them for me to review

@h3xxit h3xxit changed the base branch from main to dev September 7, 2025 09:26
@h3xxit
Copy link
Member

h3xxit commented Sep 7, 2025

Also the base branch to merge into should be dev

@Thuraabtech
Copy link
Author

Hi @h3xxit. I've updated the code by referring to all cubic-dev comments successfully. let me know if there are any more changes. Can't wait to implement embedding search 😊 haha.

@h3xxit
Copy link
Member

h3xxit commented Sep 10, 2025

@cubic-dev-ai review

Copy link
Contributor

cubic-dev-ai bot commented Sep 10, 2025

@cubic-dev-ai review

@h3xxit I've started the AI code review. It'll take a few minutes to complete.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 10 files

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