-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathymgo_graph_spec.yaml
More file actions
102 lines (95 loc) · 3.48 KB
/
Copy pathymgo_graph_spec.yaml
File metadata and controls
102 lines (95 loc) · 3.48 KB
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
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# YMGO (Yahoo Media Graph Ontology) V3 — Context Graph Specification
#
# This YAML defines the ontology for a configuration-driven context graph.
# Use {{ env }} placeholders for environment-specific table bindings,
# resolved at load time via load_graph_spec(path, env="project.dataset").
graph:
name: YMGO_Context_Graph_V3
# ==========================================
# 1. ENTITIES (Nodes)
# ==========================================
entities:
- name: mako_DecisionPoint
description: "The atomic unit of decisioning where an agent evaluates alternatives."
binding:
source: "{{ env }}.decision_points"
keys:
primary: [decision_id]
properties:
- name: decision_id
type: string
- name: decision_type
type: string
- name: sup_YahooAdUnit
extends: mako_Candidate
description: "A specific ad slot on a Yahoo property being evaluated as a candidate."
binding:
source: "{{ env }}.yahoo_ad_units"
keys:
primary: [adUnitId]
properties:
- name: adUnitId
type: string
- name: adUnitName
type: string
- name: adUnitSize
type: string
description: "e.g., '300x250', '728x90'"
- name: adUnitPosition
type: string
description: "ATF (above the fold) | BTF (below the fold)"
- name: mako_RejectionReason
description: "Structured reason why a Candidate was not selected at a DecisionPoint."
binding:
source: "{{ env }}.rejection_reasons"
keys:
primary: [rejection_id]
properties:
- name: rejection_id
type: string
- name: rejectionType
type: string
description: "RULE_BASED | MODEL_BASED | TIMEOUT | ERROR"
- name: rejectionRule
type: string
description: "The specific rule or model threshold that caused rejection."
# ==========================================
# 2. RELATIONSHIPS (Edges)
# ==========================================
relationships:
- name: CandidateEdge
description: "Connects a decision point to the evaluated Yahoo Ad Unit."
from_entity: mako_DecisionPoint
to_entity: sup_YahooAdUnit
binding:
source: "{{ env }}.candidate_edges"
from_columns: [decision_id]
to_columns: [adUnitId]
properties:
- name: edge_type
type: string
description: "SELECTED_CANDIDATE or DROPPED_CANDIDATE"
- name: mako_scoreValue
type: double
description: "The confidence or predicted Q-value for this candidate."
- name: ForCandidate
description: "Maps the MAKO rejection rationale directly to the dropped candidate."
from_entity: mako_RejectionReason
to_entity: sup_YahooAdUnit
binding:
source: "{{ env }}.rejection_mappings"
from_columns: [rejection_id]
to_columns: [adUnitId]