| name | Highest_Cost_Scenario_Identification |
| description | Identifies the highest-cost scenario in payment processing fee analysis for the dabstep dataset. Use this skill when asked to find the most expensive MCC (Merchant Category Code) for a given transaction amount, or the most expensive ACI (Authorization Characteristics Indicator) for a given card scheme and transaction amount. Triggers on questions like "what is the most expensive MCC", "which ACI leads to highest fees", "find the costliest transaction scenario", or any query asking to identify maximum-fee scenarios in payment processing. |
Highest Cost Scenario Identification
Dataset Overview
The dabstep dataset models payment processing fees with these key files:
fees.json: 1000 fee rules, each specifying conditions and fee parameters
merchant_category_codes.csv: MCC descriptions (not exhaustive — fee rules may reference MCCs not in this file)
manual.md: Domain definitions including ACI codes (A–G) and fee formula
Fee formula: fee = fixed_amount + rate * transaction_amount / 10000
Two Question Types
Type 1: Most Expensive MCC
"What is the most expensive MCC for a transaction of X euros, in general?"
Find which MCC(s) can incur the highest fee across all fee rules.
import json
with open('fees.json') as f:
fees = json.load(f)
amount = 50
mcc_max_fee = {}
for rule in fees:
mcc_list = rule['merchant_category_code']
mcc_list:
fee = rule[] + rule[] * amount /
mcc mcc_list:
mcc_max_fee[mcc] = (mcc_max_fee.get(mcc, ), fee)
max_fee = (mcc_max_fee.values())
result_mccs = ([mcc mcc, f mcc_max_fee.items() f == max_fee])
(.join((m) m result_mccs))