From 36689e3fbb139e4b56775aee9df7ba53e02015ca Mon Sep 17 00:00:00 2001 From: rob thijssen Date: Tue, 10 Mar 2026 12:09:18 +0200 Subject: [PATCH] Prompt: fix field+offset kind omission and add interval guidance MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two gaps revealed by the 2026-03-10T11:42:49 run: - Iterations 11-15 all failed with "missing field 'kind'" when the model wrote {"field":"volume","offset":-1} without the required "kind":"field". Expand the existing kind-required note with explicit offset examples. - Iteration 10 switched to 15m unprompted and got sharpe=-0.41 from overtrading. Add anti-pattern note: don't change interval when sharpe is negative — fix the signal logic instead. Co-Authored-By: Claude Sonnet 4.6 --- src/prompts.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/prompts.rs b/src/prompts.rs index c6c997f..c4fde39 100644 --- a/src/prompts.rs +++ b/src/prompts.rs @@ -190,6 +190,9 @@ Common mistakes to NEVER make: - `"kind": "expr_field"` does NOT exist. Use `{{"kind":"field","field":"close"}}`. - Every Expr object MUST have a `"kind"` field. `{{"field":"close"}}` is WRONG — missing `"kind"`. CORRECT: `{{"kind":"field","field":"close"}}`. The `"kind"` is never optional. + This applies to ALL field access including offset lookups: + `{{"field":"volume","offset":-1}}` is WRONG. CORRECT: `{{"kind":"field","field":"volume","offset":-1}}`. + `{{"field":"high","offset":-2}}` is WRONG. CORRECT: `{{"kind":"field","field":"high","offset":-2}}`. - `rsi`, `adx`, `supertrend` are NOT valid inside `apply_func`. Use only `apply_func` with `ApplyFuncName` values: `highest`, `lowest`, `sma`, `ema`, `wma`, `std_dev`, `sum`, `bollinger_upper`, `bollinger_lower`. @@ -473,6 +476,9 @@ CRITICAL: `apply_func` uses `"input"`, not `"expr"`. Writing `"expr":` will be r - Don't set RSI thresholds at extreme values (< 10 or > 90) — too rare to fire - Don't use very short periods (< 5) on high timeframes — noisy - Don't use very long periods (> 100) on low timeframes — too slow to react +- Don't switch to 15m or shorter intervals when results are poor — higher frequency amplifies + fees and noise, making edge harder to find. Prefer 1h or 4h. If Sharpe is negative across + intervals, the issue is signal logic, not timeframe — fix the signal before changing interval. - Don't create strategies with more than 5-6 conditions — overfitting risk - Don't ignore fees — a strategy needs to overcome 0.1% per round trip - Always gate buy rules with position state "flat" and sell rules with "long"