supportdesk/misc_utils.py:25
lang_of
Detect the language of a support ticket and return the ISO 639-1 two-letter code.
Output contract
Exactly one two-letter lowercase ISO 639-1 code (e.g. 'en', 'es', 'fr'); no punctuation, no extra words; caller takes only the first two characters of the response.
keeps 100% of baseline quality and costs less
Dollar figures are projections: measured token counts x illustrative per-model prices x an assumed call volume, all set in downshift.yaml. They are not a real bill.
Models
How each model did
| Model | Pass rate | Tokens in / out | Latency | Cost / call | vs baseline | Check |
|---|---|---|---|---|---|---|
qwen2.5:7bbaseline premium tier | 90.9% (20/22) | 108 / 2 | 0.43 s | $0.000291 | n/a | n/a |
qwen2.5:3b standard tier | 81.8% (18/22) | 108 / 2 | 0.19 s | $0.000046 | 90.0% | fail |
qwen2.5:1.5bchosen budget tier | 90.9% (20/22) | 108 / 2 | 0.14 s | $0.000017 | 100.0% | pass |
qwen2.5:0.5b nano tier | 81.8% (18/22) | 108 / 2 | 0.06 s | $0.000012 | 90.0% | fail |
- 3b keeps 90% of baseline quality, needs 95%
- 1.5b keeps 100% of baseline quality and costs less
- 0.5b keeps 90% of baseline quality, needs 95%
Prompt
What the call sends
Model in code: qwen2.5:7b
Eval examples
3 of 22 cases, every model side by side
›lng-017b3b1.5b0.5b
Inputs
- text
- Refund request for ORD-10421 Hi, I ordered a pair of wireless headphones on 2026-09-02 (order ORD-10421). They're unused and still in the box, but I changed my mind. Can I get a refund?
Expected
standard English ticket (T001)
Outputs
match
match
match
match
›lng-027b3b1.5b0.5b
Inputs
- text
- Solicitud de reembolso Hola, compré una lámpara (pedido ORD-10812) el 2026-07-30 y llegó rota. ¿Pueden devolverme el dinero?
Expected
Spanish refund request (T006)
Outputs
match
match
match
match
›lng-037b3b1.5b0.5b
Inputs
- text
- Colis non reçu Bonjour, ma commande ORD-10905 du 2026-09-10 n'est toujours pas arrivée. Pouvez-vous vérifier ?
Expected
French non-delivery inquiry (T007)
Outputs
match
match
match
match
All cases