-
Notifications
You must be signed in to change notification settings - Fork 95
LLM Judge Prompt Design #75
Copy link
Copy link
Open
Description
Can you explain the prompt design ideas for using LLM to judge?
I have a question about why there is no need for the assistant's text.
def _summarize_transcript(transcript: List[Dict[str, Any]]) -> str:
summary_parts: List[str] = []
for event in transcript:
if event.get("type") != "message":
continue
msg = event.get("message", {})
role = msg.get("role")
if role == "assistant":
for item in msg.get("content", []):
if item.get("type") == "toolCall":
summary_parts.append(
f"Tool: {item.get('name')}({json.dumps(item.get('arguments', {}))})"
)
elif role == "toolResult":
content = msg.get("content", [])
if content:
result_preview = str(content[0])[:200]
summary_parts.append(f"Result: {result_preview}")
elif role == "user":
content = msg.get("content", [])
if content:
summary_parts.append(f"User: {content[0]}")
return "\n".join(summary_parts)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels