CoolFace
Modelpublic

RaghaMounam/Qwen2.5-Email-Order-details-Extractor-v1

sourceHugging Faceapache-2.0updated 10mo agoView on Hugging Face
0likes19downloads
Model Card

About

This model is a toy project designed to act as a pure function in a data pipeline. It takes an email body as input and outputs a JSON object. Capabilities

  • —Item Extraction: Identifies products and preserves exact quantities (e.g., "500 Reams").
  • —Implicit Quantity Resolution: Converts "a laptop" or "the monitor" into explicit counts ("1 laptop").
  • —Address Extraction: Identifies shipping addresses. Returns null if anything else.
  • —Hallucination Resistance: Trained on "Negative Samples" (spam, chatter, status checks) to return empty JSON {"items": [], "address": null}

Training Data & Engineering

This model was not trained on generic datasets. It was trained on 100% Synthetic data engineered to solve this specific fine tuning.

Dataset Composition:

Dataset is prepared using gemini llms

Positive Orders: Complex emails with multiple items, messy addresses, and mixed formatting. Negative Samples (Hallucination Prevention): ~20% of the dataset consists of emails about meetings, spam, or casual conversation. The model is trained to output {"items": [], "address": null} for these to prevent false positives.

⚠️ Limitations

Prompt Sensitivity: The model is highly specialized. It requires the exact trigger phrase: "Extract order details into JSON." inside the user prompt. Deviating from this may cause it to revert to conversational mode.

Language: Trained primarily on English business emails.

Scope: While robust, extremely long email chains (forwarded messages) might truncate depending on the context window used during inference.