scripts(evals): more eval prompts improvements

This commit is contained in:
Aleix Conchillo Flaqué
2025-12-17 09:46:53 -08:00
parent ca97d9dc4b
commit d07b37b288
5 changed files with 15 additions and 9 deletions

View File

@@ -1 +1 @@
- Added pipecat library version info to the `about` field in the `bot-ready` RTVI message
- Added Pipecat library version info to the `about` field in the `bot-ready` RTVI message.

View File

@@ -71,9 +71,9 @@ def build_agent(model_id: str, max_tokens: int):
@tool
def check_weather(location: str) -> str:
if location.lower() == "san francisco":
return "The weather in San Francisco is sunny and 30 degrees."
return "The weather in San Francisco is sunny and 75 degrees."
elif location.lower() == "sydney":
return "The weather in Sydney is cloudy and 20 degrees."
return "The weather in Sydney is cloudy and 60 degrees."
else:
return "I'm not sure about the weather in that location."

View File

@@ -260,15 +260,21 @@ async def run_eval_pipeline(
eval_function = FunctionSchema(
name="eval_function",
description="Called when the user answers a question.",
description=(
"Determines whether the user's response satisfies the evaluation "
"criteria defined for the current prompt or interaction."
),
properties={
"result": {
"type": "boolean",
"description": "Whether the answer is correct or not",
"description": "Whether the user's response meets the evaluation criteria.",
},
"reasoning": {
"type": "string",
"description": "Why the answer was considered correct or invalid",
"description": (
"A concise explanation of how the user's response did or did "
"not satisfy the evaluation criteria."
),
},
},
required=["result", "reasoning"],

View File

@@ -64,13 +64,13 @@ def EVAL_VISION_IMAGE(*, eval_speaks_first: bool = False):
EVAL_VOICEMAIL = EvalConfig(
prompt="Please leave a message.",
eval="The user leaves a voicemail message.",
eval="The user provides a reasonable voicemail message.",
eval_speaks_first=True,
)
EVAL_CONVERSATION = EvalConfig(
prompt="Hello, this is Mark.",
eval="The user acknowledges the greeting.",
eval="The user provides any reasonable conversational response to the greeting.",
eval_speaks_first=True,
)

View File

@@ -1423,7 +1423,7 @@ class RTVIProcessor(FrameProcessor):
Args:
about: Optional information about the bot to include in the ready message.
If left as None, the pipecat library and version will be used.
If left as None, the Pipecat library and version will be used.
"""
self._bot_ready = True
# Only call the (deprecated) _update_config method if the we're using a