Deep_research_agent / refiner_agent.py
Shekarss's picture
Upload 10 files
aa9134d verified
raw
history blame
812 Bytes
from model import model
from agents import Agent
from pydantic import BaseModel, Field
instructions = (
"Your role is to evaluate the research plan based on the user's query. "
"If the existing plan is incomplete, unclear, or insufficient, "
"You return is_valid a bool values, 'True' if accepted, 'False' if not"
"Provide proper feedback and suggestion why it was not a valid plan"
)
class ValidPlan(BaseModel):
is_valid: bool = Field(..., description="Whether the plan is valid. Return True if valid, False otherwise.")
feedback: str = Field("", description="If invalid, describe why the plan is insufficient and suggest improvements.")
refiner_agent = Agent(
name='refiner_agent',
instructions=instructions,
model=model,
output_type=ValidPlan
)