Generate Strategy
Use AI to auto-suggest field mappings and strategies for a reference dataset. Analyses column names, data types, and sample values to recommend configs.
Let AI analyse your reference dataset and recommend field mappings, comparison strategies, and weights. The strategy generator examines column names, data types, and sample values to produce an optimal matching configuration. Use the generated strategy as a starting point or pass it directly to a smart-run.
The generated strategy document contains field_rules (per-field comparison rules with a rationale explaining why the AI chose that comparison type and weight), blocking_keys for candidate pre-filtering, thresholds for auto-commit and auto-reject bands, and notes on cardinality and data quality. You can optionally provide a user_prompt with natural language guidance (e.g. "prioritise date matching" or "vendor name is the most important field") to steer the generation.
/v1/matching/strategies/generateBody parameters
Response
Response fields
Response
{
"id": "f6a7b8c9-d0e1-2345-fab2-456789012345",
"name": null,
"matching_config_id": null,
"strategy": {
"reasoning_summary": "Match invoices to the vendor master via vendor name with date and amount corroboration.",
"cardinality": { "expected": "N:1", "rationale": "Many invoices map to one vendor row." },
"data_quality_notes": ["Vendor names carry legal-form suffixes (GmbH, Ltd)."],
"blocking_keys": [
{ "extracted_field": "vendor_name", "reference_field": "name", "transform": "first_n_chars", "transform_param": 4, "rationale": "Cheap candidate pre-filter on the name prefix." }
],
"field_rules": [
{ "extracted_field": "vendor_name", "reference_field": "name", "comparison_type": "fuzzy_string", "weight": 0.4, "rationale": "High cardinality text; fuzzy handles name variations." },
{ "extracted_field": "invoice_date", "reference_field": "date", "comparison_type": "date_range", "weight": 0.3, "tolerance_days": 5, "rationale": "Range comparison tolerates minor discrepancies." },
{ "extracted_field": "total_amount", "reference_field": "total", "comparison_type": "numeric_range", "weight": 0.3, "tolerance_pct": 1, "rationale": "Range accounts for rounding differences." }
],
"thresholds": { "auto_commit": 0.85, "auto_reject": 0.30 },
"edge_cases": []
},
"version": 1,
"version_hash": "a1b2c3d4e5f6",
"created_at": "2024-10-03T10:00:00.000Z",
"updated_at": "2024-10-03T10:00:00.000Z",
"links": {
"self": "/v1/matching/strategies/f6a7b8c9-d0e1-2345-fab2-456789012345"
}
}Errors
Error responses