Improve signal quality (Exa news category) and remove mock fallback

Exa harvester:
- EXA_CATEGORY=news (default) restricts to news articles, excluding evergreen
  careers/marketing landing pages that were producing irrelevant signals.
- Event-focused query (acquisition/earnings/launch/leadership), dropped
  hiring/career terms that pulled recruiting pages.
- Domain scoping now OFF by default (broad-web news about the account beats
  first-party careers pages); add EXA_EXCLUDE_DOMAINS and loop --domain-filter.

LLM layer:
- Remove the mock reasoner entirely (no provider => loop refuses to run).
- On HTTP 429, WAIT (LLM_RATELIMIT_WAIT_SECONDS, default 900s; honors
  Retry-After) and retry up to LLM_RATELIMIT_MAX_RETRIES (24) instead of
  degrading to mock output.
- If the LLM is ultimately unavailable for an account, skip it and leave its
  signals unconsumed (retried next run) — never fabricate briefs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-24 10:41:41 -04:00
parent 2374ef137d
commit 9131e83c08
9 changed files with 169 additions and 173 deletions

View File

@@ -12,15 +12,17 @@ OPENAI_API_KEY=
OPENAI_MODEL=gpt-4o-mini
OPENAI_JSON_MODE=1 # set 0 if the endpoint rejects response_format=json_object
# There is NO mock fallback. On HTTP 429 the loop WAITS this long and retries
# (honors Retry-After if present), so it grinds through tight rate limits.
LLM_RATELIMIT_WAIT_SECONDS=900
LLM_RATELIMIT_MAX_RETRIES=24
# Other providers:
GEMINI_API_KEY=
GEMINI_MODEL=gemini-2.5-flash
ANTHROPIC_API_KEY=
LLM_MODEL=claude-sonnet-4-6
# Force the offline mock reasoner even if a key is set:
# USE_MOCK_LLM=1
# Scoring thresholds (design Phase 5)
PRIORITY_THRESHOLD=0.72
STANDARD_THRESHOLD=0.45
@@ -36,6 +38,12 @@ EXA_MONTHLY_REQUEST_CAP=1000
EXA_PER_RUN_REQUEST_CAP=25
EXA_RESULTS_PER_QUERY=5
EXA_LOOKBACK_DAYS=45
# Scope news to each account's own domain (1, default) to cut ticker/analyst
# noise, or search the broad web (0). Override per run: loop --no-domain-filter
EXA_DOMAIN_FILTER=1
# Exa content category. "news" keeps out careers/marketing landing pages — the
# biggest signal-quality lever. "" disables category filtering.
EXA_CATEGORY=news
# Scope to the account's own domain (1) or broad-web news about it (0, default).
# With category=news, broad web finds actual coverage; domain scoping finds the
# company's own newsroom. Override per run: loop --no-domain-filter / --domain-filter
EXA_DOMAIN_FILTER=0
# Hosts to always exclude (comma-separated), e.g. talent.example.com,careers.example.com
EXA_EXCLUDE_DOMAINS=