Skip to content

Comments

UN-3087 neuro san enable coded tools to be used across different networks#156

Merged
Noravee merged 31 commits intomainfrom
UN-3087-neuro-san-enable-coded-tools-to-be-used-across-different-networks
Apr 28, 2025
Merged

UN-3087 neuro san enable coded tools to be used across different networks#156
Noravee merged 31 commits intomainfrom
UN-3087-neuro-san-enable-coded-tools-to-be-used-across-different-networks

Conversation

@Noravee
Copy link
Collaborator

@Noravee Noravee commented Apr 16, 2025

Changes

  • Modify ClassTool to check one level above the agent network folder
  • Modify error message to include information about global CodedTool
  • Add 2 global CodedTools
    • rag_global
    • website_search_global
  • Add an example agent network that uses global CodedTools
    • website_rag
  • Modify manifest.hocon accordingly

Tests

  • Run website_search that uses local CodedTools
  • Run website_rag that uses global CodedTools

@Noravee Noravee changed the title Un 3087 neuro san enable coded tools to be used across different networks UN-3087 neuro san enable coded tools to be used across different networks Apr 16, 2025
ofrancon
ofrancon previously approved these changes Apr 17, 2025
Copy link
Contributor

@ofrancon ofrancon left a comment

Choose a reason for hiding this comment

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

works for me!
Consider:

  • making the tools async
  • adding unit tests

Copy link
Collaborator

@d1donlydfink d1donlydfink left a comment

Choose a reason for hiding this comment

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

See PR comments

@Noravee
Copy link
Collaborator Author

Noravee commented Apr 17, 2025

Changes

  • Remove comment about env var in error message of ClassTool.
  • Add a comment in website_search_global that duckduckgo does not support async operations.
  • Make rag_global async and add more comments.

Tests

  • Run website_rag with gpt-4o.

Copy link
Collaborator

@d1donlydfink d1donlydfink left a comment

Choose a reason for hiding this comment

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

  1. Conform to class/filename consistency
  2. Only capitalize first letter of acronym.
  3. Update the Rag class comment to reflect what it actually does. If you were your own first reviewer, you would have caught this ;)

from neuro_san.interfaces.coded_tool import CodedTool


class RagGlobal(CodedTool):
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Change class name to match the convention.


This is useful in workflows where external search tools provide candidate links,
and RAG is applied afterward to synthesize a meaningful answer from the linked content.
"""
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Modify the docstring to provide more explanation.

from neuro_san.interfaces.coded_tool import CodedTool


class WebsiteSearchGlobal(CodedTool):
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Change class name to match the convention

@Noravee Noravee requested a review from d1donlydfink April 25, 2025 17:45
@Noravee
Copy link
Collaborator Author

Noravee commented Apr 25, 2025

Changes

  • Change class names to match the module name
  • Modify docstring for RAG tool

Test

  • Run website_rag and website_search

ofrancon
ofrancon previously approved these changes Apr 25, 2025
Copy link
Contributor

@ofrancon ofrancon left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Collaborator

@d1donlydfink d1donlydfink left a comment

Choose a reason for hiding this comment

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

Not sure why we need "Global" in the title of these classes
There is nothing really global about them in the language-y "global variable" sense of the word.

@Noravee
Copy link
Collaborator Author

Noravee commented Apr 26, 2025

Changes

  • Rename rag_global to rag and website_search to web_search and modify website_rag.hocon accordingly

Tests

  • Run prebuilt_search_tool, website_rag, and website_search

Notes

  • The module name must not match the name of an existing agent network; otherwise, Python cannot correctly locate the module. Therefore, website_search cannot be used because a network with that name already exists.

@Noravee Noravee requested a review from d1donlydfink April 26, 2025 15:47
@Noravee Noravee merged commit b5cbbcb into main Apr 28, 2025
4 checks passed
@Noravee Noravee deleted the UN-3087-neuro-san-enable-coded-tools-to-be-used-across-different-networks branch April 28, 2025 16:30
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.

4 participants