KevinIsInCoding Claude Sonnet 4.6 commited on
Commit
a009989
·
unverified ·
1 Parent(s): 80162d5

perf: rank trials by phase, cap at 15, strip bloat, tighten defaults (#25)

Browse files

Trial ranking (Phase 4 > Phase 3 > ... > EAP > Observational) replaces
pure distance sorting so the highest-value trials surface first.

Token reduction (~60-80% of tool-result payload):
- _rank_and_slim: cap at 15 trials before LLM, strip summary/conditions/
keywords/age fields/std_ages/eligibility, reduce nearest_sites 5→3,
drop intervention descriptions
- max_tokens: research 8096→3000, bulk-parse eligibility 8192→4096

Default search radius: 100 miles → 20 miles

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

7 files changed +193 -13
Files changed (7)
agents/eligibility.py+26-4
agents/intake.py+2-2
agents/research.py+59-4
data/tools/submit_profile.json+1-1
models.py+1-1
tests/agents/test_eligibility.py+37
tests/agents/test_research.py+67-1