Skip to content

Commit 83ec26d

Browse files
authored
fix reasoning order in examples (#186)
I think we need to put reasoning-related outputs first to encourage CoT reasoning.
2 parents 0989cd9 + 54a48a3 commit 83ec26d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

examples/agent_patterns/input_guardrails.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030

3131
### 1. An agent-based guardrail that is triggered if the user is asking to do math homework
3232
class MathHomeworkOutput(BaseModel):
33-
is_math_homework: bool
3433
reasoning: str
34+
is_math_homework: bool
3535

3636

3737
guardrail_agent = Agent(

examples/agent_patterns/llm_as_a_judge.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323

2424
@dataclass
2525
class EvaluationFeedback:
26-
score: Literal["pass", "needs_improvement", "fail"]
2726
feedback: str
27+
score: Literal["pass", "needs_improvement", "fail"]
2828

2929

3030
evaluator = Agent[None](

0 commit comments

Comments
 (0)