flowchart TD
Start([Start: New Support Ticket])
PreProcess[Pre-processing/Template Fill]
EmbedInput[Generate Embeddings]
RetrieveContext[Semantic Retrieval
(KB, docs)]
LLM_Path[LLM: Triage/Response Generation]
DecisionCheck{Confident?
(Threshold or Heuristic)}
Update[Update Ticket/Customer]
Escalate[Escalate to Human
(Agent or Specialist)]
Retry[Retry w/ More Context or Prompt]
End([End])
Start --> PreProcess --> EmbedInput --> RetrieveContext --> LLM_Path
LLM_Path --> DecisionCheck
DecisionCheck -- "Yes" --> Update --> End
DecisionCheck -- "No: Low Confidence or Ambiguity" --> Retry
Retry --> DecisionCheck
DecisionCheck -- "Escalation Required or Max Retries Hit" --> Escalate --> End