Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

Refine prompt to reduce unnecessary browsing and `open_file` use

Reinier van der Leerbcd00b39b7df
diff --git a/autogpt/commands/file_context.py b/autogpt/commands/file_context.py
index c5e00b8f3e..107bc6d67f 100644
--- a/autogpt/commands/file_context.py
+++ b/autogpt/commands/file_context.py
@@ -29,7 +29,8 @@ def agent_implements_context(agent: BaseAgent) -> bool:
@command(
"open_file",
- "Open a file for editing, creating it if it does not exist yet",
+ "Open a file for editing, creating it if it does not exist yet."
+ " Note: if you only need to read or write a file once, use `write_to_file` instead.",
{
"file_path": {
"type": "string",
diff --git a/autogpt/models/command.py b/autogpt/models/command.py
index a3369bb99e..48f913cf36 100644
--- a/autogpt/models/command.py
+++ b/autogpt/models/command.py
@@ -58,4 +58,4 @@ class Command:
f"{param.name}: {param.type if param.required else f'Optional[{param.type}]'}"
for param in self.parameters
]
- return f"{self.name}: {self.description}. Params: ({', '.join(params)})"
+ return f"{self.name}: {self.description.rstrip('.')}. Params: ({', '.join(params)})"
diff --git a/autogpt/prompts/generator.py b/autogpt/prompts/generator.py
index 755a3689f0..c5e1c52499 100644
--- a/autogpt/prompts/generator.py
+++ b/autogpt/prompts/generator.py
@@ -53,7 +53,7 @@ class PromptGenerator:
params_string = ", ".join(
f'"{key}": "{value}"' for key, value in self.params.items()
)
- return f'{self.label}: "{self.name}". Params: ({params_string})'
+ return f'{self.label}: "{self.name.rstrip(".")}". Params: ({params_string})'
def add_constraint(self, constraint: str) -> None:
"""
diff --git a/prompt_settings.yaml b/prompt_settings.yaml
index 4cdc03127c..438183803f 100644
--- a/prompt_settings.yaml
+++ b/prompt_settings.yaml
@@ -6,10 +6,12 @@ constraints: [
resources: [
'Internet access for searches and information gathering.',
'The ability to read and write files.',
+ 'You are a Large Language Model, trained on millions of pages of text, including a lot of factual knowledge. Make use of this factual knowledge to avoid unnecessary gathering of information.'
]
best_practices: [
'Continuously review and analyze your actions to ensure you are performing to the best of your abilities.',
'Constructively self-criticize your big-picture behavior constantly.',
'Reflect on past decisions and strategies to refine your approach.',
- 'Every command has a cost, so be smart and efficient. Aim to complete tasks in the least number of steps.'
+ 'Every command has a cost, so be smart and efficient. Aim to complete tasks in the least number of steps.',
+ 'Only make use of your information gathering abilities to find information that you don''t yet have knowledge of.'
]