expense-extraction-dataset / builder_config.json
razisayyed's picture
Upload builder_config.json
fe19101 verified
Raw
History Blame Contribute Delete
17 kB
{
"data_designer": {
"columns": [
{
"name": "language",
"drop": true,
"allow_resize": false,
"column_type": "sampler",
"sampler_type": "category",
"params": {
"values": [
"Palestinian Arabic",
"MSA Arabic",
"English",
"Mixed Arabic English",
"Arabizi"
],
"weights": [
0.35,
0.25,
0.2,
0.15,
0.05
],
"sampler_type": "category"
},
"conditional_params": {},
"convert_to": null
},
{
"name": "user_message",
"drop": false,
"allow_resize": false,
"column_type": "llm-text",
"prompt": "You are generating ONE synthetic training example for an expense information extraction dataset.\n\nGenerate exactly one realistic user message.\n\nThe message must satisfy the following generated parameters:\n\nLanguage: {{ language }}\nDifficulty: {{ difficulty }}\nExpense count: {{ expense_count }}\nMerchant: {{ merchant }}\nDate: {{ date }}\nTime: {{ time }}\nCurrency: {{ currency }} <- (use one of the common labels for this currency)\nPayment method: {{ payment_method }}\nWriting style: {{ writing_style }}\nNoise level: {{ noise_level }}\nExpense category: {{ category }}\n\nRequirements:\n\n- Generate only the user's message.\n- Do not answer the message.\n- Do not output JSON.\n- Do not explain your reasoning.\n- Do not use markdown.\n- Do not wrap the message in quotation marks.\n- Make the message realistic and natural.\n- Include only the information required by the generated parameters.\n- If a field is marked \"omitted\", do not mention it.",
"model_alias": "gpt-4.1-mini-0.7temp",
"system_prompt": null,
"multi_modal_context": null,
"tool_alias": null,
"with_trace": "none",
"extract_reasoning_content": false
},
{
"name": "uuid",
"drop": false,
"allow_resize": false,
"column_type": "sampler",
"sampler_type": "uuid",
"params": {
"prefix": null,
"short_form": false,
"uppercase": false,
"sampler_type": "uuid"
},
"conditional_params": {},
"convert_to": null
},
{
"name": "difficulty",
"drop": true,
"allow_resize": false,
"column_type": "sampler",
"sampler_type": "category",
"params": {
"values": [
"easy",
"medium",
"hard"
],
"weights": [
0.5,
0.35,
0.15
],
"sampler_type": "category"
},
"conditional_params": {},
"convert_to": null
},
{
"name": "expense_count",
"drop": true,
"allow_resize": false,
"column_type": "sampler",
"sampler_type": "category",
"params": {
"values": [
"single",
"multiple"
],
"weights": null,
"sampler_type": "category"
},
"conditional_params": {},
"convert_to": null
},
{
"name": "merchant",
"drop": true,
"allow_resize": false,
"column_type": "sampler",
"sampler_type": "category",
"params": {
"values": [
"explicit",
"omitted"
],
"weights": [
0.7,
0.3
],
"sampler_type": "category"
},
"conditional_params": {},
"convert_to": null
},
{
"name": "date",
"drop": true,
"allow_resize": false,
"column_type": "sampler",
"sampler_type": "category",
"params": {
"values": [
"explicit",
"relative",
"omitted"
],
"weights": [
0.1,
0.2,
0.7
],
"sampler_type": "category"
},
"conditional_params": {},
"convert_to": null
},
{
"name": "time",
"drop": true,
"allow_resize": false,
"column_type": "sampler",
"sampler_type": "category",
"params": {
"values": [
"explicit",
"omitted"
],
"weights": [
0.3,
0.7
],
"sampler_type": "category"
},
"conditional_params": {},
"convert_to": null
},
{
"name": "currency",
"drop": true,
"allow_resize": false,
"column_type": "sampler",
"sampler_type": "category",
"params": {
"values": [
"omitted",
"USD",
"JOD",
"ILS",
"EGP",
"EUR"
],
"weights": [
0.05,
0.1,
0.15,
0.6,
0.05,
0.05
],
"sampler_type": "category"
},
"conditional_params": {},
"convert_to": null
},
{
"name": "writing_style",
"drop": true,
"allow_resize": false,
"column_type": "sampler",
"sampler_type": "category",
"params": {
"values": [
"statement",
"request",
"chat_message",
"note"
],
"weights": null,
"sampler_type": "category"
},
"conditional_params": {},
"convert_to": null
},
{
"name": "payment_method",
"drop": true,
"allow_resize": false,
"column_type": "sampler",
"sampler_type": "category",
"params": {
"values": [
"explicit",
"omitted"
],
"weights": [
0.6,
0.4
],
"sampler_type": "category"
},
"conditional_params": {},
"convert_to": null
},
{
"name": "noise_level",
"drop": true,
"allow_resize": false,
"column_type": "sampler",
"sampler_type": "category",
"params": {
"values": [
"clean",
"typos",
"informal",
"emoji"
],
"weights": null,
"sampler_type": "category"
},
"conditional_params": {},
"convert_to": null
},
{
"name": "category",
"drop": true,
"allow_resize": false,
"column_type": "sampler",
"sampler_type": "category",
"params": {
"values": [
"food",
"groceries",
"transportation",
"shopping",
"books",
"pharmacy",
"entertainment",
"utilities",
"subscriptions",
"electronics",
"travel"
],
"weights": null,
"sampler_type": "category"
},
"conditional_params": {},
"convert_to": null
},
{
"name": "assistant_response",
"drop": false,
"allow_resize": false,
"column_type": "llm-structured",
"prompt": "You are an expense information extraction system.\n\nExtract all expenses explicitly described in the user message and return them according to the provided structured output schema.\n\nExtraction rules:\n\n1. Extract only information supported by the user message.\n2. Do not guess or invent missing values.\n3. If a value is not mentioned or cannot be reliably inferred, return null.\n4. If the message contains multiple separate expenses, return one object for each expense in the expenses array.\n5. If several items are part of one transaction, keep them in one expense object and place the individual products in the items array.\n6. Normalize currencies to one of these values:\n\n * ILS\n * USD\n * JOD\n * EUR\n * EGP\n * UNKNOWN\n7. Interpret common currency expressions as follows:\n\n * شيكل, شيكل جديد, شاقل, شواقل, ₪, NIS → ILS\n * دولار, $, USD → USD\n * دينار, JD, JOD → JOD\n * يورو, €, EUR → EUR\n * جنيه، جنيه مصري -> EGP\n8. If no currency is mentioned, return UNKNOWN. Do not assume ILS merely because the message is written in Palestinian Arabic.\n9. Normalize payment methods to:\n\n * cash\n * credit_card\n * debit_card\n * bank_transfer\n * mobile_payment\n * other\n * unknown\n10. Use the following expense categories:\n\n * food_and_drink\n * groceries\n * transportation\n * fuel\n * parking\n * shopping\n * clothing\n * books_and_education\n * pharmacy_and_health\n * entertainment\n * subscriptions\n * utilities\n * gifts\n * electronics\n * travel\n * other\n11. Select the category from the actual expense description. Do not rely on external knowledge unless the category is obvious from the merchant or item.\n12. Preserve relative date expressions such as \"yesterday\", \"today\", \"امبارح\", or \"الأسبوع الماضي\" in date_expression. Do not convert them to calendar dates because no reference date is provided.\n13. Preserve explicit dates in date_expression exactly as stated by the user.\n14. Preserve explicit time information in time_expression. Do not invent a time.\n15. Monetary values must be numbers without currency symbols.\n16. If the user provides one total amount for several items, place that value in total_amount and leave unknown item-level prices as null.\n17. If quantity is not explicitly mentioned, return null. Do not automatically assume a quantity of 1.\n18. If no individual items can be identified, return an empty items array.\n19. Do not include explanations, comments, markdown, or additional fields.\n20. The output must conform exactly to the structured output schema.\n\nUser message:\n\n{{ user_message }}\n",
"model_alias": "gpt-4.1-mini-0.7temp",
"system_prompt": null,
"multi_modal_context": null,
"tool_alias": null,
"with_trace": "none",
"extract_reasoning_content": false,
"output_format": {
"type": "object",
"additionalProperties": false,
"properties": {
"expenses": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"merchant": {
"type": [
"string",
"null"
],
"description": "The merchant, shop, restaurant, service provider, or payee explicitly mentioned in the message."
},
"category": {
"type": "string",
"enum": [
"food_and_drink",
"groceries",
"transportation",
"fuel",
"parking",
"shopping",
"clothing",
"books_and_education",
"pharmacy_and_health",
"entertainment",
"subscriptions",
"utilities",
"gifts",
"electronics",
"travel",
"other"
],
"description": "The normalized category of the expense."
},
"total_amount": {
"type": [
"number",
"null"
],
"description": "The total monetary amount of this expense, without a currency symbol."
},
"currency": {
"type": "string",
"enum": [
"ILS",
"USD",
"JOD",
"EUR",
"EGP",
"UNKNOWN"
],
"description": "The normalized currency. Use UNKNOWN when no currency is stated."
},
"payment_method": {
"type": "string",
"enum": [
"cash",
"credit_card",
"debit_card",
"bank_transfer",
"mobile_payment",
"other",
"unknown"
],
"description": "The normalized payment method. Use unknown when it is not stated."
},
"date_expression": {
"type": [
"string",
"null"
],
"description": "The explicit or relative date expression exactly as stated in the message."
},
"time_expression": {
"type": [
"string",
"null"
],
"description": "The explicit time expression exactly as stated in the message."
},
"items": {
"type": "array",
"description": "Individual products or services included in this transaction.",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"description": "The item or service explicitly mentioned."
},
"quantity": {
"type": [
"number",
"null"
],
"description": "The explicitly stated quantity, or null if not provided."
},
"unit_price": {
"type": [
"number",
"null"
],
"description": "The explicitly stated price for one unit, or null."
},
"total_price": {
"type": [
"number",
"null"
],
"description": "The explicitly stated or directly calculable total price for this item."
}
},
"required": [
"name",
"quantity",
"unit_price",
"total_price"
]
}
}
},
"required": [
"merchant",
"category",
"total_amount",
"currency",
"payment_method",
"date_expression",
"time_expression",
"items"
]
}
}
},
"required": [
"expenses"
]
}
},
{
"name": "system_prompt",
"drop": false,
"allow_resize": false,
"column_type": "expression",
"expr": "You are an expense extraction assistant.\n\nExtract expense information.\n\nReturn valid JSON.",
"dtype": "str"
}
],
"model_configs": [
{
"alias": "gpt-4.1-mini-0.7temp",
"model": "gpt-4.1-mini",
"inference_parameters": {
"generation_type": "chat-completion",
"max_parallel_requests": 20,
"timeout": null,
"extra_body": null,
"temperature": 0.7,
"top_p": null,
"max_tokens": null
},
"provider": "provider",
"skip_health_check": false
},
{
"alias": "gpt-4.1-mini-0.0temp",
"model": "gpt-4.1-mini",
"inference_parameters": {
"generation_type": "chat-completion",
"max_parallel_requests": 20,
"timeout": null,
"extra_body": null,
"temperature": 0.0,
"top_p": null,
"max_tokens": null
},
"provider": "provider",
"skip_health_check": false
}
],
"tool_configs": [],
"seed_config": null,
"constraints": null,
"profilers": null,
"processors": null
},
"library_version": "0.5.4"
}