πΌ π Synthetic Financial Domain Documents with PII Labels
81
16 commits
1 linked in READMEs
updated Jun 11, 2024
Image generated by DALL-E. See prompt for more details
gretelai/synthetic_pii_finance_multilingual is a dataset of full length synthetic financial documents containing Personally Identifiable Information (PII), generated using Gretel Navigator and released under Apache 2.0.
This dataset is designed to assist with the following use cases:


The types of personally identifiable information (PII) included in this dataset are popular types used in the financial industry. When possible, tag names are aligned with the Python Faker generator names, simplifying the use of this dataset to train models to replace detected PII with fake items.
| PII Type | train | test |
|---|---|---|
| account_pin | 1266 | 143 |
| api_key | 922 | 91 |
| bank_routing_number | 1452 | 158 |
| bban | 1477 | 166 |
| company | 56338 | 6342 |
| credit_card_number | 1224 | 120 |
| credit_card_security_code | 1275 | 160 |
| customer_id | 1823 | 195 |
| date | 75830 | 8469 |
| date_of_birth | 2339 | 250 |
| date_time | 767 | 89 |
| driver_license_number | 1269 | 140 |
| 12914 | 1422 | |
| employee_id | 1696 | 175 |
| first_name | 2565 | 279 |
| iban | 1814 | 203 |
| ipv4 | 1591 | 164 |
| ipv6 | 1191 | 134 |
| last_name | 1594 | 215 |
| local_latlng | 802 | 97 |
| name | 89642 | 10318 |
| passport_number | 1426 | 136 |
| password | 789 | 101 |
| phone_number | 8277 | 946 |
| ssn | 1313 | 153 |
| street_address | 37845 | 4307 |
| swift_bic_code | 1917 | 227 |
| time | 15735 | 1746 |
| user_name | 906 | 71 |
The use of synthetic data eliminates the risk of exposing real PII while providing a diverse and representative dataset for training and evaluation.
Gretel Navigator, an agent-based, compound AI system, was used to generate this synthetic dataset. Navigator utilizes the following LLMs for synthetic data generation:
gretelai/Mistral-7B-Instruct-v0.2/industry: A Gretel fine-tuned LLM trained on data from 10+ different industry verticals, including popular financial data formats.mistralai/Mixtral-8x7B-Instruct-v0.1: Leveraged for text generation.The data used to train these LLMs contains no usage restrictions. See the License below for details.
Note: Gretel's LLM, pre-trained on industry documents, was used to generate financial industry-specific documents with synthetic PII values. A NER library labeled the PII, which may introduce false negatives (missed labels) or false positives (incorrect labels). To address this, LLM-as-a-Judge filtered the data, and human reviewers randomly spot-checked it. Some errors may still be present. If you find any, please let us know or submit a pull request to update the labels. Thank you.
The dataset includes the following fields:
document_type: The type of document (e.g., Email, Financial Statement, IT support ticket).document_description: A brief description of the document type.expanded_type: A more specific subtype of the document.expanded_description: A detailed description of the expanded document type.language: The language of the generated text.language_description: A description of the language variant.generated_text: The generated document text containing PII.pii_spans: A list of PII spans, where each span is a JSON string containing the start index, end index, and the type of PII.conformance_score: A score from 0-100 indicating the conformance of the generated text to the tags and descriptions provided, with 100 being fully conforming and 0 being non-conforming.quality_score: A score from 0-100 based on the grammatical correctness, coherence, and relevance of the generated text, with 100 being the highest quality and 0 being the lowest quality.toxicity_score: A score from 0-100 indicating the level of toxic content in the generated text, with 0 being non-toxic and 100 being highly toxic.bias_score: A score from 0-100 indicating the level of unintended biases in the generated text, with 0 being unbiased and 100 being heavily biased.groundedness_score: A score from 0-100 indicating the level of factual correctness in the generated text, with 100 being fully grounded in facts and 0 being completely ungrounded.{
"document_type": "FpML",
"document_description": "A standard for representing data concerning financial derivatives, including trade capture, confirmation, and valuation, often used in electronic trading and risk management.",
"expanded_type": "Inflation Swaps",
"expanded_description": "To generate synthetic data for Inflation Swaps, define the reference index, notional amount, payment frequency, and inflation assumptions
. Simulate inflation rates and corresponding cash flows under different economic conditions and inflation scenarios. Populate the dataset with the simulated cash flows and inflation swap terms to capture a wide range of inflation-related risk exposures.",
"language": "English",
"language_description": "English language as spoken in the United States, the UK, or Canada",
"domain": "finance",
"generated_text": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<fx:message xmlns:fx=\"http:\/\/www.fixprotocol.org\/FpML-5-5\"\n xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\"\n xsi:schemaLocation=\"http:\/\/www.fixprotocol.org\/FpML-5-5 http:\/\/www.fixprotocol.org\/fixml\/schema\/FpML-5-5-0.xsd\">\n <header>\n <party id=\"sender\">\n <name>Castillo Ltd<\/name>\n <\/party>\n <party id=\"target\">\n <name>Counterparty Inc.<\/name>\n <\/party>\n <sentDate>2022-05-12<\/sentDate>\n <\/header>\n <body>\n <trade>\n <tradeId>20220512-1001<\/tradeId>\n <product>\n <productType>4<\/productType>\n <swap>\n <inflationSwap>\n <referenceIndex>\n <index>\n <name>Consumer Price Index<\/name>\n <currency>USD<\/currency>\n <\/index>\n <\/referenceIndex>\n <notionalAmount currency=\"USD\">10000000<\/notionalAmount>\n <paymentFrequency>2<\/paymentFrequency>\n <inflationAssumptions>\n <indexTenor>1Y<\/indexTenor>\n <indexTenor>2Y<\/indexTenor>\n <indexTenor>5Y<\/indexTenor>\n <\/inflationAssumptions>\n <\/inflationSwap>\n <\/swap>\n <\/product>\n <partyTradeRole>\n <partyRef id=\"sender\"\/>\n <tradeRole>1<\/tradeRole>\n <\/partyTradeRole>\n <partyTradeRole>\n <partyRef id=\"target\"\/>\n <tradeRole>2<\/tradeRole>\n <\/partyTradeRole>\n ",
"pii_spans": [
{"start": 342, "end": 354, "label": "company"},
{"start": 418, "end": 435, "label": "company"},
{"start": 474, "end": 484, "label": "date"}
],
"conformance_score": 80.0,
"quality_score": 95.0,
"toxicity_score": 0.0,
"bias_score": 0.0,
"groundedness_score": 90.0
}
This dataset is designed to generate highly realistic synthetic document formats commonly used by banks, financial institutions, and other organizations in the finance space. For this dataset, 100 specific document types were generated, including 20 subtypes per document type, for a total of 2,000 possible document descriptors used to prompt synthetic data generation.

