phase 17: pass all tracked tickers to extractor, soften prompt for macro-to-company relevance

This commit is contained in:
Celes Renata
2026-04-12 09:18:08 -07:00
parent 59f89d03d2
commit 57d0fc7d33
6 changed files with 142 additions and 4 deletions
+6 -3
View File
@@ -102,9 +102,12 @@ def build_extraction_prompt(
if known_tickers:
tickers_str = ", ".join(known_tickers)
ticker_hint = (
f"\nThe following tickers may be referenced in this document: {tickers_str}\n"
"Only include a ticker in your output if the document actually discusses that company. "
"Do NOT include a ticker just because it appears in this hint."
f"\nTracked tickers: {tickers_str}\n"
"If the document discusses market conditions, sectors, or themes that directly affect "
"any of these companies, include those companies with appropriate sentiment and impact scores. "
"A macro article about oil prices IS relevant to energy companies like XOM. "
"A tech sector article IS relevant to AAPL, MSFT, NVDA, etc. "
"Use your judgment — but only include companies where the connection is clear from the text."
)
schema_str = json.dumps(EXTRACTION_JSON_SCHEMA, indent=2)