Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Conversation

@SamSaffron
Copy link
Member

@SamSaffron SamSaffron commented May 26, 2025

Improve researcher tool filter validation and error handling

Changes

  • Enhanced filter validation: Added tracking of invalid filter fragments in the research filter system
  • Better error reporting: The researcher tool now returns descriptive error messages when invalid filters are used, including suggestions for valid filters
  • Optimized topic filtering: Improved query logic when filtering by topic IDs to avoid unnecessary complex queries
  • Updated documentation: Fixed misleading text about reasoning feature scope (not just Sonnet 3.7)

Technical Details

  • Added invalid_filters tracking in Filter class to collect unrecognized filter terms
  • Modified process_filters method to accumulate invalid filters instead of returning filtered terms
  • Enhanced researcher tool to check for invalid filters and return early with helpful error messages
  • Fixed database queries by using simpler topic ID filtering when no other filters are applied (dont OR everything)
  • Added comprehensive test coverage for invalid filter handling and topic-specific filtering

Benefits

  • Users get immediate feedback when using incorrect filter syntax
  • Reduced confusion with clearer error messages that include filter documentation
  • More accurate feature documentation

@SamSaffron SamSaffron changed the title bug fix monday FIX: improve researcher tool - fix topic filters May 26, 2025
Copy link
Contributor

@nattsw nattsw left a comment

Choose a reason for hiding this comment

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

Had some comment about population of invalid_filters but I think it is ok for now.

@SamSaffron SamSaffron merged commit 70b0db2 into main May 26, 2025
6 checks passed
@SamSaffron SamSaffron deleted the bug-fix-monday branch May 26, 2025 06:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants