Nexari-Research commited on
Commit
49afcdd
·
verified ·
1 Parent(s): 52db5b1

Update cognitive_engine.py

Browse files
Files changed (1) hide show
  1. cognitive_engine.py +9 -6
cognitive_engine.py CHANGED
@@ -1,6 +1,5 @@
1
  """
2
- cognitive_engine.py - thinking strategy
3
- - Supports 'detail' flag to request numbered/detailed answers
4
  """
5
 
6
  from datetime import datetime
@@ -12,14 +11,18 @@ def get_time_context():
12
  return f"### REAL-TIME INFO ###\nCurrent Time: {now.strftime('%I:%M %p')}\nDay: {now.strftime('%A')}\nDate: {now.strftime('%d %B %Y')}"
13
 
14
  def get_thinking_strategy(is_complex=False, detail=False):
 
 
 
15
  if is_complex or detail:
16
  return (
17
- "### STRATEGY: STRUCTURED & SAFE ###\n"
18
- "If the request is complex or user asked for detail, produce a short '🧠 Plan:' (max 2 lines) "
19
- "then '💡 Answer:' as numbered steps. Do NOT reveal internal chain-of-thought; keep final output concise and factual."
 
20
  )
21
  else:
22
  return (
23
  "### STRATEGY: CONCISE ###\n"
24
- "Answer in a friendly, short style; include one-line follow-up question."
25
  )
 
1
  """
2
+ cognitive_engine.py - thinking strategy with `detail` flag
 
3
  """
4
 
5
  from datetime import datetime
 
11
  return f"### REAL-TIME INFO ###\nCurrent Time: {now.strftime('%I:%M %p')}\nDay: {now.strftime('%A')}\nDate: {now.strftime('%d %B %Y')}"
12
 
13
  def get_thinking_strategy(is_complex=False, detail=False):
14
+ """
15
+ If detail==True, instruct model to produce a numbered, stepwise, longer answer.
16
+ """
17
  if is_complex or detail:
18
  return (
19
+ "### STRATEGY: STRUCTURED & DETAILED ###\n"
20
+ "If complex or user requested detail, provide a short '🧠 Plan:' (max 2 lines),\n"
21
+ "then a numbered, step-by-step '💡 Answer:' with clear numbered lines. "
22
+ "Aim for thorough coverage if requested by user. Do NOT leak chain-of-thought."
23
  )
24
  else:
25
  return (
26
  "### STRATEGY: CONCISE ###\n"
27
+ "Keep responses friendly and brief. Offer a one-line suggestion and a follow-up question."
28
  )