SelfConsistencyOptions
Interface: SelfConsistencyOptions
Defined in: src/patterns/SelfConsistency.ts:21
patterns/ — factory functions that compose primitives + core-flow into well-known agent patterns from the research literature.
Each pattern is:
- A factory function returning a
Runner— drops into anySequence.step(),Parallel.branch(), etc. - Purely composed — no new primitives, no state machinery beyond what the underlying compositions provide.
- Documented with the canonical paper reference.
Build-time-fixed cardinality: all patterns take a FIXED
shard/branch/agent count at build time. Run-time-variable branching
is a separate (not-yet-shipped) feature and would need a
DynamicParallel primitive.
Properties
extract?
readonlyoptionalextract?: (response) =>string
Defined in: src/patterns/SelfConsistency.ts:35
Consumer-provided extractor: given a full LLM response, return the "vote token" (e.g., the final answer stripped of the chain-of-thought preamble). Defaults to returning the trimmed string.
Parameters
response
string
Returns
string
id?
readonlyoptionalid?:string
Defined in: src/patterns/SelfConsistency.ts:37
maxTokens?
readonlyoptionalmaxTokens?:number
Defined in: src/patterns/SelfConsistency.ts:29
model
readonlymodel:string
Defined in: src/patterns/SelfConsistency.ts:23
name?
readonlyoptionalname?:string
Defined in: src/patterns/SelfConsistency.ts:36
provider
readonlyprovider:LLMProvider
Defined in: src/patterns/SelfConsistency.ts:22
samples
readonlysamples:number
Defined in: src/patterns/SelfConsistency.ts:26
Number of parallel samples. 3 / 5 are typical; paper uses up to 40.
systemPrompt
readonlysystemPrompt:string
Defined in: src/patterns/SelfConsistency.ts:24
temperature?
readonlyoptionaltemperature?:number
Defined in: src/patterns/SelfConsistency.ts:28
Sampling temperature. Defaults to a higher value (0.7) to get diverse samples.
