Skip to content

Remove Aragorn rules that use the invalid affects_response_to predicate - #197

Merged
maximusunc merged 3 commits into
develfrom
fix/157-affects-sensitivity-to
Oct 30, 2026
Merged

maximusunc merged 3 commits into
develfrom
fix/157-affects-sensitivity-to

Conversation

@cbizon

@cbizon cbizon commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #157

  • biolink:affects_response_to is no longer a valid Biolink predicate
  • Removed the 22 AMIE rules that used it: 1 treats rule and 21 affects activity/abundance rules (the contraindicated_for rules never used it)
  • Testing showed results are better without these rules than with them rewritten to use biolink:affects_sensitivity_to, its closest current equivalent
  • The rule blocks were deleted in place rather than re-serializing the JSON, so the file's existing formatting is kept and the diff is deletions only
  • Updated the sample predicate in tests/helpers/generate_messages.py to affects_sensitivity_to; that fixture is a generic callback response unrelated to the rules, but it should use a valid predicate

Rules remaining per rule set:

Rule set Before After
treats 11 10
contraindicated_for 33 33
affects activity increased 31 25
affects activity decreased 27 23
affects activity_or_abundance increased 28 22
affects activity_or_abundance decreased 23 18

Note: the branch history shows the predicate swap followed by the removal; squash-merging gives a single clean commit.

- biolink:affects_response_to is no longer a valid Biolink predicate (fixes #157)
- Swap it for biolink:affects_sensitivity_to in the 22 AMIE rules that used it
  (1 treats rule, 21 affects/activity rules), in both the query templates and
  the human-readable Rule strings
- affects_sensitivity_to is the direct successor: Biolink lists
  CTD:affects_response_to as its exact mapping, and it is the parent of
  increases_/decreases_sensitivity_to, so queries pick up those edges too
- Chose swap over removal because the merged translator_kg (1.0.2) carries
  ~17.5k CTD edges in this family, mostly gene -> chemical as the rules expect;
  associated_with_response_to has no edges, so it was not a usable replacement
- Rule confidence stats were mined on the old graph and were not re-mined
- Update the matching predicate in the test message helper
@cbizon
cbizon changed the base branch from main to devel October 30, 2026 00:50
@cbizon

cbizon commented Oct 30, 2026

Copy link
Copy Markdown
Collaborator Author

Probably a good idea to run the acceptance tests against this change as well.

@cbizon
cbizon requested a review from maximusunc October 30, 2026 00:51
@codecov

codecov Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 54.09%. Comparing base (d85b13c) to head (6e1b766).
⚠️ Report is 1 commits behind head on devel.


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0c6ba1d...6e1b766. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@maximusunc

Copy link
Copy Markdown
Collaborator

Acceptance tests have been run and with these new predicates we swamp two TopAnswer tests and fail one more Acceptable test. So overall just slightly worse with this new predicate over these rules just being thrown out.

- Testing showed results are better without these rules than with the
  affects_sensitivity_to swap, so drop all 22 of them
- Removed 1 treats rule and 21 affects activity/abundance rules; the
  contraindicated_for rules were never affected
- Deleted the rule blocks in place rather than re-serializing the JSON, so the
  file's existing formatting is preserved and the diff is deletions only
- Kept affects_sensitivity_to in tests/helpers/generate_messages.py: that
  fixture is a generic callback response unrelated to the rules, and it should
  still use a valid Biolink predicate
@cbizon cbizon changed the title Replace affects_response_to with affects_sensitivity_to in Aragorn rules Remove Aragorn rules that use the invalid affects_response_to predicate Oct 30, 2026
@cbizon

cbizon commented Oct 30, 2026

Copy link
Copy Markdown
Collaborator Author

Ok, now taken out.

The treats rule that used affects_sensitivity_to was dropped, so a pinned
treats lookup now expands to ten templates plus the direct lookup (11).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S2yuRCTqohAzMDKNwK31zv
@maximusunc
maximusunc merged commit f232b0a into devel Oct 30, 2026
2 checks passed
@maximusunc
maximusunc deleted the fix/157-affects-sensitivity-to branch October 30, 2026 14:51
maximusunc pushed a commit that referenced this pull request Oct 30, 2026
- #198: the stored response starts with an empty knowledge graph and
  results when the query has none. Ported to 1.6's add_query, whose stored
  response is the whole query (no 2.0 prepare_stored_response);
  test_stored_response.py (2.0's stored form) stays deleted.
- #197: the 22 rules that used affects_response_to are removed from the 1.x
  rules file, matched by their Rule text; every category now holds the
  same rules as devel's, in the same order, and nothing else changed.
- #196: catrax-pathfinder 3.1.0, already on this branch (v1.3.3).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TtsBikU9y9AFQ5uu9tcioz
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.

Remove invalid predicate from Aragorn rules

3 participants