fix : major issue with file reading tool, feat : prompt improvement for browser agent
This commit is contained in:
@@ -112,7 +112,6 @@ class BrowserAgent(Agent):
|
||||
|
||||
1. **Decide if the page answers the user’s query:**
|
||||
- If it does, take notes of useful information (Note: ...), include relevant link in note, then move to a new page.
|
||||
- If it does and no futher step would help with user request, say {Action.REQUEST_EXIT}.
|
||||
- If it doesn’t, say: Error: <why page don't help> then go back or navigate to another link.
|
||||
2. **Navigate to a link by either: **
|
||||
- Saying I will navigate to (write down the full URL) www.example.com/cats
|
||||
@@ -122,6 +121,12 @@ class BrowserAgent(Agent):
|
||||
- Use Login if username/password specified by user. For quick task create account, remember password in a note.
|
||||
- You can fill a form using [form_name](value). Don't {Action.GO_BACK.value} when filling form.
|
||||
- If a form is irrelevant or you lack informations (eg: don't know user email) leave it empty.
|
||||
4. **Decide if you completed the task**
|
||||
- Check your notes. Do they fully answer the question? Did you verify with multiple pages?
|
||||
- Are you sure it’s correct?
|
||||
- If yes to all, say {Action.REQUEST_EXIT}.
|
||||
- If no, or a page lacks info, go to another link.
|
||||
- Never stop or ask the user for help.
|
||||
|
||||
**Rules:**
|
||||
- Do not write "The page talk about ...", write your finding on the page and how they contribute to an answer.
|
||||
@@ -144,9 +149,9 @@ class BrowserAgent(Agent):
|
||||
Error: x.com does not discuss anything related to the user’s query and no navigation link are usefull.
|
||||
Action: {Action.GO_BACK.value}
|
||||
|
||||
Example 3 (query answer found, enought notes taken):
|
||||
Note: I found on website www.example.com that ...<expand on information found>...
|
||||
Given this answer the user query I should exit the web browser.
|
||||
Example 3 (clear definitive query answer found or enought notes taken):
|
||||
Note: I took 10 notes so far with enought finding to answer user question.
|
||||
Therefore I should exit the web browser.
|
||||
Action: {Action.REQUEST_EXIT.value}
|
||||
|
||||
Example 4 (loging form visible):
|
||||
@@ -161,9 +166,6 @@ class BrowserAgent(Agent):
|
||||
You previously took these notes:
|
||||
{notes}
|
||||
Do not Step-by-Step explanation. Write Notes or Error as a long paragraph followed by your action.
|
||||
If you conduct research do not exit until you have several notes.
|
||||
Do not ever ask the user to conduct a task, do not ever exit expecting user intervention.
|
||||
You should be Investigative, Curious and Skeptical.
|
||||
"""
|
||||
|
||||
def llm_decide(self, prompt: str, show_reasoning: bool = False) -> Tuple[str, str]:
|
||||
|
||||
Reference in New Issue
Block a user