CoolFace
Datasetpublic

manuelaschrittwieser/invoice-extraction-dataset-v2

πŸ“‘ Invoice Extraction Dataset v2 This dataset is specifically designed for fine-tuning Large Language Models (LLMs) to perform Structured Data Extraction. It contains 601 unique examples of messy, unstructured invoice and receipt descriptions paired with their clean, machine-readable JSON counterparts. πŸš€ Dataset Purpose General LLMs often include conversational filler when asked for JSON. This dataset was built to train models to: Ignore "Noise": Ignore… See the full description on the dataset page: https://huggingface.co/datasets/manuelaschrittwieser/invoice-extraction-dataset-v2.

sourceHugging Faceapache-2.0updated 8mo agoView on Hugging Face
0likes33downloads
Dataset Card

πŸ“‘ Invoice Extraction Dataset v2

This dataset is specifically designed for fine-tuning Large Language Models (LLMs) to perform Structured Data Extraction. It contains 601 unique examples of messy, unstructured invoice and receipt descriptions paired with their clean, machine-readable JSON counterparts.

πŸš€ Dataset Purpose

General LLMs often include conversational filler when asked for JSON. This dataset was built to train models to:

  1. 1.Ignore "Noise": Ignore conversational filler and irrelevant words.
  2. 2.Strict Formatting: Output only valid JSON.
  3. 3.Entity Recognition: Correctly identify vendors, totals, dates, and items regardless of sentence structure.

πŸ“Š Dataset Structure

The dataset is provided in JSONL (JSON Lines) format, which is the industry standard for LLM fine-tuning. Each row contains:

  • β€”instruction: The task description ("Extract invoice details into JSON.")
  • β€”input: A messy, natural language description of a transaction.
  • β€”output: A stringified JSON object containing the extracted fields.

Target Schema

The model is trained to extract the following fields:

json
{
  "item": "string",
  "quantity": "integer",
  "date": "string",
  "vendor": "string",
  "total": "float",
  "currency": "string"
}

πŸ› οΈ Data Generation Methodology

This is a Synthetic Dataset generated using a custom Python pipeline.

  • β€”Variety: Uses 20+ vendors, 20+ item categories, and 5 different currency types.
  • β€”Robustness: 7 different sentence templates were used to ensure the model doesn't overfit to a single way of speaking.
  • β€”Formats: Includes various date formats (e.g., "Oct 12", "12/10/23", "yesterday") to test the model's temporal reasoning.

πŸ’» How to Use

You can load this dataset directly in your training script using the Hugging Face datasets library:

python
from datasets import load_dataset

dataset = load_dataset("manuelaschrittwieser/invoice-extraction-dataset-v2")
print(dataset["train"][0])

🎯 Use Cases

  • β€”Fine-tuning Llama-3, Mistral, or Phi-3 for financial automation.
  • β€”Training "Parser Agents" for accounting software.
  • β€”Benchmarking small models on structured data tasks.

πŸ† Project Context

This dataset was created as part of a Structured Data Extractor project. It serves as the training foundation for the llama-3-invoice-extractor model.

Developed by: manuelaschrittwieser