|
Download README.md from vara201/ecommerce-orders-structured-output: direct link, hf CLI and curl.
- Browser
- Download file 6.19 kB
-
https://huggingface.co/datasets/vara201/ecommerce-orders-structured-output/resolve/main/README.md
- Command line
-
hf download hf://datasets/vara201/ecommerce-orders-structured-output/README.md
-
curl -L -o README.md https://huggingface.co/datasets/vara201/ecommerce-orders-structured-output/resolve/main/README.md
6.19 kB
| license: mit | |
| task_categories: | |
| - text-generation | |
| language: | |
| - en | |
| tags: | |
| - e-commerce | |
| - structured-output | |
| - information-extraction | |
| - json | |
| - parquet | |
| - json-schema | |
| - instruction-tuning | |
| pretty_name: E-commerce Orders and Transactions Structured Extraction | |
| size_categories: | |
| - 1K<n<10K | |
| # E-commerce Orders and Transactions — Structured Extraction Dataset | |
| ## Dataset Description | |
| This dataset contains approximately 3,000 examples focused on structured information extraction from e-commerce orders, invoices, and transaction-related text. | |
| Each example pairs business-related source text with its expected structured output. Depending on the record, the original data may also include extraction instructions and a JSON Schema describing the required output structure. | |
| The dataset is intended for training and evaluating large language models (LLMs) that convert unstructured business text into structured JSON. | |
| ## Dataset Details | |
| - **Repository:** [vara201/ecommerce-orders-structured-json](https://huggingface.co/datasets/vara201/ecommerce-orders-structured-json) | |
| - **Format:** Apache Parquet (`.parquet`) | |
| - **Data file:** `train.parquet` | |
| - **Approximate size:** 3,000 records | |
| - **Language:** English | |
| - **Domain:** E-commerce orders and transactions | |
| - **Tasks:** Information extraction, instruction tuning, structured JSON generation | |
| - **License:** MIT, subject to the dataset author's rights to distribute the data under this license | |
| ## Dataset Structure | |
| The dataset is stored in Parquet format, which supports efficient storage and table-based access. Records have been shuffled to randomize their order. | |
| Depending on the columns included in the uploaded file, the dataset may contain: | |
| | Column | Description | | |
| |---|---| | |
| | `id` | Unique example identifier | | |
| | `instruction` | Instruction describing the extraction task | | |
| | `data` | Source text from which information is extracted | | |
| | `schema` | JSON-encoded schema describing the expected output | | |
| | `output` | JSON-encoded expected structured response | | |
| The `schema` and `output` columns may contain JSON strings rather than nested objects to ensure consistent column types. | |
| ### Example | |
| ```json | |
| { | |
| "id": "train_000001", | |
| "instruction": "Extract structured information from the input text.", | |
| "data": "Order confirmation: Customer Michael Chang purchased an UltraTech 27-inch 4K Gaming Monitor (Order ID: ORD-89412) on October 12, 2024. The total charged was $429.99 via Visa ending in 4012.", | |
| "schema": "{\"type\":\"object\",\"properties\":{\"order_id\":{\"type\":\"string\"}}}", | |
| "output": "{\"order_id\":\"ORD-89412\",\"customer_name\":\"Michael Chang\",\"product_name\":\"UltraTech 27-inch 4K Gaming Monitor\",\"purchase_date\":\"October 12, 2024\",\"total_amount\":429.99,\"payment_method\":\"Visa ending in 4012\"}" | |
| } | |
| ``` | |
| This is an illustrative example. The exact fields and values depend on the uploaded records. | |
| ## Intended Uses | |
| - Fine-tuning LLMs for structured information extraction. | |
| - Training models to convert order confirmations and invoices into JSON. | |
| - Instruction tuning for business document understanding. | |
| - Evaluating extraction accuracy and JSON generation quality. | |
| - Experimenting with JSON Schema-guided generation. | |
| ## Out-of-Scope Uses | |
| This dataset should not be used as the sole basis for authorizing payments, making consequential decisions about customers, or generating authoritative financial records without independent verification. | |
| ## Dataset Creation | |
| ### Curation Rationale | |
| The dataset is designed to support supervised learning in which a model receives business-related text and produces a structured representation of the information. | |
| Expected outputs provide reference values for evaluating model predictions. Where available, JSON Schemas describe the expected output structure. | |
| ### Source Data | |
| The dataset covers e-commerce orders, invoices, and transaction-related text. The precise origin of the examples and whether they were synthetically generated or collected from other sources should be documented by the dataset author. | |
| ### Processing | |
| The records were converted from JSON to Parquet. Records were shuffled before saving, and nested dictionaries or lists were serialized as JSON strings where necessary to maintain consistent column types. | |
| ### Personal and Sensitive Information | |
| Order records may contain names, order identifiers, and payment references. Verify that the published dataset does not expose real customer information, full payment credentials, or confidential data. Synthetic or appropriately anonymized examples are recommended for public release. | |
| ## Limitations | |
| - The dataset focuses on e-commerce orders and transactions. | |
| - Performance may vary on other domains, languages, and document types. | |
| - Incorrect reference outputs can affect training and evaluation. | |
| - Valid JSON syntax does not guarantee correct information extraction. | |
| - The dataset's provenance and validation procedures should be documented where known. | |
| ## Recommendations | |
| Evaluate models on a separate test set. Use JSON parsing, schema validation, and field-level accuracy checks when measuring performance. Verify extracted values against source documents before using them in real-world workflows. | |
| ## Loading the Dataset | |
| Install the required library: | |
| ```bash | |
| pip install -U datasets | |
| ``` | |
| Load the dataset from Hugging Face: | |
| ```python | |
| from datasets import load_dataset | |
| dataset = load_dataset( | |
| "vara201/ecommerce-orders-structured-json", | |
| data_files="train.parquet", | |
| split="train" | |
| ) | |
| print(dataset) | |
| print(dataset.column_names) | |
| print(dataset[0]) | |
| ``` | |
| Parse JSON-encoded fields when needed: | |
| ```python | |
| import json | |
| schema = json.loads(dataset[0]["schema"]) | |
| output = json.loads(dataset[0]["output"]) | |
| print(schema) | |
| print(output) | |
| ``` | |
| ## Citation | |
| No associated publication has been provided. If referencing this dataset, cite the repository: | |
| `vara201, E-commerce Orders and Transactions — Structured Extraction Dataset, Hugging Face Datasets.` | |
| https://huggingface.co/datasets/vara201/ecommerce-orders-structured-json | |
| ## Contact | |
| For questions or feedback, use the Discussions section of the Hugging Face dataset repository. | |