Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: enhance exploration #87

Merged
merged 13 commits into from
Feb 6, 2025
Merged

fix: enhance exploration #87

merged 13 commits into from
Feb 6, 2025

Conversation

gurdeep330
Copy link
Member

@gurdeep330 gurdeep330 commented Feb 5, 2025

For authors

Description

T2Bdemo9.mp4

In this PR, I'd like to introduce two key improvements to make the agent more exploration-friendly, catering to users who may not be familiar with a model and may nevertheless wish to explore its contents.

  1. Users can now enter abstract keywords instead of exact species names to retrieve relevant annotations (get_annotation tool). Implemented structured LLM output parsing to extract species names from abstract queries.
  2. Previously, when queried for species or parameter information, the agent (get_modelinfo tool) returned only names. With this update, the agent can now also return initial concentration/value, compartment, and units for species and parameters.

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests you conducted to verify your changes. These may involve creating new test scripts or updating existing ones.

  • Added new test(s) in the tests folder
  • Added new function(s) to an existing test(s) (e.g.: tests/testX.py)
  • No new tests added (Please explain the rationale in this case)

Checklist

  • My code follows the style guidelines mentioned in the Code/DevOps guides
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (e.g. MkDocs)
  • My changes generate no new warnings
  • I have added or updated tests (in the tests folder) that prove my fix is effective or that my feature works
  • New and existing tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

For reviewers

Checklist pre-approval

  • Is there enough documentation?
  • If a new feature has been added, or a bug fixed, has a test been added to confirm good behavior?
  • Does the test(s) successfully test edge/corner cases?
  • Does the PR pass the tests? (if the repository has continuous integration)

Checklist post-approval

  • Does this PR merge develop into main? If so, please make sure to add a prefix (feat/fix/chore) and/or a suffix BREAKING CHANGE (if it's a major release) to your commit message.
  • Does this PR close an issue? If so, please make sure to descriptively close this issue when the PR is merged.

Checklist post-merge

  • When you approve of the PR, merge and close it (Read this article to know about different merge methods on GitHub)
  • Did this PR merge develop into main and is it suppose to run an automated release workflow (if applicable)? If so, please make sure to check under the "Actions" tab to see if the workflow has been initiated, and return later to verify that it has completed successfully.

@gurdeep330 gurdeep330 requested a review from dmccloskey February 5, 2025 21:53
@gurdeep330 gurdeep330 self-assigned this Feb 5, 2025
@gurdeep330 gurdeep330 added the enhancement New feature or request label Feb 5, 2025
@gurdeep330 gurdeep330 changed the title Fix/inclusive exploration fix: enhance exploration Feb 6, 2025
Copy link
Member

@dmccloskey dmccloskey left a comment

Choose a reason for hiding this comment

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

Looks good 🤩. I only have one super minor comment about an info log message. Please address as you see fit and then feel free to merge 👍.

"""
Extract relevant species names based on the user question.
"""
logger.info("Loading prompt for the LLM model.")
Copy link
Member

Choose a reason for hiding this comment

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

A more informative info message might be better e.g., including something about the arg_data or state along with the line number and function call that is included by default.

Copy link
Member Author

Choose a reason for hiding this comment

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

@dmccloskey
That’s a great point—the logging makes more sense after loading the config since it defines the prompt used by the LLM to return species with exact names based on the user’s question. I’ve updated it accordingly (y)

@gurdeep330 gurdeep330 merged commit d52fa04 into main Feb 6, 2025
0 of 6 checks passed
Copy link
Contributor

github-actions bot commented Feb 6, 2025

🎉 This PR is included in version 1.15.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

3 similar comments
Copy link
Contributor

github-actions bot commented Feb 6, 2025

🎉 This PR is included in version 1.15.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Copy link
Contributor

github-actions bot commented Feb 6, 2025

🎉 This PR is included in version 1.15.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Copy link
Contributor

github-actions bot commented Feb 6, 2025

🎉 This PR is included in version 1.15.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants