beam_search_reasoning
Optimize multi-step reasoning by maintaining top paths through beam search, enabling structured problem-solving and decision-making for complex queries.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
beamWidth | No | Number of top paths to maintain (n-sampling) | |
nextThoughtNeeded | Yes | Whether another step is needed | |
prompt | Yes | The problem or query to reason about | |
thought | Yes | Current reasoning step | |
thoughtNumber | Yes | Current step number | |
totalThoughts | Yes | Total expected steps |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"beamWidth": {
"default": 3,
"description": "Number of top paths to maintain (n-sampling)",
"maximum": 10,
"minimum": 1,
"type": "integer"
},
"nextThoughtNeeded": {
"description": "Whether another step is needed",
"type": "boolean"
},
"prompt": {
"description": "The problem or query to reason about",
"type": "string"
},
"thought": {
"description": "Current reasoning step",
"type": "string"
},
"thoughtNumber": {
"description": "Current step number",
"minimum": 1,
"type": "integer"
},
"totalThoughts": {
"description": "Total expected steps",
"minimum": 1,
"type": "integer"
}
},
"required": [
"prompt",
"thought",
"thoughtNumber",
"totalThoughts",
"nextThoughtNeeded"
],
"type": "object"
}