AJAY KASU commited on
Commit
fc1fb2d
·
1 Parent(s): b0bf092

Phase 14: Temporal Grounding (Lock 2026, ban 2023 drift)

Browse files
Files changed (3) hide show
  1. agents/humanizer.py +4 -4
  2. agents/planner.py +2 -1
  3. agents/writer.py +7 -7
agents/humanizer.py CHANGED
@@ -163,10 +163,10 @@ class Humanizer:
163
 
164
  def _build_messages(self, text, feedback=""):
165
  system_content = (
166
- "1. SYMMETRY BREAKER: If two sentences in a row have similar structure or length, rewrite the second one to be much shorter. Breakdown symmetry.\n"
167
- "2. DELETE TRANSITIONS: Delete transitions like 'As of 2024' or 'Research suggests'. Use blunt starts like 'In 2024' or 'Data shows'.\n"
168
- "3. BAN 'ADDITIONALLY', 'NOTABLY', 'FURTHERMORE', 'WORLDWIDE', 'MOREOVER', 'TRANSFORMATIVE', 'JOURNEY': Delete these words entirely.\n"
169
- "4. BREAK TRIPLET LISTS: Rewrite any list of three things into two or expand into separate sentences.\n"
170
  "5. NOUN STARTS: Do not start consecutive sentences with the same Proper Noun.\n"
171
  "6. DATA DENSITY: Ensure every paragraph includes at least one specific statistic (e.g., 42, 92) and one name (e.g., Mike, Whitfield).\n"
172
  "7. BAN THE EM-DASH: Replace all '—' or '--' symbols with simple commas or periods.\n"
 
163
 
164
  def _build_messages(self, text, feedback=""):
165
  system_content = (
166
+ "1. TEMPORAL VERIFICATION: Current year is 2026. Flag and delete '2023' or '2024' as current context. Only keep past years if explicitly in source.\n"
167
+ "2. SYMMETRY BREAKER: If two sentences in a row have similar structure or length, rewrite the second one to be much shorter. Breakdown symmetry.\n"
168
+ "3. DELETE TRANSITIONS: Delete transitions like 'As of 2024' or 'Research suggests'. Use blunt starts like 'In 2026' or 'Data shows'.\n"
169
+ "4. BAN 'ADDITIONALLY', 'NOTABLY', 'FURTHERMORE', 'WORLDWIDE', 'MOREOVER', 'TRANSFORMATIVE', 'JOURNEY': Delete these words entirely.\n"
170
  "5. NOUN STARTS: Do not start consecutive sentences with the same Proper Noun.\n"
171
  "6. DATA DENSITY: Ensure every paragraph includes at least one specific statistic (e.g., 42, 92) and one name (e.g., Mike, Whitfield).\n"
172
  "7. BAN THE EM-DASH: Replace all '—' or '--' symbols with simple commas or periods.\n"
agents/planner.py CHANGED
@@ -57,8 +57,9 @@ class Planner:
57
 
58
  def _generate_outline(self, text, attempt):
59
  system_content = (
 
60
  "You are a technical data extraction specialist. Your goal is to extract ONLY hard facts from the source text.\n"
61
- "STRICT FIDELITY: You must mirror the source exactly. Do not use external themes.\n"
62
  "1. THEMES: List 3 specific themes found ONLY in the provided text.\n"
63
  "2. DATA (MIRROR RULE): Extract specific statistics and names with EXACT WORDING. If the source says '42 percent', do not write '42%'.\n"
64
  "3. CHRONOLOGY: Entities must appear in a logical or chronological sequence.\n\n"
 
57
 
58
  def _generate_outline(self, text, attempt):
59
  system_content = (
60
+ "TODAY'S DATE: February 11, 2026.\n"
61
  "You are a technical data extraction specialist. Your goal is to extract ONLY hard facts from the source text.\n"
62
+ "STRICT FIDELITY: You must mirror the source exactly. Assume the text is current as of 2026.\n"
63
  "1. THEMES: List 3 specific themes found ONLY in the provided text.\n"
64
  "2. DATA (MIRROR RULE): Extract specific statistics and names with EXACT WORDING. If the source says '42 percent', do not write '42%'.\n"
65
  "3. CHRONOLOGY: Entities must appear in a logical or chronological sequence.\n\n"
agents/writer.py CHANGED
@@ -23,19 +23,19 @@ class Writer:
23
  logger.info("writer: generating clinical draft (topic=%s)", plan.get("topic"))
24
 
25
  system_content = (
 
26
  "You are a technical reporter. Use a STACCATO RHYTHM to break symmetry.\n\n"
 
 
 
27
  "GROUNDING RULE (Strict Source Adherence):\n"
28
  "1. NO EXTERNAL KNOWLEDGE: Do not talk about IBM or Microsoft unless they are in the outline. Use ONLY the data provided.\n"
29
  "2. THEME MIRROR: If the outline mentions 'household tasks', you MUST mention 'household tasks'.\n"
30
- "3. NAME USAGE: Use the specific names mentioned (e.g., NVIDIA's Mike Mendelson, Brennan Whitfield). Omission is failure.\n\n"
31
  "THE RHYTHM FIX (Information-Type Starts):\n"
32
- "1. PARAGRAPH 1: Must start with a date.\n"
33
  "2. PARAGRAPH 2: Must start with a direct quote.\n"
34
- "3. PARAGRAPH 3: Must start with a specific statistic.\n\n"
35
- "STRICT GUIDELINES:\n"
36
- "1. NO INTRO: Start immediately with the first paragraph's date.\n"
37
- "2. NO SOFT CONNECTORS: Never use 'Moreover', 'Transformative', or 'Journey'.\n"
38
- "3. STOP BEING HELPFUL: Just state facts as isolated observations."
39
  )
40
 
41
  # Convert plan to readable string for the LLM
 
23
  logger.info("writer: generating clinical draft (topic=%s)", plan.get("topic"))
24
 
25
  system_content = (
26
+ "CURRENT CONTEXT: February 11, 2026.\n"
27
  "You are a technical reporter. Use a STACCATO RHYTHM to break symmetry.\n\n"
28
+ "TEMPORAL LOCK (Grounding in 2026):\n"
29
+ "1. NO YEAR DRIFT: Do not use any year before 2025 as the 'current' or 'present' year. If you state a date, it should be 2026.\n"
30
+ "2. BAN 'RECENT' FOR OLD DATA: Do not call a 2023 study 'recent'. If the source text is current, treat it as early 2026 reportage.\n\n"
31
  "GROUNDING RULE (Strict Source Adherence):\n"
32
  "1. NO EXTERNAL KNOWLEDGE: Do not talk about IBM or Microsoft unless they are in the outline. Use ONLY the data provided.\n"
33
  "2. THEME MIRROR: If the outline mentions 'household tasks', you MUST mention 'household tasks'.\n"
34
+ "3. NAME USAGE: Use the specific names mentioned (e.g., Mike Mendelson). Omission is failure.\n\n"
35
  "THE RHYTHM FIX (Information-Type Starts):\n"
36
+ "1. PARAGRAPH 1: Must start with a date (e.g., Feb 11, 2026).\n"
37
  "2. PARAGRAPH 2: Must start with a direct quote.\n"
38
+ "3. PARAGRAPH 3: Must start with a specific statistic.\n"
 
 
 
 
39
  )
40
 
41
  # Convert plan to readable string for the LLM