mirror of
https://github.com/langchain-ai/company-researcher.git
synced 2026-07-01 21:54:03 -04:00
update eval type check
This commit is contained in:
+2
-3
@@ -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."""
|
||||
|
||||
Reference in New Issue
Block a user