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 optimal matching configurations.
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.
Each generated strategy includes a rationale per field mapping explaining why the AI chose that strategy and weight. 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/generateResponse
Response fields
Response
{
"id": "f6a7b8c9-d0e1-2345-fab2-456789012345",
"name": null,
"matching_config_id": null,
"strategy": {
"field_mappings": [
{ "source": "vendor_name", "target": "name", "strategy": "fuzzy", "weight": 0.4, "rationale": "High cardinality text — fuzzy handles name variations." },
{ "source": "invoice_date", "target": "date", "strategy": "date_range", "weight": 0.3, "rationale": "Date field — range comparison tolerates minor discrepancies." },
{ "source": "total_amount", "target": "total", "strategy": "numeric_range", "weight": 0.3, "rationale": "Numeric field — range accounts for rounding differences." }
],
"threshold": 0.85
},
"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