Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a9757de

Browse files
authored
Updated llm_as_a_judge.py (openai#1055)
Updated the evaluator agent’s instructions in llm_as_a_judge.py to prevent infinite evaluation loops. The agent is now instructed to provide a final evaluation after 5 attempts, allowing approval if the story outline is good enough, even if it is not perfect.
1 parent 6b94ad0 commit a9757de

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/agent_patterns/llm_as_a_judge.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class EvaluationFeedback:
3232
instructions=(
3333
"You evaluate a story outline and decide if it's good enough."
3434
"If it's not good enough, you provide feedback on what needs to be improved."
35-
"Never give it a pass on the first try."
35+
"Never give it a pass on the first try. after 5 attempts, you can give it a pass if story outline is good enough - do not go for perfection"
3636
),
3737
output_type=EvaluationFeedback,
3838
)

0 commit comments

Comments
 (0)