File size: 6,285 Bytes
87106bc | 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 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 | # CrossER v2 Data Schema
## entities.json
```json
{
"entity_id": "tc2_prod_0001",
"source_system": "SAP_TC2",
"entity_type": "product",
"name": "Maltodextrin DE20 Grade A",
"attributes": {
"category": "starches",
"sub_category": "maltodextrin",
"cn_code": "CN 1702.90",
"dextrose_equivalent": 20,
"grade": "A",
"region": "NA",
"cost_center": "CC-412",
"status": "active"
}
}
```
### Source Systems
| System | ID Prefix | Naming Style | Completeness |
|--------|-----------|-------------|-------------|
| SAP_TC2 | `tc2_` | Formal English | 95% |
| SAP_CFIN | `cfin_` | Internal codes | 90% |
| SAP_APAC | `apac_` | Abbreviated | 60% |
| LEGACY_ERP | `leg_` | Cryptic codes | 45% |
| SHAREPOINT | `sp_` | Authoritative | 85% |
### Entity Types
- `product` — Physical products (starches, sugars, acids, proteins, oils)
- `supplier` — Vendor/supplier companies
- `tax_code` — Tax classification codes (CN/HS codes)
- `legal_entity` — Legal entities / subsidiaries
## pairs.json
```json
{
"pair_id": "pair_0001",
"entity_a": "tc2_prod_0001",
"entity_b": "cfin_prod_0001",
"label": "match",
"string_similarity": 0.234,
"attribute_overlap": 0.500,
"difficulty_tier": "hard",
"entity_type": "product",
"system_pair": ["SAP_CFIN", "SAP_TC2"]
}
```
### Labels
- `match` — Same real-world entity
- `no_match` — Different entities
- `ambiguous` — Requires human judgment
### Difficulty Tiers
- `easy` — String sim >= 0.70
- `medium` — String sim 0.30-0.70
- `hard` — String sim < 0.30
- `adversarial_negative` — High similarity but NOT a match
- `medium_negative` / `obvious_negative` — No-match tiers
## Splits & Subsets
- `splits/{train,val,test}.json` — 40/20/40 stratified split
- `subsets/crosser_easy.json` — Easy-tier test pairs
- `subsets/crosser_hard.json` — Hard + adversarial test pairs
## Oracle Context
- `context/structured/oracle_context.json` — Complete pairwise migration records
- `context/structured/alias_table.json` — Canonical entity alias groups
## Demo Subset
- `demo/*.csv` — Per-system entity CSVs
- `demo/ground_truth.csv` — Labeled pairs
- `demo/rules.yaml` — Business rules
- `demo/knowledge.yaml` — Domain knowledge artifacts
---
# Extended Pipelines (--pipeline full)
## Email Chains (`email_chains/`)
```json
// chains.json — array of email threads
{
"chain_id": "email_chain_0001",
"domain": "commodity_trading",
"messages": [
{
"message_id": "email_chain_0001_msg_001",
"sender": "s.chen@globalfoods.com",
"sender_name": "Sarah Chen",
"sender_role": "Operations Manager, North America",
"recipients": ["j.morrison@globalfoods.com"],
"subject": "RE: Is Maltodextrin DE20 Grade A in SAP_TC2 the same as record in SAP_CFIN?",
"body": "...",
"timestamp": "2025-07-15T09:00:00"
}
]
}
```
### Email Prediction Format
```json
[
{
"chain_id": "email_chain_0001",
"extracted_knowledge": [{"type": "entity_mapping", "description": "..."}],
"extracted_relationships": [{"type": "discussed_in_context", "entities_involved": 2}],
"extracted_corrections": [{"type": "expert_correction", "source_message_ids": ["..."]}]
}
]
```
## Support Tickets (`tickets/`)
```json
// tickets.json
{
"ticket_id": "TKT-0001",
"domain": "commodity_trading",
"title": "Product ID mismatch between SAP_TC2 and SAP_CFIN",
"priority": "high",
"resolution": {
"resolution_type": "entity_mapping",
"verdict": "confirmed_match",
"confidence": 0.95,
"reasoning": "..."
},
"referenced_precedents": ["TKT-0003"]
}
```
### Ticket Prediction Format
```json
[
{
"ticket_id": "TKT-0001",
"predicted_resolution": "confirmed_match",
"referenced_precedent_ids": ["TKT-0003"],
"extracted_knowledge": [{"type": "entity_mapping", "description": "..."}]
}
]
```
## ERP Events (`erp_events/`)
```json
// events.json
{
"event_id": "EVT-000001",
"timestamp": "2025-01-15T10:30:00",
"source_system": "SAP_TC2",
"event_type": "purchase_order_created",
"entity_refs": [
{"entity_type": "product", "id": "TC2-1234", "name": "Maltodextrin DE20 Grade A"},
{"entity_type": "supplier", "id": "SUP-12345", "name": "Cargill Inc."}
],
"attributes": {"amount": 50000.00, "currency": "USD"},
"related_events": ["EVT-000002"]
}
```
### ERP Prediction Format
```json
[
{
"event_id": "EVT-000001",
"linked_entity_ids": ["EVT-000002"],
"normalized_event_type": "purchase_order_created"
}
]
```
## Cases (`cases/`)
```json
// cases.json
{
"case_id": "CASE-0001",
"case_type": "entity_disambiguation",
"domain": "commodity_trading",
"linked_entities": [...],
"resolution": {"verdict": "approved", "confidence": 0.9, "evidence": [...]},
"cited_precedents": ["CASE-0003"]
}
```
### Case Prediction Format
```json
[
{
"case_id": "CASE-0001",
"predicted_precedent_ids": ["CASE-0003", "CASE-0007"],
"predicted_resolution": "approved",
"context_entities": ["entity_a", "entity_b"]
}
]
```
## Corrections (`corrections/`)
```json
// sequences.json
{
"sequence_id": "CORR-0001",
"pattern_id": "entity_mapping_fix",
"domain": "commodity_trading",
"steps": [
{"step_index": 0, "step_type": "system_proposes_mapping", ...},
{"step_index": 1, "step_type": "expert_reviews", ...},
{"step_index": 2, "step_type": "expert_rejects", ...},
{"step_index": 3, "step_type": "expert_provides_correct_mapping", ...}
]
}
```
### Correction Prediction Format
```json
[
{
"sequence_id": "CORR-0001",
"generated_rules": [{"type": "override_mapping", "condition": "...", "action": "..."}],
"updated_mappings": [{"entity_a": "...", "entity_b": "...", "is_match": true}]
}
]
```
## Knowledge Documents (`knowledge_docs/`)
```json
// manifest.json
{
"doc_id": "KDOC-0001",
"filename": "KDOC-0001_concept_commodity_trading.md",
"title": "Concept: Dextrose Equivalent and Its Impact on Classification",
"doc_type": "concept",
"domain": "commodity_trading"
}
```
### Knowledge Prediction Format
```json
[
{
"doc_id": "KDOC-0001",
"extracted_artifacts": [
{"type": "concept", "content": "...", "entities": [...], "confidence": 0.95}
]
}
]
```
|