alisamak commited on
Commit
8f493ce
·
verified ·
1 Parent(s): f75c084

Update LG_agent.py

Browse files
Files changed (1) hide show
  1. LG_agent.py +7 -17
LG_agent.py CHANGED
@@ -16,20 +16,6 @@ chat = ChatOpenAI(
16
  model="gpt-3.5-turbo",
17
  openai_api_key=OPENAI_API_KEY,
18
  temperature=0,
19
- model_kwargs={
20
- "messages": [
21
- {
22
- "role": "system",
23
- "content": (
24
- "You are an intelligent agent that solves problems step by step.\n"
25
- "Before answering, first plan your response as if thinking out loud.\n"
26
- "If tools are available, call them explicitly and reflect on their results.\n"
27
- "Always finish with a clear and direct answer based on the evidence collected.\n"
28
- "Never make assumptions—use a tool or state lack of information."
29
- )
30
- }
31
- ]
32
- }
33
  )
34
 
35
  chat_with_tools = chat.bind_tools(all_tools)
@@ -48,9 +34,13 @@ def assistant(state: AgentState):
48
 
49
  sys_msg = SystemMessage(
50
  content=(
51
- "You are a helpful AI assistant. You solve problems step by step and can use the following tools:\n"
52
- f"{tool_descriptions}\n"
53
- "Always plan your response, invoke tools explicitly if needed, and conclude with a direct answer."
 
 
 
 
54
  )
55
  )
56
 
 
16
  model="gpt-3.5-turbo",
17
  openai_api_key=OPENAI_API_KEY,
18
  temperature=0,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  )
20
 
21
  chat_with_tools = chat.bind_tools(all_tools)
 
34
 
35
  sys_msg = SystemMessage(
36
  content=(
37
+ "You are a helpful AI assistant who solves GAIA benchmark questions using step-by-step reasoning.\n"
38
+ "Before answering, always think out loud and plan your approach.\n"
39
+ "Use tools when you lack information or need external data.\n"
40
+ "Never guess or make assumptions—if something is unknown, state it clearly or use a tool.\n"
41
+ "Conclude with a clear and supported final answer.\n"
42
+ "\nAvailable tools:\n"
43
+ f"{tool_descriptions}"
44
  )
45
  )
46