From fb0eadafc16fa0e0ef05e313ef49107654844626 Mon Sep 17 00:00:00 2001 From: pavanmantha Date: Tue, 26 Nov 2024 23:07:27 +0530 Subject: [PATCH 1/2] -deep evals base --- bootstraprag/templates/evaluations/deep_evals/main.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 bootstraprag/templates/evaluations/deep_evals/main.py diff --git a/bootstraprag/templates/evaluations/deep_evals/main.py b/bootstraprag/templates/evaluations/deep_evals/main.py new file mode 100644 index 0000000..e69de29 From 756b9f19782dc406c9c74ef467818abafc8816db Mon Sep 17 00:00:00 2001 From: pavanmantha Date: Thu, 28 Nov 2024 06:40:47 +0530 Subject: [PATCH 2/2] crewai agents for prompting --- .../templates/crewai-agents/__init__.py | 0 bootstraprag/templates/crewai-agents/main.py | 45 +++++++++++++++++++ .../templates/crewai-agents/requirements.txt | 2 + 3 files changed, 47 insertions(+) create mode 100644 bootstraprag/templates/crewai-agents/__init__.py create mode 100644 bootstraprag/templates/crewai-agents/main.py create mode 100644 bootstraprag/templates/crewai-agents/requirements.txt diff --git a/bootstraprag/templates/crewai-agents/__init__.py b/bootstraprag/templates/crewai-agents/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/bootstraprag/templates/crewai-agents/main.py b/bootstraprag/templates/crewai-agents/main.py new file mode 100644 index 0000000..95198d7 --- /dev/null +++ b/bootstraprag/templates/crewai-agents/main.py @@ -0,0 +1,45 @@ +from crewai import Agent, Task, Crew, Process, LLM + +llm = LLM(model="ollama/llama3.2:latest", base_url="http://localhost:11434", temperature=0.8, timeout=300) + +# Define the Prompt Supervisor agent +prompt_supervisor = Agent( + role='Prompt Supervisor', + goal='Ensure all agent prompts are clear, effective, and aligned with users objectives.', + backstory=( + "As a Prompt Supervisor, you have a keen eye for detail and a deep understanding " + "of effective communication strategies. Your mission is to review and refine prompts " + "to maximize the performance of AI agents." + ), + llm=llm +) + +# Define a task for the Prompt Supervisor to review and enhance the Senior Researcher's prompt +prompt_supervisor_task = Task( + description=( + "Review the prompt provided to the {topic} Senior prompt supervisor, assessing its clarity, " + "effectiveness, and alignment with the project's objectives. Provide constructive feedback " + "and suggest improvements to enhance the agent's performance." + ), + expected_output=( + "A detailed evaluation of the original prompt, including specific suggestions for improvement " + "and a revised version of the prompt that optimizes clarity and effectiveness along with few shot of examples." + ), + agent=prompt_supervisor +) + + +def main(): + # Forming the crew and kicking off the process + crew = Crew( + agents=[prompt_supervisor], + tasks=[prompt_supervisor_task], + process=Process.sequential, + verbose=True + ) + result = crew.kickoff(inputs={'topic': 'Get Financial data for 2023'}) + print(result) + + +if __name__ == "__main__": + main() diff --git a/bootstraprag/templates/crewai-agents/requirements.txt b/bootstraprag/templates/crewai-agents/requirements.txt new file mode 100644 index 0000000..b9b1d3d --- /dev/null +++ b/bootstraprag/templates/crewai-agents/requirements.txt @@ -0,0 +1,2 @@ +crewai +crewai-tools \ No newline at end of file