Unit4-Final-Challenge / agent-architecture.mermaid
sajjadzeak's picture
Upload 10 files
4844294 verified
graph TD
Start([User Question]) --> RouteQuestion[๐Ÿ“‹ Route Question]
RouteQuestion --> ExecuteTools[๐Ÿ”ง Execute Tools]
ExecuteTools --> CheckAttachment{Has Attachment?}
CheckAttachment -->|Yes| AttachmentType{Attachment Type?}
CheckAttachment -->|No| CheckLabel{Label Type?}
AttachmentType -->|Python Code| RunPy[๐Ÿ run_py]
AttachmentType -->|Excel/CSV| AnalyzeExcel[๐Ÿ“Š analyze_excel_file]
AttachmentType -->|Audio| TranscribeAudio[๐ŸŽต transcribe_via_whisper]
AttachmentType -->|Image| VisionTask[๐Ÿ‘๏ธ vision_task]
CheckLabel -->|math| Calculator[๐Ÿงฎ calculator]
CheckLabel -->|youtube| YouTubeTranscript[๐Ÿ“น youtube_transcript]
CheckLabel -->|search| WebSearch[๐Ÿ” web_multi_search]
CheckLabel -->|general| NoTool[๐Ÿ’ญ No specific tool]
RunPy --> SynthesizeResponse[๐Ÿง  Synthesize Response]
AnalyzeExcel --> SynthesizeResponse
TranscribeAudio --> SynthesizeResponse
VisionTask --> SynthesizeResponse
Calculator --> SynthesizeResponse
YouTubeTranscript --> SynthesizeResponse
WebSearch --> SynthesizeResponse
NoTool --> SynthesizeResponse
SynthesizeResponse --> NeedsSynthesis{Needs Additional<br/>Synthesis?}
NeedsSynthesis -->|No: code excel<br/>image math| DirectAnswer[โœ… Use tool output directly<br/>Already complete]
NeedsSynthesis -->|Yes: youtube audio<br/>search general| UseSynthesisLLM[๐Ÿค– Additional LLM synthesis<br/>Combine with context]
DirectAnswer --> FormatOutput[โœจ Format Output]
UseSynthesisLLM --> FormatOutput
FormatOutput --> End([Final Answer])