without_reasoning() drops the reasoning field that with_reasoning()
added, for example to compare a module with and without chain-of-thought.
The instructions are kept as they are.
Arguments
- sig
A signature from
signature(), usually one returned bywith_reasoning().- reasoning_field
Name of the field to remove.
Value
A new signature without the field, or sig unchanged if it has no
such field. If no output field would remain, the output becomes a single
string field named answer.
See also
Other signatures:
has_reasoning(),
input(),
signature(),
with_instructions(),
with_reasoning()
Examples
cot <- with_reasoning("question -> answer")
without_reasoning(cot)
#>
#> ── Signature ──
#>
#> ── Inputs
#> • question: "string" - Input: question
#>
#> ── Output
#> Type: "object(answer: string)"
#>
#> ── Instructions
#> Given the fields `question`, produce the fields `answer`. Think through your
#> reasoning step by step before providing the answer.