From d47b31089834fc7b94211c838d08b63a58ee84e6 Mon Sep 17 00:00:00 2001 From: Giorgio Gilestro Date: Fri, 29 May 2026 16:27:54 +0200 Subject: [PATCH] portfolio: drop rational/irrational + system-temperature from prompt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The base build_system_prompt() bakes in two artefacts that read fine in the daily strategic log but cause repeated reviewer rejections on the portfolio surface: - The "Rational vs irrational" framework, which the model translates into IT/ES/FR/DE variants ("Razionalmente / Irrazionalmente", "Razionale se / Irrazionale se", etc.). Haiku reads the parallel contrast lists as the author working through their reasoning on the page and rejects as scratchpad. - The mandatory "System temperature: [label] — …" closing line, which Haiku correctly flags as meta-commentary on this surface (it has no narrative anchor in a portfolio read). Both are wired into the base prompt and don't add value here. Drop them explicitly via an "# DO NOT include in this surface" override block in _SYSTEM_OVERRIDES. The portfolio read is just plain declarative commentary on the holdings now — opening posture sentence, 3-5 paragraphs on concentration / tilt / currency / winners-losers / what would invalidate, end of story. Reviewer's rational-vs-irrational structural-device carve-out (added in de3a9bf) stays — strategic log, indicator summaries, and digest emails still legitimately use that framing. Co-Authored-By: Claude Opus 4.7 --- app/services/portfolio_analysis.py | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/app/services/portfolio_analysis.py b/app/services/portfolio_analysis.py index 9de6383..9cb84c6 100644 --- a/app/services/portfolio_analysis.py +++ b/app/services/portfolio_analysis.py @@ -257,18 +257,14 @@ implies X under scenario Y"), not advice ("buy X" / "sell Y" are forbidden). - ~350 words. No bullet lists. No buy/sell recommendations. - Do not repeat the input data verbatim — interpret it. -# Rational vs irrational lens (mandatory) -Carry the base prompt's rational-vs-irrational framing through to every -paragraph of the portfolio read. For each section above, contrast: -- The RATIONAL read: what the underlying factors (fundamentals, - macro/policy regime, valuation, currency dynamics) justify for this - exposure; -- The IRRATIONAL read: what positioning, narrative momentum, sentiment - or flows are doing to that same exposure right now. -Then name the GAP — does the holder's posture line up with the rational -read, or is it riding the irrational one? A paragraph that names only -the pie's numbers or only the macro backdrop, without placing the -holding on this rational-vs-irrational axis, is incomplete. +# DO NOT include in this surface (overrides the base prompt) +- No "Rational vs irrational" framing, no "Rational:" / "Irrational:" + section labels, no parallel contrast lists. The base prompt asks + for this framework elsewhere; this surface is plain declarative + commentary on the holdings, not a comparative essay. +- No "System temperature:" closing line. That artefact belongs to the + daily strategic log; here the analysis ends with the last paragraph. +- No "Update mode" headers, no anchor-date callouts, no watch list. """