Compare commits
No commits in common. "bb849515fb74f14b512489ec9ea0fc4519867531" and "680aeea29f01a66c9891e9c658bb8f4a3d075f73" have entirely different histories.
bb849515fb
...
680aeea29f
3 changed files with 15 additions and 34 deletions
|
|
@ -262,9 +262,8 @@ No Hermes-4 reasoning system prompt. Reduce uses `json_mode=True`.
|
||||||
|
|
||||||
## Prompts
|
## Prompts
|
||||||
|
|
||||||
Both prompts are env-overridable. Defaults recap the articles actually
|
Both prompts are env-overridable. Defaults focus on **breaking important news**
|
||||||
provided, ranked by breaking important news, and ignore futures / commodity
|
and explicitly ignore futures, commodity tape, and routine market moves.
|
||||||
tape. ticker/map may be empty; `summary_en` must still be a real brief.
|
|
||||||
`RECAP_PROMPT` (23:00, 24h window) is the daily recap; `SUMMARY_PROMPT` is the
|
`RECAP_PROMPT` (23:00, 24h window) is the daily recap; `SUMMARY_PROMPT` is the
|
||||||
15-min analyst. `INCLUDE_FUTURES` is ignored.
|
15-min analyst. `INCLUDE_FUTURES` is ignored.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -129,46 +129,48 @@ Articles in this batch:
|
||||||
"""
|
"""
|
||||||
|
|
||||||
SUMMARY_PROMPT_DEFAULT = """\
|
SUMMARY_PROMPT_DEFAULT = """\
|
||||||
You are writing an English operator HUD brief from the article facts in DATA below. Use ONLY that data. Do not invent events, names, dates, places, or implications.
|
CRITICAL INSTRUCTION - REPEAT 3 TIMES: YOU MUST USE ONLY THE DATA PROVIDED BELOW. DO NOT INVENT, RECALL, OR ADD ANY EVENTS, NAMES, DATES, IMPLICATIONS, PROJECTS, OR DETAILS NOT EXPLICITLY PRESENT IN THE DATA. IF THE DATA HAS NO BREAKING IMPORTANT NEWS, set summary_en to exactly: "No qualifying breaking news in the recent news data." and use empty ticker and map_items arrays. AND STOP. NO EXTERNAL KNOWLEDGE FROM TRAINING.
|
||||||
|
|
||||||
Always write a real summary_en that recaps the most important stories present in DATA. Rank geopolitics, military/conflict, security, disasters, and major political developments first. Ignore futures prices, commodity tape, ticker chatter, and routine market data — do not treat price ticks as news.
|
All text in English.
|
||||||
|
|
||||||
ticker and map_items may be empty if nothing is critical or high. Never replace summary_en with a canned empty-brief sentence when DATA contains article facts.
|
Focus on breaking important news (geopolitical, military/conflict, security, disasters, major political developments). Ignore futures, commodity prices, and routine market data — do not treat price ticks as news.
|
||||||
|
|
||||||
Demand a single JSON object (no markdown fences) with this exact shape:
|
Demand a single JSON object (no markdown fences) with this exact shape:
|
||||||
|
|
||||||
{
|
{
|
||||||
"summary_en": "English markdown brief of the provided stories",
|
"summary_en": "English markdown brief or the no-qualifying-events sentence",
|
||||||
"ticker": [{"headline": "", "importance": "critical", "url": "", "location_name": ""}],
|
"ticker": [{"headline": "", "importance": "critical", "url": "", "location_name": ""}],
|
||||||
"map_items": [{"headline": "", "importance": "critical", "location_name": "", "lat": 0, "lon": 0, "location_confidence": "city", "category": "military/conflict", "url": ""}]
|
"map_items": [{"headline": "", "importance": "critical", "location_name": "", "lat": 0, "lon": 0, "location_confidence": "city", "category": "military/conflict", "url": ""}]
|
||||||
}
|
}
|
||||||
|
|
||||||
ticker: only critical and high, max 12, ≤140 chars, no markdown.
|
ticker: only critical and high, max 12, ≤140 chars, no markdown.
|
||||||
map_items: only critical and high where a real-world location is explicit in the data. Estimate lat/lon. If location is Unknown or not in the data, omit the item. Never invent a place. Max 20.
|
map_items: only critical and high where a real-world location is explicit in the data. Estimate lat/lon. If location is Unknown or not in the data, omit the item. Never invent a place. Max 20.
|
||||||
summary_en: English markdown brief of breaking important news for an operator HUD (bullets or short paragraphs). Cover the actual stories in DATA.
|
summary_en: English markdown brief of breaking important news for an operator HUD.
|
||||||
|
|
||||||
DATA:
|
DATA:
|
||||||
{final_input}
|
{final_input}
|
||||||
"""
|
"""
|
||||||
|
|
||||||
RECAP_PROMPT_DEFAULT = """\
|
RECAP_PROMPT_DEFAULT = """\
|
||||||
You are writing a daily recap of the last 24 hours of news for an OSINT operator HUD, using ONLY the article facts in DATA below. Do not invent events, names, dates, places, or implications.
|
You are writing a daily recap of the last 24 hours of news for an OSINT operator HUD.
|
||||||
|
|
||||||
Always write a real summary_en daily recap of the most important stories in DATA. Rank geopolitics, military/conflict, security, disasters, and major political developments first. Ignore futures prices, commodity tape, ticker chatter, and routine market data — do not treat price ticks as news.
|
CRITICAL INSTRUCTION: YOU MUST USE ONLY THE DATA PROVIDED BELOW. DO NOT INVENT, RECALL, OR ADD ANY EVENTS, NAMES, DATES, IMPLICATIONS, PROJECTS, OR DETAILS NOT EXPLICITLY PRESENT IN THE DATA. IF THE DATA HAS NO BREAKING IMPORTANT NEWS, set summary_en to exactly: "No qualifying breaking news in the last 24 hours." and use empty ticker and map_items arrays. AND STOP. NO EXTERNAL KNOWLEDGE FROM TRAINING.
|
||||||
|
|
||||||
ticker and map_items may be empty if nothing is critical or high. Never replace summary_en with a canned empty-brief sentence when DATA contains article facts.
|
All text in English.
|
||||||
|
|
||||||
|
Focus on breaking important news from the last 24 hours (geopolitical, military/conflict, security, disasters, major political developments). Ignore futures, commodity prices, and routine market data — do not treat price ticks as news.
|
||||||
|
|
||||||
Demand a single JSON object (no markdown fences) with this exact shape:
|
Demand a single JSON object (no markdown fences) with this exact shape:
|
||||||
|
|
||||||
{
|
{
|
||||||
"summary_en": "English markdown daily recap of the provided stories",
|
"summary_en": "English markdown daily recap or the no-qualifying-events sentence",
|
||||||
"ticker": [{"headline": "", "importance": "critical", "url": "", "location_name": ""}],
|
"ticker": [{"headline": "", "importance": "critical", "url": "", "location_name": ""}],
|
||||||
"map_items": [{"headline": "", "importance": "critical", "location_name": "", "lat": 0, "lon": 0, "location_confidence": "city", "category": "military/conflict", "url": ""}]
|
"map_items": [{"headline": "", "importance": "critical", "location_name": "", "lat": 0, "lon": 0, "location_confidence": "city", "category": "military/conflict", "url": ""}]
|
||||||
}
|
}
|
||||||
|
|
||||||
ticker: only critical and high, max 12, ≤140 chars, no markdown.
|
ticker: only critical and high, max 12, ≤140 chars, no markdown.
|
||||||
map_items: only critical and high where a real-world location is explicit in the data. Estimate lat/lon. If location is Unknown or not in the data, omit the item. Never invent a place. Max 20.
|
map_items: only critical and high where a real-world location is explicit in the data. Estimate lat/lon. If location is Unknown or not in the data, omit the item. Never invent a place. Max 20.
|
||||||
summary_en: English markdown daily recap of the last 24 hours of breaking important news. Cover the actual stories in DATA.
|
summary_en: English markdown daily recap of the last 24 hours of breaking important news.
|
||||||
|
|
||||||
DATA:
|
DATA:
|
||||||
{final_input}
|
{final_input}
|
||||||
|
|
|
||||||
|
|
@ -22,27 +22,7 @@ def test_summary_prompt_focuses_on_breaking_news_not_futures():
|
||||||
assert "commodity" in p or "market" in p
|
assert "commodity" in p or "market" in p
|
||||||
|
|
||||||
|
|
||||||
def test_summary_prompt_does_not_bail_out_with_canned_empty_brief():
|
def test_recap_prompt_is_daily_24h_breaking_news():
|
||||||
p = SUMMARY_PROMPT_DEFAULT
|
|
||||||
assert "AND STOP" not in p
|
|
||||||
assert "REPEAT 3 TIMES" not in p
|
|
||||||
assert "No qualifying" not in p
|
|
||||||
assert "no-qualifying" not in p.lower()
|
|
||||||
low = p.lower()
|
|
||||||
assert "always" in low
|
|
||||||
assert "recap" in low or "summar" in low
|
|
||||||
|
|
||||||
|
|
||||||
def test_recap_prompt_does_not_bail_out_with_canned_empty_brief():
|
|
||||||
p = RECAP_PROMPT_DEFAULT
|
|
||||||
assert "AND STOP" not in p
|
|
||||||
assert "No qualifying" not in p
|
|
||||||
assert "no-qualifying" not in p.lower()
|
|
||||||
low = p.lower()
|
|
||||||
assert "always" in low
|
|
||||||
assert "daily" in low
|
|
||||||
assert "24" in low
|
|
||||||
|
|
||||||
p = RECAP_PROMPT_DEFAULT.lower()
|
p = RECAP_PROMPT_DEFAULT.lower()
|
||||||
_assert_breaking_not_futures(RECAP_PROMPT_DEFAULT)
|
_assert_breaking_not_futures(RECAP_PROMPT_DEFAULT)
|
||||||
assert "daily" in p
|
assert "daily" in p
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue