Skip to content

Commit 150f64f

Browse files
author
matdev83
committed
Fixes
1 parent d51a383 commit 150f64f

File tree

1 file changed

+64
-1
lines changed

1 file changed

+64
-1
lines changed

README.md

Lines changed: 64 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -970,6 +970,67 @@ This allows for a trade-off between response quality and cost/latency.
970970
reasoning_injection_probability: 0.5
971971
```
972972

973+
#### Message Repetition Control
974+
975+
The hybrid backend can be configured to repeat messages in the execution phase for better context preservation. This is controlled by the `hybrid_backend_repeat_messages` flag.
976+
977+
- **Default**: Not set (messages are not repeated by default)
978+
- **When enabled**: The original user message is repeated along with the reasoning output in the execution phase
979+
980+
**Configuration (precedence: CLI > Environment > YAML)**:
981+
982+
- **CLI Flag**:
983+
```bash
984+
--hybrid-backend-repeat-messages
985+
```
986+
987+
- **Environment Variable**:
988+
```bash
989+
export HYBRID_BACKEND_REPEAT_MESSAGES=true
990+
```
991+
992+
- **YAML Configuration** (`config.yaml`):
993+
```yaml
994+
backends:
995+
hybrid_backend_repeat_messages: true
996+
```
997+
998+
### Troubleshooting Hybrid Backend Issues
999+
1000+
If you encounter issues with the hybrid backend, you can experiment with these two parameters to tweak your hybrid setup:
1001+
1002+
#### Recommended Starting Point for Experimentation
1003+
1004+
For users experiencing problems with hybrid backend performance or reliability, try these settings as a starting point:
1005+
1006+
```bash
1007+
# Start with 50% reasoning probability and message repetition enabled
1008+
python -m src.core.cli \
1009+
--reasoning-injection-probability 0.5 \
1010+
--hybrid-backend-repeat-messages
1011+
```
1012+
1013+
#### Parameter Adjustment Guidelines
1014+
1015+
1. **`--reasoning-injection-probability` (Default: 1.0)**
1016+
- **Use Case**: Control how often the reasoning model is used
1017+
- **Lower values (0.3-0.7)**: Reduces cost and latency, good for experimentation
1018+
- **Higher values (0.8-1.0)**: Maximum quality, higher cost
1019+
- **Recommended starting point**: `0.5` (50% chance) for balancing quality and cost
1020+
1021+
2. **`--hybrid-backend-repeat-messages` (Default: Not set)**
1022+
- **Use Case**: Improve context preservation in execution phase
1023+
- **When enabled**: Helps execution models maintain better context from original requests
1024+
- **When to use**: If execution model seems to lose context or produce incomplete responses
1025+
- **When to disable**: If responses become redundant or verbose
1026+
1027+
#### Common Issues and Solutions
1028+
1029+
- **Execution model ignores reasoning**: Try enabling `--hybrid-backend-repeat-messages`
1030+
- **High costs/latency**: Reduce `--reasoning-injection-probability` to 0.3-0.5
1031+
- **Inconsistent quality**: Start with `--reasoning-injection-probability 0.5` and adjust based on results
1032+
- **Context loss**: Enable `--hybrid-backend-repeat-messages` to preserve original request context
1033+
9731034
### Reasoning Detection
9741035

9751036
The hybrid backend uses a priority-based detection strategy to identify when reasoning is complete:
@@ -1035,7 +1096,9 @@ Useful flags
10351096
- `--strict-command-detection` to enable strict command detection (only process commands on last non-blank line)
10361097
- `--enable-pytest-compression` to enable pytest output compression
10371098
- `--enable-pytest-context-saving` to enable automatic addition of `-r fE` and `-q` flags to pytest commands
1038-
- `--fix-think-tags` to enable correction of improperly formatted `<think>` tags in model responses
1099+
- `--fix-think-tags` to enable correction of improperly formatted `</think>` tags in model responses
1100+
- `--hybrid-backend-repeat-messages` to enable message repetition in hybrid backend execution phase
1101+
- `--reasoning-injection-probability VALUE` to set probability (0.0-1.0) of using reasoning model in hybrid backend (default: 1.0)
10391102
- `--enable-edit-precision` / `--disable-edit-precision` to control automated edit-precision tuning
10401103
- `--edit-precision-temperature TEMP` to set target temperature for edit failures (default: 0.1)
10411104
- `--edit-precision-min-top-p FLOAT` to set minimum top_p for edit failures (default: 0.3)

0 commit comments

Comments
 (0)