not to trust ai comments, to verify...

This commit is contained in:
ValueOn AG 2025-11-30 23:27:46 +01:00
parent a8ef757046
commit aff37fd2e2
3 changed files with 9 additions and 1 deletions

View file

@ -104,7 +104,7 @@ class DynamicMode(BaseMode):
state = TaskExecutionState(taskStep)
# Dynamic mode uses max_steps instead of max_retries
state.max_steps = max(1, int(getattr(workflow, 'maxSteps', 5)))
state.max_steps = max(1, int(getattr(workflow, 'maxSteps', 10)))
logger.info(f"Using Dynamic mode execution with max_steps: {state.max_steps}")
step = 1

View file

@ -76,6 +76,7 @@ def shouldContinue(observation: Optional[Observation], review=None, current_step
try:
# Stop if max steps reached
if current_step >= max_steps:
logger.info(f"Stopping workflow: reached max_steps limit ({current_step} >= {max_steps})")
return False
# Check review decision (can be ReviewResult model or dict)

View file

@ -328,6 +328,11 @@ DOCUMENTS: {{KEY:AVAILABLE_DOCUMENTS_INDEX}}
=== NEXT ACTIONS ===
Follow the improvement suggestions from CONTENT VALIDATION in priority order. Each suggestion indicates what action to take next.
CRITICAL: Use structureComparison and gap information from CONTENT VALIDATION to determine what is MISSING:
- Check "structureComparison.found" vs "structureComparison.required" to see what's already delivered
- Check "structureComparison.gap" to see what's missing. If quantitative gaps are available, use them.
- Next action should ONLY generate the MISSING part, NOT repeat what's already delivered
=== OUTPUT FORMAT ===
{{
"status": "continue",
@ -347,9 +352,11 @@ Follow the improvement suggestions from CONTENT VALIDATION in priority order. Ea
- nextActionParameters: concrete parameters (check AVAILABLE_METHODS for valid names)
- documentList: ONLY exact references from AVAILABLE_DOCUMENTS_INDEX (do not invent)
- nextActionObjective: describe what this action will achieve based on the FIRST improvement suggestion from CONTENT VALIDATION
- CRITICAL: Use structureComparison.gap to specify the missing part in nextActionParameters
- Do NOT repeat failed actions - suggest DIFFERENT approach
- If ACTION HISTORY shows repeated actions, suggest a fundamentally different approach
- nextActionObjective must directly address the highest priority improvement suggestion from CONTENT VALIDATION
- If validation shows partial data delivered, next action should CONTINUE from where it stopped, not restart
"""