Spaces:
Running
Running
Commit ·
911b955
1
Parent(s): 9048e9b
ad
Browse files87 unmodified lines888990919293127 unmodified lines22122222322422522622787 unmodified lines- Simple (1-2 agents): Single consolidated task, basic relations- Complex (3+ agents): 3 high-level specialized tasks with NEXT relations (avoid over-decomposition)JSON PARSING FOCUS:Locate "observations", "agents", "data" sections. Count DISTINCT agents (not mentions).Look for *_Expert patterns and execution evidence.127 unmodified lines* Output→Human (DELIVERS_TO): 1 relation only* Agent→Tool (USES): Include exactly one when a Tool exists* Tool→Task (REQUIRED_BY): Include one only when the task explicitly depends on a Tool (execution/platform dependency). Otherwise omit.* Task→Task (SUBTASK_OF): Use sparingly when the trace explicitly states that one task is a component inside another (e.g., Decomposition inside Question Answering). Do not replace NEXT; both may coexist when justified.- FORBIDDEN: ASSIGNED_TO, INTERVENES- TARGET: Maximum 9–10 total relations for 3-agent workflows87 unmodified lines8889909192939495969798127 unmodified lines22622722822923023123287 unmodified lines- Simple (1-2 agents): Single consolidated task, basic relations- Complex (3+ agents): 3 high-level specialized tasks with NEXT relations (avoid over-decomposition)ORDER VS HIERARCHY (MANDATORY):- Use NEXT (Task→Task) for sequential pipelines where one task hands off to the next. If there are N tasks in a linear flow, expect exactly N-1 NEXT edges to cover the chain.- Use SUBTASK_OF (Task→Task) only for hierarchical decomposition where a parent task contains child tasks executed within its scope. Do NOT use SUBTASK_OF for simple multi-stage pipelines without nesting.- When both structures exist: use SUBTASK_OF for containment and NEXT among siblings to express order within the parent.JSON PARSING FOCUS:Locate "observations", "agents", "data" sections. Count DISTINCT agents (not mentions).Look for *_Expert patterns and execution evidence.127 unmodified lines* Output→Human (DELIVERS_TO): 1 relation only* Agent→Tool (USES): Include exactly one when a Tool exists* Tool→Task (REQUIRED_BY): Include one only when the task explicitly depends on a Tool (execution/platform dependency). Otherwise omit.* Task→Task (SUBTASK_OF): ONLY when the trace explicitly states hierarchical containment (e.g., Decomposition is a component of Question Answering). Never substitute it for linear stage order.- FORBIDDEN: ASSIGNED_TO, INTERVENES- TARGET: Maximum 9–10 total relations for 3-agent workflows
agentgraph/methods/production/openai_structured_extractor.py+6-1