diff --git a/src/agent/orchestrator/agent_orchestrator.py b/src/agent/orchestrator/agent_orchestrator.py index 11d403e0..09ed7627 100644 --- a/src/agent/orchestrator/agent_orchestrator.py +++ b/src/agent/orchestrator/agent_orchestrator.py @@ -160,6 +160,8 @@ def prompt_enhancer(self, state: State) -> State: ).run_agent() state['enhanced_prompt_agent_msg'] = output.agent_msg state['enhanced_prompt'] = output.enhanced_prompt + + logger.info(f"\n\nEnhanced prompt: {state['enhanced_prompt']}") return state async def browser_ui(self, state: State) -> State: @@ -187,7 +189,7 @@ async def browser_ui(self, state: State) -> State: ) # Run the browser agent - result = await browser_agent.run(max_steps=100) + result = await browser_agent.run(max_steps=30) # Store the result in state state["browser_result"] = result diff --git a/src/agent/prompt_enahncer/prompt.py b/src/agent/prompt_enahncer/prompt.py index c8002d7e..d5f51f99 100644 --- a/src/agent/prompt_enahncer/prompt.py +++ b/src/agent/prompt_enahncer/prompt.py @@ -5,14 +5,24 @@ Your job is to analyse the user prompt, and enahnce it to perform best sqa on the web snippet accordingly. User QA prompt: "{input}" -Extrated Web snippet: "{extracted_snippet}" +' Extrated Web snippet ': "{extracted_snippet}" - You can always enter some sample data to test IF not entered by the user - Always make sure not too make the enahnced prompt too lengthy -- The enhanced prompt must be in numbers like 1. 2. and each number must represent the step. +- The enhanced prompt must be in numbers like 1. 2. - Strictly make sure that the the user prompt is only instructions regarding to perform QA only. +- Do not worry about tags or do not change the user quser to an extent that it makes it difficult to QA +- Always make sure that the ' Extrated Web snippet ' is for your help, do not extract or change the user prompt by extractng text from the ' Extrated Web snippet ' + +- Make sure just to enhance the user prompt, do not add steps like do this this then do that. + +- Also make sure that if the user has enetered partial prompts like "fill this fiel in the form" and then there are more field, always mention that also fill the other remaining fields carefully. +- If some field of form are mentioned and some are not, mention them with some random text yourself please + +- This just does not apply to the form, but other fields as well where the user has not clearly mentioned what to do or has partially mentioned, you would need to deal with that so its easier for upcoming agents. + Output Structure: Return the result as a JSON object in the following format ONLY: {