File size: 2,603 Bytes
1cd137c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
contract:
  name: phase3_classification_taxonomy_grouping
  version: 1.0.0
  description: Classify products, assign Reference DB taxonomy, and group products by identity

input:
  dataset: standardized_products
  required_columns:
    - external_id
    - source_retailer
    - product_name
    - identity_attributes
    - variant_attributes

output:
  datasets:
    classification:
      name: product_classification

    taxonomy:
      name: product_taxonomy

    grouping:
      name: product_groups

  grain:
    classification: one record per retailer product
    taxonomy: one record per retailer product
    grouping: one record per retailer product

processing:
  does:
    - classify_food_and_non_food_products
    - assign_reference_db_taxonomy
    - generate_group_candidates
    - group_products_by_core_identity
    - calculate_grouping_confidence
    - identify_ambiguous_grouping_cases
    - preserve_source_identifiers

  does_not:
    - create_variants
    - merge_source_records
    - overwrite_source_values
    - calculate_product_scores
    - invent_missing_values

classification:
  values:
    - food
    - non_food
    - unknown

taxonomy:
  categories:
    - DAIRY
    - MEAT_SEAFOOD
    - BEVERAGES
    - BAKERY
    - FROZEN
    - PRODUCE
    - CONDIMENTS_SAUCES
    - CONFECTIONERY
    - SNACKS
    - PASTA_RICE
    - BREAKFAST
    - CANNED_GOODS
    - GENERAL_GROCERY
    - HOUSEHOLD_CLEANING
    - HEALTH_REMEDIES
    - PERSONAL_CARE
    - BABY_CARE
    - PET_FOOD
    - HOUSEHOLD_SUPPLIES

grouping:
  principles:
    - group_by_core_product_identity
    - preserve_meaningful_identity_attributes
    - do_not_group_by_size_alone
    - do_not_use_fuzzy_similarity_as_final_decision
    - use_fuzzy_matching_for_candidate_generation
    - preserve_ambiguous_cases_for_review

  identifiers:
    group_id:
      deterministic: true
      rules_versioned: true

quality:
  critical:
    - missing_product_identity
    - invalid_taxonomy_category

  warnings:
    - missing_optional_classification_evidence
    - missing_optional_taxonomy_evidence

  ambiguous:
    - ambiguous_classification
    - ambiguous_taxonomy
    - ambiguous_grouping

failure_handling:
  statuses:
    PASS: continue
    WARNING: continue_and_report
    AMBIGUOUS: quarantine_for_review
    FAIL: stop

ambiguity:
  signals:
    - missing_evidence
    - conflicting_evidence
    - competing_candidates
    - close_candidate_scores
    - semantic_conflict

  resume_from: phase_3

versioning:
  schema_version: 1.0.0
  rules_version: 1.0.0

lineage:
  source: phase2_identity
  pipeline_version: 1.0.0