Dspy.ChainOfThought (dspy v0.1.0)
View SourceChain of Thought reasoning module.
Extends basic prediction with step-by-step reasoning by adding a reasoning field to the signature and encouraging the model to show its work before generating the final answer.
Summary
Functions
Create a new ChainOfThought module.
Callback implementation for Dspy.Module.parameters/1.
Callback implementation for Dspy.Module.update_parameters/2.
Types
@type t() :: %Dspy.ChainOfThought{ examples: [Dspy.Example.t()], max_retries: non_neg_integer(), reasoning_field: atom(), signature: Dspy.Signature.t() }
Functions
Create a new ChainOfThought module.
Callback implementation for Dspy.Module.parameters/1.
Callback implementation for Dspy.Module.update_parameters/2.