Skip to contents

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.

Usage

without_reasoning(sig, reasoning_field = "reasoning")

Arguments

sig

A signature from signature(), usually one returned by with_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.

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.