fix: stop summarizer from bailing to a canned empty brief
The reduce/recap prompts told the model to AND STOP with "No qualifying…" whenever nothing looked breaking enough, so full article batches became one sentence. Always write summary_en from the provided stories; ticker and map may still be empty. Futures/market tape stay ignored.
This commit is contained in:
parent
680aeea29f
commit
7822d45f37
3 changed files with 34 additions and 15 deletions
|
|
@ -22,7 +22,27 @@ def test_summary_prompt_focuses_on_breaking_news_not_futures():
|
|||
assert "commodity" in p or "market" in p
|
||||
|
||||
|
||||
def test_recap_prompt_is_daily_24h_breaking_news():
|
||||
def test_summary_prompt_does_not_bail_out_with_canned_empty_brief():
|
||||
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()
|
||||
_assert_breaking_not_futures(RECAP_PROMPT_DEFAULT)
|
||||
assert "daily" in p
|
||||
|
|
|
|||
Loading…
Reference in a new issue