The LLM-as-a-Judge technique using the Mistral-7B language model was employed to ensure the quality of the synthetic PII and documents in this dataset. Each generated record was evaluated based on the following criteria:

Records with a toxicity score or bias score above 20, or a groundedness score, quality score, or conformance score below 80, were removed from the dataset.
All data in this generated dataset is Apache 2.0 licensed and can be used for any purpose that is not harmful.
@software{gretel-synthetic-pii-finance-multilingual-2024,
author = {Watson, Alex and Meyer, Yev and Van Segbroeck, Maarten and Grossman, Matthew and Torbey, Sami and Mlocek, Piotr and Greco, Johnny},
title = {{Synthetic-PII-Financial-Documents-North-America}: A synthetic dataset for training language models to label and detect PII in domain specific formats},
month = {June},
year = {2024},
url = {https://huggingface.co/datasets/gretelai/synthetic_pii_finance_multilingual}
}
16 commits
πΌ π Synthetic Financial Domain Documents with PII Labels
81
16 commits
1 linked in READMEs
updated Jun 11, 2024
Image generated by DALL-E. See prompt for more details
gretelai/synthetic_pii_finance_multilingual is a dataset of full length synthetic financial documents containing Personally Identifiable Information (PII), generated using Gretel Navigator and released under Apache 2.0.
This dataset is designed to assist with the following use cases:


The types of personally identifiable information (PII) included in this dataset are popular types used in the financial industry. When possible, tag names are aligned with the Python Faker generator names, simplifying the use of this dataset to train models to replace detected PII with fake items.
| PII Type | train | test |
|---|---|---|
| account_pin | 1266 | 143 |
| api_key | 922 | 91 |
| bank_routing_number | 1452 | 158 |
| bban | 1477 | 166 |
| company | 56338 | 6342 |
| credit_card_number | 1224 | 120 |
| credit_card_security_code | 1275 | 160 |
| customer_id | 1823 | 195 |
| date | 75830 | 8469 |
| date_of_birth | 2339 | 250 |
| date_time | 767 | 89 |
| driver_license_number | 1269 | 140 |
| 12914 | 1422 | |
| employee_id | 1696 | 175 |
| first_name | 2565 | 279 |
| iban | 1814 | 203 |
| ipv4 | 1591 | 164 |
| ipv6 | 1191 | 134 |
| last_name | 1594 | 215 |
| local_latlng | 802 | 97 |
| name | 89642 | 10318 |
| passport_number | 1426 | 136 |
| password | 789 | 101 |
| phone_number | 8277 | 946 |
| ssn | 1313 | 153 |
| street_address | 37845 | 4307 |
| swift_bic_code | 1917 | 227 |
| time | 15735 | 1746 |
| user_name | 906 | 71 |
The use of synthetic data eliminates the risk of exposing real PII while providing a diverse and representative dataset for training and evaluation.
Gretel Navigator, an agent-based, compound AI system, was used to generate this synthetic dataset. Navigator utilizes the following LLMs for synthetic data generation:
gretelai/Mistral-7B-Instruct-v0.2/industry: A Gretel fine-tuned LLM trained on data from 10+ different industry verticals, including popular financial data formats.mistralai/Mixtral-8x7B-Instruct-v0.1: Leveraged for text generation.The data used to train these LLMs contains no usage restrictions. See the License below for details.
Note: Gretel's LLM, pre-trained on industry documents, was used to generate financial industry-specific documents with synthetic PII values. A NER library labeled the PII, which may introduce false negatives (missed labels) or false positives (incorrect labels). To address this, LLM-as-a-Judge filtered the data, and human reviewers randomly spot-checked it. Some errors may still be present. If you find any, please let us know or submit a pull request to update the labels. Thank you.
The dataset includes the following fields:
document_type: The type of document (e.g., Email, Financial Statement, IT support ticket).document_description: A brief description of the document type.expanded_type: A more specific subtype of the document.expanded_description: A detailed description of the expanded document type.language: The language of the generated text.language_description: A description of the language variant.generated_text: The generated document text containing PII.pii_spans: A list of PII spans, where each span is a JSON string containing the start index, end index, and the type of PII.conformance_score: A score from 0-100 indicating the conformance of the generated text to the tags and descriptions provided, with 100 being fully conforming and 0 being non-conforming.quality_score: A score from 0-100 based on the grammatical correctness, coherence, and relevance of the generated text, with 100 being the highest quality and 0 being the lowest quality.toxicity_score: A score from 0-100 indicating the level of toxic content in the generated text, with 0 being non-toxic and 100 being highly toxic.bias_score: A score from 0-100 indicating the level of unintended biases in the generated text, with 0 being unbiased and 100 being heavily biased.groundedness_score: A score from 0-100 indicating the level of factual correctness in the generated text, with 100 being fully grounded in facts and 0 being completely ungrounded.{
"document_type": "FpML",
"document_description": "A standard for representing data concerning financial derivatives, including trade capture, confirmation, and valuation, often used in electronic trading and risk management.",
"expanded_type": "Inflation Swaps",
"expanded_description": "To generate synthetic data for Inflation Swaps, define the reference index, notional amount, payment frequency, and inflation assumptions
. Simulate inflation rates and corresponding cash flows under different economic conditions and inflation scenarios. Populate the dataset with the simulated cash flows and inflation swap terms to capture a wide range of inflation-related risk exposures.",
"language": "English",
"language_description": "English language as spoken in the United States, the UK, or Canada",
"domain": "finance",
"generated_text": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<fx:message xmlns:fx=\"http:\/\/www.fixprotocol.org\/FpML-5-5\"\n xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\"\n xsi:schemaLocation=\"http:\/\/www.fixprotocol.org\/FpML-5-5 http:\/\/www.fixprotocol.org\/fixml\/schema\/FpML-5-5-0.xsd\">\n <header>\n <party id=\"sender\">\n <name>Castillo Ltd<\/name>\n <\/party>\n <party id=\"target\">\n <name>Counterparty Inc.<\/name>\n <\/party>\n <sentDate>2022-05-12<\/sentDate>\n <\/header>\n <body>\n <trade>\n <tradeId>20220512-1001<\/tradeId>\n <product>\n <productType>4<\/productType>\n <swap>\n <inflationSwap>\n <referenceIndex>\n <index>\n <name>Consumer Price Index<\/name>\n <currency>USD<\/currency>\n <\/index>\n <\/referenceIndex>\n <notionalAmount currency=\"USD\">10000000<\/notionalAmount>\n <paymentFrequency>2<\/paymentFrequency>\n <inflationAssumptions>\n <indexTenor>1Y<\/indexTenor>\n <indexTenor>2Y<\/indexTenor>\n <indexTenor>5Y<\/indexTenor>\n <\/inflationAssumptions>\n <\/inflationSwap>\n <\/swap>\n <\/product>\n <partyTradeRole>\n <partyRef id=\"sender\"\/>\n <tradeRole>1<\/tradeRole>\n <\/partyTradeRole>\n <partyTradeRole>\n <partyRef id=\"target\"\/>\n <tradeRole>2<\/tradeRole>\n <\/partyTradeRole>\n ",
"pii_spans": [
{"start": 342, "end": 354, "label": "company"},
{"start": 418, "end": 435, "label": "company"},
{"start": 474, "end": 484, "label": "date"}
],
"conformance_score": 80.0,
"quality_score": 95.0,
"toxicity_score": 0.0,
"bias_score": 0.0,
"groundedness_score": 90.0
}
This dataset is designed to generate highly realistic synthetic document formats commonly used by banks, financial institutions, and other organizations in the finance space. For this dataset, 100 specific document types were generated, including 20 subtypes per document type, for a total of 2,000 possible document descriptors used to prompt synthetic data generation.

The LLM-as-a-Judge technique using the Mistral-7B language model was employed to ensure the quality of the synthetic PII and documents in this dataset. Each generated record was evaluated based on the following criteria:

Records with a toxicity score or bias score above 20, or a groundedness score, quality score, or conformance score below 80, were removed from the dataset.
All data in this generated dataset is Apache 2.0 licensed and can be used for any purpose that is not harmful.
@software{gretel-synthetic-pii-finance-multilingual-2024,
author = {Watson, Alex and Meyer, Yev and Van Segbroeck, Maarten and Grossman, Matthew and Torbey, Sami and Mlocek, Piotr and Greco, Johnny},
title = {{Synthetic-PII-Financial-Documents-North-America}: A synthetic dataset for training language models to label and detect PII in domain specific formats},
month = {June},
year = {2024},
url = {https://huggingface.co/datasets/gretelai/synthetic_pii_finance_multilingual}
}
16 commits