Cargo Chat Extraction
LLM · NLP · Solo project
Customers ask for shipping quotes on WhatsApp in short, scattered messages — in Indonesian, Mandarin or English, often with a photo instead of an item name. This pipeline turns the chat into a structured order, prices it from the rate card, and drafts a reply that asks only for what is still missing. It runs free on a laptop CPU with an open-source model (Qwen3.5 9B on Ollama) and is evaluated on real, anonymized customer chats from Pelita Cargo.
| Field | Accuracy |
|---|---|
| Box countStated by the customer | 97% |
| Destination cityStated by the customer | 97% |
| Volume (CBM)Stated or computed by code | 91% |
| WeightUnits converted by code | 88% |
| Item typeFree text, often vague | 76% |
| Tariff categoryAn admin pricing decision | 53% |
- Model reads, code countsThe LLM only copies numbers and units as written (斤, mm, m). Unit conversion, CBM, minimum charges and the price are tested Python, which also flags impossible answers.
- Field order mattersWith the box count before the size in the JSON schema, “65 × 45 × 50 cm” came back as 65 boxes. Putting the size first fixed it; more prompt examples did not.
- Photos helpReading the customer’s photo first raised item-type accuracy from 65% to 76–82% on 17 chats — a small test, not a held-out one.



