Urgency Detection
This service returns if the the message is urgent or not. There are currently two methods available to do this.
Method 1: Cosine distance
- Cost:
- Accuracy:
- Latency:
This method uses the cosine distance between the input message and the urgency rules in the database. Since it only uses embeddings, it is fast and cheap to run.
Setup
Set the following environment variables.
- Set
URGENCY_CLASSIFIER
environment variable tocosine_distance_classifier
. - Set
URGENCY_DETECTION_MAX_DISTANCE
environment variable. Any message with a cosine distance greater than this value will be tagged as urgent.
You can do this either in the .env
file or
under core_backend/app/urgency_detection/config.py
. See Configuring AAQ
for more details.
Method 2: LLM entailment classifier
- Cost:
- Accuracy:
- Latency:
This method calls an LLM to score the message against each of the urgency rules in the database.
Setup
Set the following environment variables.
- Set
URGENCY_CLASSIFIER
environment variable tollm_entailment_classifier
. - Set
URGENCY_DETECTION_MIN_PROBABILITY
environment variable. The LLM returns the probability of a message being urgent. Any message with a probability greater than this value will be tagged as urgent.
You can do this either in the .env
file or
under core_backend/app/urgency_detection/config.py
. See Configuring AAQ
for more details.
See OpenAPI specification or SwaggerUI for more details on how to call the service.