Skip to content

feat(recovery): add confidence threshold to filter false positives - #27

Merged
luigi-agosti merged 3 commits into
mainfrom
feat/issue-23-recovery-threshold
Apr 12, 2026
Merged

feat(recovery): add confidence threshold to filter false positives#27
luigi-agosti merged 3 commits into
mainfrom
feat/issue-23-recovery-threshold

Conversation

@luigi-agosti

Copy link
Copy Markdown
Contributor

Summary

Fixes #23

Adds confidence threshold to recovery to avoid false positive matches when an element is removed.

Changes

  • Enforce minimum 0.52 threshold in recovery benchmark
  • Enrich recovery queries with original role for better matching
  • Add E2E tests for recovery scenarios

Benchmark Results

Metric Score
Find P@1 0.88
Find MRR 0.90
Recovery 100% (8/8)
Classification 100% (12/12)
Composite 0.93 (A)

Test plan

  • All Go tests pass
  • All E2E tests pass
  • Full benchmark passes with Grade A

- Increase synonym boost weight from 0.30 to 0.45 for better phrase matching
- Fix synonymScore to count all tokens in matched phrases (not just 1)
- Update benchmark to use 0.52 threshold for low-confidence recovery matches
- Add E2E tests for recovery scenarios

This fixes issue #23 by ensuring recovery doesn't return false positives
like "Edit" when searching for "delete button" after the element was removed.

Benchmark: Grade A (0.93), Recovery 100% (8/8)
@luigi-agosti
luigi-agosti merged commit c756d0b into main Apr 12, 2026
7 checks passed
luigi-agosti added a commit that referenced this pull request Apr 24, 2026
feat(recovery): add confidence threshold to filter false positives
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.

Add confidence threshold for recovery to avoid false positives

1 participant