update eval type check

This commit is contained in:
vbarda
2024-12-04 11:18:32 -05:00
parent 564357b792
commit 9135b16e7b
+2 -3
View File
@@ -11,7 +11,6 @@ from langgraph.pregel.remote import RemoteGraph
client = Client()
TOLERANCE = 0.10 # should match within 10%
NUMERIC_FIELDS = (
"total_funding_mm_usd",
"latest_round_amount_mm_usd",
@@ -41,8 +40,8 @@ EVALUATION_PROMPT = f"""You are an evaluator tasked with assessing the accuracy
def evaluate_agent(outputs: dict, reference_outputs: dict):
if "info" not in outputs or not isinstance(outputs["info"], dict):
return 0.0
if "info" not in outputs:
raise ValueError("Agent output must contain 'info' key")
class Score(BaseModel):
"""Evaluate the agent's output against the expected output."""