Triage Component
The triage component classifies incoming ticket text and selects the action to run next.
Overview
The workflow is:
- Preparse the incoming text if the preparser is enabled.
- Ask the triage LLM to categorize the request.
- Evaluate the configured action rules.
- Return the triage result to the API or Kafka flow.
Key Modules
app/triage/triage.py
Orchestrates the triage workflow and ties together prompt handling, category prediction, and action selection.
app/triage/genai_handler.py
Handles LLM calls and structured output.
Configuration
The triage behavior is configured by app.settings.triage.TriageSettings.
Categories and Actions
- Categories define the classification targets.
- Actions define what the system should do next.
Action Rules
Rules map categories to actions and can override the default action with conditions.
Conditions can check:
processing_iddays_since_request
The settings also support:
no_category_nameandno_action_namefallbacksno_action_internal_notewhen no action is takencategory_wrong_retry_confidence_thresholdfor low-confidence retries
Prompt Management
The component supports three sources for prompt templates:
- Langfuse: Fetches prompts dynamically from the Langfuse service.
- File: Reads prompts from local Markdown files.
- String: Uses prompts provided directly in the configuration.