StanSava commited on
Commit
5d988e9
·
1 Parent(s): ca8a4f7

fix prompts

Browse files
agents/context_compression_agent/context_compression_agent.py CHANGED
@@ -19,4 +19,4 @@ def compress_context(context: List[PlanningStep]):
19
  }
20
  ],
21
  )
22
- return completion
 
19
  }
20
  ],
21
  )
22
+ return completion.content
agents/context_compression_agent/get_context_compression_prompt.py CHANGED
@@ -10,13 +10,23 @@ def get_context_compression_prompt():
10
  - Remove any information that is not directly relevant to the task at hand.
11
  - You can also remove past planning phases, since the agent has a plan that is saved on disk.
12
  - Do NOT add new information or assumptions. Never guess missing data.
 
 
 
 
13
 
14
  Compressed output rules:
15
- - Use short, factual bullets or structured key=value notation.
16
  - Keep technical names unchanged (tables, fields, tools, IDs, URLs).
17
  - Maintain chronological order only if it affects correctness.
18
- - If information is incomplete, explicitly mark “unknown”.
 
 
 
19
 
20
  Your goal: **Minimum tokens, maximum retention, zero hallucination.**
21
 
 
 
 
 
22
  Output:"""
 
10
  - Remove any information that is not directly relevant to the task at hand.
11
  - You can also remove past planning phases, since the agent has a plan that is saved on disk.
12
  - Do NOT add new information or assumptions. Never guess missing data.
13
+ - Do NOT add any new information or assumptions. Never guess missing data.
14
+
15
+ IMPORTANT TASK:
16
+ - If a big text is repeated several times, define it as a variable in the text and replace occurrences with the variable name to save space.
17
 
18
  Compressed output rules:
 
19
  - Keep technical names unchanged (tables, fields, tools, IDs, URLs).
20
  - Maintain chronological order only if it affects correctness.
21
+ - If information is incomplete, do not try to guess it.
22
+ - Keep the same structure as the input, with the same field names. If you receive a list with objects, return a list with objects. KEEP THE EXACT STRUCTURE.
23
+ - Your output will replace the old context, so try to keep the same format and remove things only if it's necessary.
24
+ - Think of your output as the new context that will be passed to the agent.
25
 
26
  Your goal: **Minimum tokens, maximum retention, zero hallucination.**
27
 
28
+ Output MUST be valid JSON only. Do not add comments, explanations or markdown.
29
+
30
+ YOU MUST PRESERVE ALL KEYS FROM THE INPUT, DO NOT REMOVE KEYS, as this will break the context processing.
31
+
32
  Output:"""
agents/supabase_agent/get_supabase_agent_prompt.py CHANGED
@@ -72,7 +72,7 @@ def get_supabase_agent_prompt(managed_agent_prompt: dict):
72
  YOU MUST USE IT instead of writing SQL.
73
 
74
 
75
- Always return the data in a JSON object. The JSON object must match the following schema:
76
 
77
  {supabase_agent_return_schema}
78
 
 
72
  YOU MUST USE IT instead of writing SQL.
73
 
74
 
75
+ ALWAYS return the data in a JSON object. The JSON object must match the following schema:
76
 
77
  {supabase_agent_return_schema}
78