CoolFace
Datasetpublic

eldinosaur/cuentas-claras-sat-classifier

Cuentas Claras — SAT Transaction Classifier dataset Instruction-tuning data that teaches a small model to classify a free-text transaction description into its SAT account code, deductibility, and IVA treatment — the core fine-tune (🎯 Well-Tuned) behind the Cuentas Claras accountant agent. Format Chat-format JSONL. Each row: { "messages": [ {"role": "system", "content": "Eres un clasificador contable mexicano. ..."}, {"role": "user", "content":… See the full description on the dataset page: https://huggingface.co/datasets/eldinosaur/cuentas-claras-sat-classifier.

sourceHugging Faceapache-2.0updated 3mo agoView on Hugging Face
0likes27downloads
Dataset Card

Cuentas Claras — SAT Transaction Classifier dataset

Instruction-tuning data that teaches a small model to classify a free-text transaction description into its SAT account code, deductibility, and IVA treatment — the core fine-tune (🎯 Well-Tuned) behind the Cuentas Claras accountant agent.

Format

Chat-format JSONL. Each row:

json
{
  "messages": [
    {"role": "system", "content": "Eres un clasificador contable mexicano. ..."},
    {"role": "user", "content": "Clasifica: \"Suscripción anual a Adobe Creative Cloud\""},
    {"role": "assistant", "content": "{\"sat_code\": \"601.10\", \"cuenta\": \"Software y licencias\", \"kind\": \"expense\", \"deducible\": true, \"deducible_ratio\": 1.0, \"iva_tasa\": \"0.16\", \"iva_tratamiento\": \"standard\"}"}
  ],
  "label": { "...": "the same JSON, parsed" },
  "description": "Suscripción anual a Adobe Creative Cloud"
}
  • train.jsonl / val.jsonl — ~1,000 / ~110 examples across 20 SAT accounts.
  • stats.json — coverage by account and by kind (income / expense / investment).

How it was built

Generated deterministically from a curated SAT account catalog (src/finetune/catalog.py): each account contributes phrasing templates expanded over real Mexican vendor/item vocabularies, with surface variation (casing, amount suffixes, OCR-ish noise) so the model generalizes instead of memorizing. Labels are correct by construction — they come straight from the catalog, no hand-labeling.

Regenerate with: python -m scripts.build_classifier_dataset.

Baseline

A deterministic keyword classifier (the app's fallback) scores ~85% sat_code accuracy on the held-out split. The fine-tuned model is expected to beat this on messy OCR text, unseen brand names, and Spanish variation the keyword list misses.

⚠️ Account codes and deductibility rules are simplified for common cases and must be verified against the official SAT catalogue. Not tax advice.