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) state = TaskExecutionState(taskStep)
# Dynamic mode uses max_steps instead of max_retries # 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}") logger.info(f"Using Dynamic mode execution with max_steps: {state.max_steps}")
step = 1 step = 1

View file

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

View file

@ -328,6 +328,11 @@ DOCUMENTS: {{KEY:AVAILABLE_DOCUMENTS_INDEX}}
=== NEXT ACTIONS === === NEXT ACTIONS ===
Follow the improvement suggestions from CONTENT VALIDATION in priority order. Each suggestion indicates what action to take next. 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 === === OUTPUT FORMAT ===
{{ {{
"status": "continue", "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) - nextActionParameters: concrete parameters (check AVAILABLE_METHODS for valid names)
- documentList: ONLY exact references from AVAILABLE_DOCUMENTS_INDEX (do not invent) - 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 - 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 - Do NOT repeat failed actions - suggest DIFFERENT approach
- If ACTION HISTORY shows repeated actions, suggest a fundamentally 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 - 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
""" """