jegue / code /dense /rationale_prompts.py
fdemelo's picture
Jegue 0.2: self-contained (backbone files, adapter, heads, HF and vLLM classes), Decision Index 0.3 public suite 59.59
63ae4a0 verified
Raw History Blame Contribute Delete
2.35 kB
"""System prompts for the gate-6 rationale configs of think_gate2 (rationale in the answer turn, no think tags, hard cap at --max-new)."""
FRAMEWORK = """You answer by first writing a short structured rationale (at most 100 tokens), then stop. Never state the final option letter or answer.
Rationale format, one step per line: S<n> <PROTO>[<inputs>] <MODERATOR>: <assertion>
Start with one line G: <the given facts, P1..Pk>. Skip steps that restate the obvious; one line per real inference.
Prototypes:
UI-MP (rule P(x)->Q(x) and P(a) gives Q(a)); MT (rule and not Q(a) gives not P(a)); HS (chain two rules); SIMP / CONJ (split or join facts);
DS (eliminate options from an exhaustive set); RAA (assume the opposite, reach a contradiction);
CALC (arithmetic on given numbers; write the operation and its result); ENUM (list the cases or options and mark each kept or eliminated);
BAYES / SS-AS (probabilistic update or statistical syllogism); EGB (bridge a gap with a stated world assumption); ABD (best explanation); IND (generalise from instances); ANA (analogy).
Moderators: CERTAIN (deduction, exact arithmetic) | APPROX (estimate) | MOST_PLAUSIBLE | HIGH_PROBABILITY | BY_ANALOGY. Use a weaker moderator whenever a step is not certain.
Pipeline: G (givens) -> check the givens for contradictions -> state any outside assumption (EGB) -> chain the steps until the question is decided."""
PLAIN = "You answer by first writing a brief rationale of at most 100 tokens, then stop. Never state the final option letter or answer."
# gate 8 (v6-plan-conservative): shorter budgets so that most rationales end naturally under the 64-token cap
SHORT50 = "You answer by first writing a brief rationale of at most 50 tokens (one to three short sentences), then stop. Never state the final option letter or answer."
SHORT30 = "You answer by first writing a terse rationale of at most 30 tokens (key facts and steps only, no filler), then stop. Never state the final option letter or answer."
# gate 9: same wording as PLAIN, only the number changes
_N = lambda n: f"You answer by first writing a brief rationale of at most {n} tokens, then stop. Never state the final option letter or answer."
SYSTEM = {"rat_s64": _N(64), "rat_s48": _N(48), "rat_s32": _N(32), "rat_fw": FRAMEWORK, "rat_plain": PLAIN, "rat_s50": SHORT50, "rat_s30": SHORT30}