Guides / Cookbooks
Cookbooks · Text · Beginner · about 5 min
Is a headline relevant to a symbol?
For a headline and a company, ask whether it is about the company, which way it cuts, and how much it could matter, before it reaches a model or a person.
When to use it
News feeds are mostly noise for any one name. Score each headline before it reaches a desk channel or a downstream model. The headline below is a sample written for this recipe, not a real news item.
The request
{ "model": "ora-fin1", "state": "NVIDIA (NVDA) shares slip after a large cloud customer says it will design more of its own AI accelerators instead of buying them.", "questions": { "about_nvda": { "type": "yes_no", "instructions": "Is this headline about NVIDIA or its products?" }, "tone": { "type": "choice", "instructions": "For NVIDIA shareholders, this news is", "criteria": { "positive": "Good: more demand, wins, upgrades", "negative": "Bad: lost demand, a customer leaving, downgrades", "neutral": "Neither, or unclear" } }, "materiality": { "type": "score", "instructions": "How much could this matter to NVIDIA's revenue?", "criteria": [ "Not at all", "A little", "Noticeably", "A lot" ] } } }Open this in the PlaygroundThe real response
{ "model": "ora-fin1", "answers": { "about_nvda": { "type": "yes_no", "yes_no": 0.92 }, "tone": { "type": "choice", "choice": "negative", "confidence": 0.693, "probabilities": { "positive": 0.143, "negative": 0.795, "neutral": 0.062 } }, "materiality": { "type": "score", "score": 1.046, "confidence": 0.954, "legend": [ "Not at all", "A little", "Noticeably", "A lot" ], "probabilities": [ 0, 0.958, 0.038, 0.004 ] } }, "usage": { "input_tokens": 440, "output_tokens": 19 }, "version": "ora-text-0.2.0" }About the company: 0.92. Tone: negative (confidence 0.693). Materiality: 1.046 on 0–3, mostly “A little”.
The code
Requires curl 7.76+. Save as run.sh, then: bash run.shcurl -sS https://oramodel.com/v1/systemone \ -H "Authorization: Bearer $JEV_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "ora-fin1", "state": "NVIDIA (NVDA) shares slip after a large cloud customer says it will design more of its own AI accelerators instead of buying them.", "questions": { "about_nvda": { "type": "yes_no", "instructions": "Is this headline about NVIDIA or its products?" }, "tone": { "type": "choice", "instructions": "For NVIDIA shareholders, this news is", "criteria": { "positive": "Good: more demand, wins, upgrades", "negative": "Bad: lost demand, a customer leaving, downgrades", "neutral": "Neither, or unclear" } }, "materiality": { "type": "score", "instructions": "How much could this matter to NVIDIA'\''s revenue?", "criteria": [ "Not at all", "A little", "Noticeably", "A lot" ] } } }'Act on it
a = data["answers"] if a["about_nvda"]["yes_no"] >= 0.7 and a["materiality"]["score"] >= 1.5: post_to_desk(headline, tone=a["tone"]["choice"]) elif a["about_nvda"]["yes_no"] >= 0.7: archive(headline, tag="nvda")Text answers describe the headline, not the price. To ask about the stock itself, send the symbol (Decide on a stock with just its symbol).
Variations
- Name the company in the question, not only in the text: answers are sharper.
- Ask several companies' questions about one headline in one request.
Information, not investment advice. Every number on this page is a real response for the session shown; answers change with each session.