Skip to content
This repository has been archived by the owner on Jun 9, 2024. It is now read-only.

Commit

Permalink
prompt eng, training and validation, training
Browse files Browse the repository at this point in the history
  • Loading branch information
SilenNaihin committed Sep 21, 2023
1 parent 1a88634 commit 1f9f1ef
Show file tree
Hide file tree
Showing 35 changed files with 26,486 additions and 36,585 deletions.
44 changes: 24 additions & 20 deletions paper/agent_action_regex.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,26 +24,30 @@ def is_action_auto_gpt(log):
command_existence = bool(re.search(r'"command"\s*:', log))

if command_existence:
# Convert the JSON-like string to a Python dictionary
log_dict = json.loads(log)

# Check if the "command" key exists and has a "name" key
if "command" in log_dict and "name" in log_dict["command"]:
command_name = log_dict["command"]["name"]

# List of command names that signify an action
action_command_names = [
"web_search",
"write_to_file",
"browse_website",
"execute_python_file",
"list_files",
"execute_python_code",
"read_file",
]

# Check if the command name matches any in the list
return command_name in action_command_names
try:
# Convert the JSON-like string to a Python dictionary
log_dict = json.loads(log)

# Check if the "command" key exists and has a "name" key
if "command" in log_dict and "name" in log_dict["command"]:
command_name = log_dict["command"]["name"]

# List of command names that signify an action
action_command_names = [
"web_search",
"write_to_file",
"browse_website",
"execute_python_file",
"list_files",
"execute_python_code",
"read_file",
]

# Check if the command name matches any in the list
return command_name in action_command_names
except Exception as e:
print(e, log)
raise e

return False

Expand Down
5,109 changes: 2,500 additions & 2,609 deletions paper/all_logs/auto-gpt/inserted_malicious_responses.json

Large diffs are not rendered by default.

10,967 changes: 10,967 additions & 0 deletions paper/all_logs/auto-gpt/previous_insertions/inserted_malicious_responses_2.json

Large diffs are not rendered by default.

9,807 changes: 0 additions & 9,807 deletions paper/all_logs/auto-gpt/previous_insertions/regex_simple.json

This file was deleted.

186 changes: 0 additions & 186 deletions paper/all_logs/auto-gpt/prompt.json

Large diffs are not rendered by default.

4,907 changes: 2,484 additions & 2,423 deletions paper/all_logs/auto-gpt/regex_simple.json

Large diffs are not rendered by default.

4,789 changes: 2,487 additions & 2,302 deletions paper/all_logs/auto-gpt/regex_specific.json

Large diffs are not rendered by default.

528 changes: 0 additions & 528 deletions paper/all_logs/auto-gpt/response.json

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions paper/all_logs/auto-gpt/stats.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"metrics": {
"inserted_%": "30%",
"Total logs": 1965,
"Total logs to insert": "57 with 7 unique commands",
"Category 0 count": 172,
"Category 1 count": 162,
"Category 2 count": 53,
"Simple regex filter logs": 1800,
"Specific regex filter logs": 1292,
"train_set": 109,
"test_set": 313
}
}
2,097 changes: 2,097 additions & 0 deletions paper/all_logs/auto-gpt/train.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

542 changes: 0 additions & 542 deletions paper/all_logs/beebot/prompt.json

Large diffs are not rendered by default.

1,934 changes: 38 additions & 1,896 deletions paper/all_logs/beebot/regex_simple.json

Large diffs are not rendered by default.

Loading

0 comments on commit 1f9f1ef

Please sign in to comment.