You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`signature` (_Any_): Signature of predictive model.
32
-
-`rationale_type` (_dsp.Type_, _optional_): Rationale type for reasoning steps. Defaults to `None`.
29
+
-`rationale_type` (_dspy.OutputField_, _optional_): Rationale type for reasoning steps. Defaults to `None`.
33
30
-`activated` (_bool_, _optional_): Flag for activated chain of thought processing. Defaults to `True`.
34
31
-`**config` (_dict_): Additional configuration parameters for model.
35
32
@@ -64,3 +61,15 @@ pred = generate_answer(question=question)
64
61
print(f"Question: {question}")
65
62
print(f"Predicted Answer: {pred.answer}")
66
63
```
64
+
65
+
The following example shows how to specify your custom rationale. Here `answer` corresponds to the last key to produce, it may be different in your case.
66
+
67
+
```python
68
+
#define a custom rationale
69
+
rationale_type = dspy.OutputField(
70
+
prefix="Reasoning: Let's think step by step in order to",
0 commit comments