Functions
reflection
Function: reflection()
reflection(
opts):Runner<{message:string; },string>
Defined in: src/patterns/Reflection.ts:55
Build a Reflection Runner. Each iteration:
- Propose — LLMCall writes a candidate answer based on the input
- Critique — LLMCall judges the candidate; exit marker stops loop
- Revise — next iteration's propose sees the previous critique
Each iteration's output (the candidate proposal) becomes the next iteration's input. The final iteration's proposal is returned.
Parameters
opts
Returns
Runner<{ message: string; }, string>
