Agentic GraphRAG for customer audience intelligence — a Real-Time CDP companion reference implementation.
Discover multi-hop relationships across audiences, pseudonymous profiles, behavioral events, products, campaigns and channels. Quantify consent-eligible overlap, produce evidence-grounded affinity and cross-sell hypotheses, and prevent activation by design. Independent portfolio project; not an Adobe product or endorsed integration.
flowchart TD
A[Dashboard / FastAPI] --> B[Authentication and purpose scope]
B --> C[Versioned tenant graph snapshot]
C --> D[Temporal edges and current consent intersection]
D --> S[LangGraph supervisor]
S --> P[Affinity subgraph]
S --> O[Overlap subgraph]
S --> X[Cross-sell hypothesis subgraph]
P --> E[Evidence replay evaluator]
O --> E
X --> E
E -->|One bounded retry| S
E -->|Pass| G[Aggregate suppression and synthesis]
E -->|Repeated failure| F[Fail closed]
G --> L[Optional LLM evidence selection]
L --> H[Revision check and audit digest]
H --> I[Aggregate graph dashboard]
J[Adobe segment definitions API] -. Read-only metadata .-> A
The graph uses typed, temporal adjacency lists over a pinned SQLite snapshot; no Neo4j service is needed. Native LangGraph compiles three specialist subgraphs with narrow outputs and a list-of-predecessors join. The local engine executes the same specialists serially. There is no unconstrained LLM planner. Lexical resolution identifies an audience when no explicit ID is supplied; ambiguous questions require an explicit selection. The workflow is a bounded fixed-plan system, with optional LLM evidence selection rather than an unrestricted conversational agent.
Python 3.11+ recommended. Run from this directory:
python -m venv .venv
source .venv/bin/activate
pip install -r requirements-local.txt
cp .env.example .env
python -m audiencegraph.keysCopy the printed AUDIENCE_KEYS=... line into .env (replace the placeholder). Keep the printed plaintext admin and analyst keys private. Load the configuration and run:
set -a; source .env; set +a
uvicorn audiencegraph.api:create_app --factory --host 127.0.0.1 --port 8000Open http://127.0.0.1:8000. Enter the generated admin key and click Load synthetic demo (admin). This replaces the selected tenant's graph. Select Loyal customers and High purchase intent, choose analytics, and run. Connect using the analyst key for read-only queries. Disable ENABLE_DEMO outside the demonstration environment. Never use real data before completing the deployment controls in docs/OPERATIONS.md.
After configuring .env above:
docker compose up --buildOr install requirements.txt and set WORKFLOW_ENGINE=langgraph before launching Uvicorn. Native mode requires installed LangGraph. Docker is a single-host loopback deployment, not HA production infrastructure.
flowchart LR
A[Loyal audience] --- P[Eligible pseudonymous profiles]
P --> E[Camera view events]
P --> F[Lens view events]
E --> C[Cameras]
F --> L[Lenses]
C -->|Related product| L
L -->|Related product| B[Camera bags]
P --- H[High purchase intent audience]
This is an aggregate schematic, not individual profile data. The synthetic snapshot has 30 profiles and three audiences. The sample analysis at 2026-01-01 compares Loyal with High purchase intent for the analytics purpose:
| Metric | Recorded result |
|---|---|
| Loyal eligible profiles | 17 |
| Camera-view affinity | 17 / 17 |
| Lens-view affinity | 9 / 17 |
| Shared eligible profiles | 10 |
| Union | 25 |
| Jaccard overlap | 40% |
| Camera-to-lens opportunity | 8 |
| Lens-to-bag opportunity | 9 |
The graphics visualize the recorded synthetic example; they are not live dashboard screenshots. The overlap diagram is schematic.
These counts are derived from synthetic data and represent observed relationships, not conversion forecasts. Campaign evidence with a small complement is suppressed.
python -m examples.runSee examples/sample_result.json for actual recorded output.
export URL=http://127.0.0.1:8000
export ADMIN='your-generated-admin-key'
export ANALYST='your-generated-analyst-key'
curl -s -X POST "$URL/v1/demo" -H "X-API-Key: $ADMIN"
curl -s "$URL/v1/audiences" -H "X-API-Key: $ANALYST"
curl -s -X POST "$URL/v1/intelligence" -H "X-API-Key: $ANALYST" \
-H 'Content-Type: application/json' \
-d '{"question":"Which products are associated with loyal customers?","audience":"loyal","compare_to":"intent","purpose":"analytics"}'| Method | Endpoint | Role |
|---|---|---|
| GET | /health |
public |
| POST | /v1/demo |
admin, demo enabled |
| POST | /v1/graph |
admin, replace snapshot |
| GET | /v1/audiences |
authenticated |
| POST | /v1/intelligence |
authenticated and authorized purpose |
| GET | /v1/adobe/definitions |
admin, designated Adobe tenant |
OpenAPI schema: /openapi.json. Ingestion accepts the typed Snapshot contract (nodes, edges, consents). Relationships are validated against endpoint types. Temporal edges use half-open validity intervals. Consent uses most recent status at requested time AND present time from the latest supplied snapshot. Missing consent denies eligibility. This is a local consent model, not a substitute for Adobe policy enforcement or legal review.
The read-only adapter calls the documented Adobe Experience Platform Segmentation Service endpoint GET https://platform.adobe.io/data/core/ups/segment/definitions?limit=50 with an access token, API key, IMS organization and sandbox headers. Configure AEP_TENANT, AEP_ACCESS_TOKEN, AEP_CLIENT_ID, AEP_ORG_ID, and AEP_SANDBOX. The endpoint returns only the first page of segment IDs/names; it does not fetch profiles, segment memberships, or import them into the graph automatically. Actual profile/event/consent normalization must be implemented and reviewed for your AEP XDM schemas. No PQL execution, segment creation, destination activation, or production Adobe data is included.
Official reference: https://experienceleague.adobe.com/en/docs/experience-platform/segmentation/api/segment-definitions
The deterministic retrieval engine traverses audience → profile → event → product; audience → profile → campaign → channel; and audience → profile → event → product → related product. It deduplicates profiles and returns aggregate evidence records with relationship path schemas and result-local IDs. It does not expose raw customer paths or source records. Overlap is set-based, and small cells/complements are suppressed. The model optionally ranks up to three already-verified evidence IDs using an OpenAI-compatible endpoint. Configure LLM_API_KEY, LLM_MODEL and optional trusted LLM_BASE_URL only after a data-handling review. The model cannot change counts or add facts; malformed results fall back safely. The query text and aggregate evidence are transmitted to the provider when enabled. Do not enter personal or confidential data. Without a model key, synthesis is deterministic.
| File | Responsibility |
|---|---|
models.py |
Typed entities, edges, consent and time validation |
graph.py |
Temporal adjacency index, lexical resolution, multi-hop retrieval and overlap |
workflow.py |
Supervisor, three parallel specialist subgraphs, replay evaluation, synthesis |
llm.py |
Optional validated evidence ranking |
store.py |
Tenant isolation, snapshot revision and audit digest |
adobe.py |
Read-only Adobe segment metadata |
api.py |
REST API, role/purpose scope and security headers |
keys.py |
Generate demo keys and hashed config |
demo.py |
Synthetic customer intelligence graph |
web/ |
Responsive interactive dashboard |
tests/ |
Regression tests and optional LangGraph parity |
python -m pytest -q
python -m compileall -q audiencegraph
node --check web/app.jsConsent-aware aggregate GraphRAG; existing snapshot and affinity/overlap workflow. The following ten diagrams are independent design proposals, not claims of implemented Google connectors or measured performance. Conceptual data inputs: Google Ads segment metadata, GA4 aggregate events, BigQuery consented cohorts.
The current typed snapshot, temporal adjacency index and deterministic analytics are the reusable core. Add a separate Google read-only adapter, a versioned aggregate feature contract and an account-to-tenant mapping; do not replace the existing Adobe adapter or imply access to Google user lists.
Google integration references: Google Ads reporting · GA4 Data API. These are proposed adapter contracts; live data access and field compatibility must be validated separately.
What this graphic shows: Audience resolution is lexical and ambiguous inputs require explicit selection. Proposed Google metadata joins use aggregate cohort keys, not user identifiers.
Reading the diagram: Read query → resolve audience → pin revision → traverse affinity → suppress small cohorts → cite evidence. The flow represents proposed processing or decision dependencies, not external API execution.
Step-by-step workflow: Resolve a question and audience against allowed identifiers; reject ambiguous names. Pin the snapshot, traverse audience→eligible cohort→event→product, deduplicate, then select aggregate evidence and suppress small cells.
How to adapt the current repository: Reuse graph.py and models.py for traversal and validation. A new Google metadata importer must translate audience IDs to explicit, authorized cohort mappings before store.py commits a revision.
Outputs, failure handling and validation: Return counts, paths and revision IDs; test ambiguous audience labels, stale revisions and denied-purpose requests.
What this graphic shows: Audience-to-cohort membership, product affinity and campaign targeting are time-bounded. Consent must be valid at event time and review time; edges do not imply Google supplies member-level data.
Reading the diagram: Audience · Cohort · Product · Campaign · Channel · Consent record. Links are conceptual associations; use the accompanying text for direction and semantics.
Step-by-step workflow: Represent audiences, campaigns, product categories and consent records as distinct types. Membership and event edges carry validity periods; targeting edges only describe intended campaign configuration.
How to adapt the current repository: Extend the existing typed graph model with account-scoped Google resource names and provenance; keep actual cohort membership in an approved first-party aggregate contract.
Outputs, failure handling and validation: Reject orphan edges, overlapping incompatible intervals and cross-tenant references; verify no raw member path leaks.
What this graphic shows: Specialists emit narrow typed outputs. Evaluation waits for all branches; replay checks counts and suppresses small or complementary cohorts.
Reading the diagram: Snapshot → affinity analyst / parallel alternative: overlap analyst / parallel alternative: cross-sell analyst → evidence replay → synthesize. The flow represents proposed processing or decision dependencies, not external API execution.
Step-by-step workflow: Supervisor pins the graph and dispatches affinity, overlap and cross-sell subgraphs. Each produces its own typed result; the join waits for all three. Replay checks numeric evidence before synthesis.
How to adapt the current repository: Reuse workflow.py's existing list-of-predecessors join and optional llm.py evidence ranking. Introduce Google-specific metric context in the state without changing deterministic counts.
Outputs, failure handling and validation: Exercise out-of-order completion, failed branch and one retry; answer only when all required evidence passes.
What this graphic shows: Historical permission alone does not authorize present analysis. Denied or unknown consent excludes the relevant cohort from the proposed aggregate workflow.
Reading the diagram: Event-time eligibility → current eligibility → intersect → minimum cohort → report. The flow represents proposed processing or decision dependencies, not external API execution.
Step-by-step workflow: At requested time resolve historical consent, then re-evaluate current consent and purpose. Intersect eligible sets, apply thresholds to counts and complements, and emit only permitted aggregates.
How to adapt the current repository: Retain existing graph.py temporal consent logic; a new ingestion adapter must populate authoritative consent from permitted first-party records, not assume Ads metadata grants consent.
Outputs, failure handling and validation: Test revoked, expired, missing and conflicting consent; verify small-group suppression before the LLM receives any data.
What this graphic shows: Compute overlap on permitted aggregate membership inputs. Shared segment definitions alone are not evidence of shared membership; small cells are suppressed.
Reading the diagram: Eligible audience A · Eligible audience B · Shared eligible cohort · Suppressed cell · Distinct reach. Links are conceptual associations; use the accompanying text for direction and semantics.
Step-by-step workflow: For eligible A and B calculate |A∩B| and |A∪B|; Jaccard equals intersection divided by union. Check distinct reach and suppress small cells or complements.
How to adapt the current repository: Reuse existing set-based overlap implementation for approved synthetic or consented membership inputs; Google audience report totals alone cannot recover intersection.
Outputs, failure handling and validation: Verify disjoint, identical and empty sets; guard zero denominator and compare results to known fixtures.
What this graphic shows: A deterministic evaluator recomputes the cited evidence and numeric overlap. Optional language model wording cannot override failed evidence checks.
Reading the diagram: Evidence IDs → pinned revision → count replay → compare → retry once → abstain. The flow represents proposed processing or decision dependencies, not external API execution.
Step-by-step workflow: Take result-local evidence IDs and revision, re-run the bounded traversal/count, compare reported values, and retry once if inconsistent. Fail closed after repeated failure.
How to adapt the current repository: Reuse the deterministic evaluator and optional LLM evidence selector. Add source row checksums and import timestamps so Google-derived evidence can be independently replayed.
Outputs, failure handling and validation: Corrupt count, remove a citation or change revision; evaluator must reject rather than let a model repair numbers by invention.
What this graphic shows: A synthetic retail example illustrates an audience-to-product path. It yields a hypothesis for human review, not a targeting action or estimated lift.
Reading the diagram: High-intent cohort → product affinity → candidate campaign → consent filter → review. The flow represents proposed processing or decision dependencies, not external API execution.
Step-by-step workflow: For a synthetic high-intent cohort, trace product views and related categories, check affinity and overlap, apply consent/suppression, and create an analyst-facing campaign hypothesis.
How to adapt the current repository: Reuse the existing affinity and cross-sell specialists. Add a Google campaign metadata association and export a recommendation with evidence, not an activation request.
Outputs, failure handling and validation: Validate that the suggested category is supported by a graph path; mark any inferred lift as unknown.
What this graphic shows: The conceptual adapter separates campaign metadata from authorized aggregate outcomes. Verify reporting granularity and permitted use before building any live integration.
Reading the diagram: Ads audience resource → approved metadata mapping → aggregate graph → GA4 outcomes → BigQuery evidence. The flow represents proposed processing or decision dependencies, not external API execution.
Step-by-step workflow: Fetch allowed Google Ads resource metadata with validated GAQL, GA4 aggregate reports and authorized BigQuery cohort summaries. Normalize account IDs, dates and metric grain, then stage and validate a snapshot.
How to adapt the current repository: Add a separate adapter alongside adobe.py; use store.py's atomic revision import. Map Ads identifiers and GA4 dimensions explicitly rather than equate platform audiences.
Outputs, failure handling and validation: Reconcile totals with source reports; test pagination, quotas, partial imports, duplicate records and incompatible grains.
What this graphic shows: Reject unauthorized access and prevent membership inference through suppression and purpose restrictions. Audit only aggregate results and necessary provenance.
Reading the diagram: Unscoped request · Small cohort · Stale consent · Cross-tenant edge · Evidence leakage. Links are conceptual associations; use the accompanying text for direction and semantics.
Step-by-step workflow: Identify leakage through cross-account edges, repeated small-cohort queries, stale consent and evidence payloads. Deny unauthorized access and audit aggregate decisions.
How to adapt the current repository: Extend API purpose checks and store tenant scoping with rate limits, query-budget controls and aggregate-only exports; avoid storing identifiers in traces.
Outputs, failure handling and validation: Test differencing attacks, cross-tenant IDs and stale permission; ensure denial responses do not reveal membership.
What this graphic shows: Measure retrieval path accuracy, aggregate count reproducibility and policy refusal behavior on synthetic fixtures. No performance benchmark is claimed.
Reading the diagram: Labeled affinity paths → exact overlap fixtures → suppression tests → consent changes → regression gate. The flow represents proposed processing or decision dependencies, not external API execution.
Step-by-step workflow: Construct small synthetic graphs with known affinity paths, counts and revocation events; run native and local modes, compare results and replay audit digests.
How to adapt the current repository: Extend existing tests with mocked Google report fixtures and adapter contract tests. Evaluate retrieval separately from numeric counting and narrative grounding.
Outputs, failure handling and validation: Measure path recall, exact count match, policy refusal and citation validity; set release thresholds before live trials.
Consent-aware Meta audience intelligence. Reuse models.py, graph.py, workflow.py and store.py for temporal graph traversal and deterministic aggregate analytics. Add a read-only Marketing API importer and authorized first-party cohort mapping; Meta audience definitions are not member lists.
All diagrams are independent proposed adaptations, not live Meta integrations, internal Meta architecture, official affiliation or measured outcomes. Verify API version, app review, permissions and platform terms before implementation.
Concept and step-by-step workflow: Resolve an ad set and its audience definition; link permitted metadata to a separately authorized cohort mapping and conversion goal. Traverse the pinned graph for context.
Diagram reading guide: Ad account → Campaign; Campaign → Ad set; Ad set → Audience definition; Audience definition → Approved cohort; Campaign → Conversion goal. Arrows denote proposed dependencies or processing order, not proof of causal effects.
How to adapt the current repository: Extend typed graph contracts with Meta resource IDs and definition versions; use graph.py to traverse only approved edges.
Expected outputs, failure handling and validation: Reject cross-account links and unknown cohort mapping; definition alone is not membership.
Concept and step-by-step workflow: Intersect eligible membership sets at event and current time, compute intersection/union and suppress small cells and complements before returning aggregates.
Diagram reading guide: Two approved cohorts → Event-time consent; Two approved cohorts → Current consent; Event-time consent → Intersect and suppress; Current consent → Intersect and suppress. Arrows denote proposed dependencies or processing order, not proof of causal effects.
How to adapt the current repository: Reuse temporal consent and exact overlap logic; ingest consent from first-party approved records, not Meta targeting settings.
Expected outputs, failure handling and validation: Test revocation, zero union and missing permission; never derive intersection from reported reach.
Concept and step-by-step workflow: Run three existing specialists independently on the same graph revision; wait for all required typed results, recompute evidence, then synthesize.
Diagram reading guide: Pinned snapshot → Product affinity; Pinned snapshot → Audience overlap; Pinned snapshot → Cross-sell hypothesis; Product affinity → Evidence replay; Audience overlap → Evidence replay; Cross-sell hypothesis → Evidence replay. Arrows denote proposed dependencies or processing order, not proof of causal effects.
How to adapt the current repository: Reuse workflow.py list-edge join and optional llm.py evidence ranking; add placement and ad-set context to evidence schema.
Expected outputs, failure handling and validation: Slow or failed branch cannot produce complete answer; retry once or abstain.
Concept and step-by-step workflow: Read permitted campaign/ad-set aggregate reports, normalize account currency, attribution setting, dates and placement breakdowns. Stage and validate before committing.
Diagram reading guide: Authorized ad account → Compatible insights fields → Normalize breakdowns → Validate snapshot → Atomic graph revision. Arrows denote proposed dependencies or processing order, not proof of causal effects.
How to adapt the current repository: Add proposed Marketing API adapter alongside adobe.py; retain store.py revision checks and explicit cohort mappings.
Expected outputs, failure handling and validation: Reject incompatible breakdowns, partial page and mixed currency; no access to member-level profiles.
Concept and step-by-step workflow: Trace product affinity and permitted placement aggregates separately; compare reporting grain and review whether evidence supports a contextual hypothesis.
Diagram reading guide: Audience hypothesis → Facebook Feed; Audience hypothesis → Instagram Reels; Audience hypothesis → Product category; Facebook Feed → Aggregate report; Instagram Reels → Aggregate report; Audience hypothesis → Consent evidence. Arrows denote proposed dependencies or processing order, not proof of causal effects.
How to adapt the current repository: Reuse affinity specialist, add placement metadata and source IDs; keep targeting activation disabled.
Expected outputs, failure handling and validation: No inferred individual identity or guaranteed lift; unsupported placement association is marked unknown.
Concept and step-by-step workflow: Enforce purpose at query ingress, suppress small and complementary counts, limit repeated query patterns, and return only aggregate citations.
Diagram reading guide: Independent evaluation dimensions: Small cells; Differencing queries; Stale consent; Cross-account edges; Sensitive inference; Evidence leakage. No measured values are implied.
How to adapt the current repository: Reuse API/store isolation and graph consent checks; add aggregate privacy query budget and retention policy.
Expected outputs, failure handling and validation: Test small-cell reconstruction attempts and unauthorized scope; fail closed.
Concept and step-by-step workflow: Use fictional approved cohort and product events, locate related products, compute affinity counts, then produce a reviewable Facebook/Instagram campaign concept.
Diagram reading guide: Outdoor product brief → Resolve cohort → Traverse product events → Validate aggregate evidence → Analyst hypothesis. Arrows denote proposed dependencies or processing order, not proof of causal effects.
How to adapt the current repository: Reuse demo.py synthetic graph and cross-sell specialist; add fictional ad-set metadata, never live targeting.
Expected outputs, failure handling and validation: Return exact counts and source revision; no causal or conversion forecast claim.
Concept and step-by-step workflow: Build synthetic fixtures for eligible membership and Meta report metadata; separate graph recall from arithmetic and privacy checks.
Diagram reading guide: Independent evaluation dimensions: Typed edge integrity; Exact overlap; Temporal consent; Citation replay; Suppression; Adapter completeness. No measured values are implied.
How to adapt the current repository: Extend existing tests with mocked Marketing API pages and role/scope cases; compare native and local workflow.
Expected outputs, failure handling and validation: Gate on exact count match and fail-closed privacy; no measured Meta benchmark.
Official references: Meta Marketing API · Insights API · Graph API.
Dynamics 365 Customer Insights and Microsoft Advertising audience evidence. Reuse temporal typed graph, exact affinity/overlap analytics, consent checks, LangGraph workflow and snapshot store. Add authorized Customer Insights segment metadata and Advertising aggregate reporting separately; no member-level ad platform export.
Independent proposed adaptations; no claim of live Microsoft integration, internal architecture, certification or measured results.
Concept and step-by-step workflow: Resolve segment definition and approved cohort mapping, pin version and traverse product/event edges to produce aggregate affinity. The segment reference does not expose membership by itself.
Diagram reading guide: Dataverse segment → Approved cohort mapping; Approved cohort mapping → Product event; Product event → Product category; Product category → Affinity evidence. Arrows describe proposed processing/dependencies, with branching semantics explained above.
How to adapt the current repository: Extend models.py and graph.py with source-qualified Dataverse segment and event IDs. Use store.py atomic snapshot import and independent first-party consent mapping.
Expected outputs, failure handling and validation: Reject cross-business-unit references and unknown cohort mapping; verify aggregate counts against known fixtures.
Concept and step-by-step workflow: Read permitted campaign and audience association metadata, normalize account/time/currency and compatible aggregate metrics, map explicitly to segment definitions, then validate and commit.
Diagram reading guide: Ad account → Campaign and ad group; Campaign and ad group → Audience association; Audience association → Reporting snapshot; Reporting snapshot → Graph revision. Arrows describe proposed processing/dependencies, with branching semantics explained above.
How to adapt the current repository: Add a separate read-only Microsoft Advertising Campaign Management/Reporting adapter beside adobe.py; preserve attribution and metric definitions.
Expected outputs, failure handling and validation: Missing association is unknown; no inference of member identity or overlap from report totals.
Concept and step-by-step workflow: Intersect historical and current permissions, derive eligible set and apply minimum cohort/complement suppression before any model sees counts.
Diagram reading guide: Approved cohort → Historical purpose check; Approved cohort → Current permission check; Historical purpose check → Eligible intersection; Current permission check → Eligible intersection; Eligible intersection → Suppressed aggregate. Arrows describe proposed processing/dependencies, with branching semantics explained above.
How to adapt the current repository: Reuse existing graph.py temporal consent and set-based privacy checks; ingest authoritative first-party consent from approved Customer Insights/Dataverse sources only.
Expected outputs, failure handling and validation: Test revocation, small cohort and differencing risk; deny on absent permission.
Concept and step-by-step workflow: Dispatch specialists against identical revision, wait for all required outputs, replay exact counts and validate evidence before explanation.
Diagram reading guide: Pinned audience snapshot → Affinity specialist; Pinned audience snapshot → Overlap specialist; Pinned audience snapshot → Cross-sell specialist; Affinity specialist → Deterministic evaluator; Overlap specialist → Deterministic evaluator; Cross-sell specialist → Deterministic evaluator. Arrows describe proposed processing/dependencies, with branching semantics explained above.
How to adapt the current repository: Reuse workflow.py fan-in and optional LLM evidence ranking; add explicit Microsoft segment and advertising resource references to evidence.
Expected outputs, failure handling and validation: Slow branch and altered count trigger bounded retry/abstention; no invented statistics.
Concept and step-by-step workflow: Compare approved aggregate affinity evidence with relevant campaign metadata, check overlap and privacy, then propose a contextual campaign hypothesis for analyst review.
Diagram reading guide: Product affinity finding → Consent and overlap review; Ad group context → Consent and overlap review; Consent and overlap review → Cited hypothesis; Cited hypothesis → Analyst handoff. Arrows describe proposed processing/dependencies, with branching semantics explained above.
How to adapt the current repository: Reuse cross-sell specialist and deterministic counts; attach Microsoft Advertising ad-group references without audience activation or upload.
Expected outputs, failure handling and validation: No observed uplift or inferred individual traits; require explicit source evidence for each hypothesis.
Concept and step-by-step workflow: Build known cohort fixtures and mocked Microsoft reports; evaluate path recall, arithmetic, privacy and import integrity independently.
Diagram reading guide: Synthetic segment graph → Exact overlap check; Synthetic segment graph → Revocation check; Synthetic segment graph → Source mapping check; Exact overlap check → Evaluation report; Revocation check → Evaluation report; Source mapping check → Evaluation report. Arrows describe proposed processing/dependencies, with branching semantics explained above.
How to adapt the current repository: Extend current tests with business-unit scope, reporting lag and missing mapping; preserve Adobe, Google and Meta adapters/docs.
Expected outputs, failure handling and validation: No real audience list, activation or measured Microsoft benchmark; release only after verified constraints.
References: Microsoft Advertising report types · Customer Insights · Universal Event Tracking.
Temporal audience graph and exact local overlap; AMC aggregate exports require a separate read-only adapter, not member-level ingestion.
Independent proposed adaptations; no live access, internal Amazon architecture, production certification or measured outcomes. Confirm permissions, API version, data terms and marketplace before implementation.
Concept and step-by-step workflow: Run reviewed query inside AMC; preserve suppression, query digest, marketplace and time grain.
Diagram reading guide: Reviewed query → AMC clean room; AMC clean room → Permitted aggregate; Permitted aggregate → Validate grain; Validate grain → Snapshot. Arrows denote proposed dependencies, not causal proof.
How to adapt the current repository: Add aggregate result adapter before store.py atomic import; do not reuse exact local membership computation for AMC.
Expected outputs, failure handling and validation: Reject suppressed cells, incomplete reports and incompatible account scope.
Concept and step-by-step workflow: Traverse mapped product and cohort summaries; distinguish association from individual purchase history.
Diagram reading guide: Category → Approved cohort summary; Approved cohort summary → ASIN aggregate; Approved cohort summary → Campaign association; ASIN aggregate → Evidence path; Campaign association → Evidence path. Arrows denote proposed dependencies, not causal proof.
How to adapt the current repository: Extend models.py and graph.py with source-qualified ASIN, marketplace and aggregate cohort nodes.
Expected outputs, failure handling and validation: Test missing mappings and duplicate ASINs; never infer membership.
Concept and step-by-step workflow: Compute only permitted overlap inside clean room; retain suppression and prevent differencing.
Diagram reading guide: Cohort definitions → Approved overlap query; Approved overlap query → Thresholded intersection; Thresholded intersection → Complement check; Complement check → Allowed output. Arrows denote proposed dependencies, not causal proof.
How to adapt the current repository: Adapt overlap specialist to aggregate evidence contract; keep local consent rules for authorized local data.
Expected outputs, failure handling and validation: Unknown intersection stays unknown; test zero union and small cells.
Concept and step-by-step workflow: Dispatch specialists on same snapshot and wait for required results; replay arithmetic before synthesis.
Diagram reading guide: Pinned graph → Affinity; Pinned graph → Overlap; Pinned graph → Cross-sell; Affinity → Evaluator; Overlap → Evaluator; Cross-sell → Evaluator. Arrows denote proposed dependencies, not causal proof.
How to adapt the current repository: Reuse workflow.py native fan-in; add source IDs and aggregate-versus-exact count type.
Expected outputs, failure handling and validation: Late branch and stale revision trigger bounded retry or abstention.
Concept and step-by-step workflow: Compare approved aggregate evidence with campaign context by explicit taxonomy mapping.
Diagram reading guide: Category affinity → Compatible context; Sponsored Ads report → Compatible context; Compatible context → Cited hypothesis; Cited hypothesis → Analyst review. Arrows denote proposed dependencies, not causal proof.
How to adapt the current repository: Reuse cross-sell specialist; add read-only Ads reporting and manual proposal, no activation.
Expected outputs, failure handling and validation: No causal attribution or guaranteed uplift.
Concept and step-by-step workflow: Replay fictional outputs and assess arithmetic, path recall and privacy independently.
Diagram reading guide: Synthetic outputs → Suppressed cells; Synthetic outputs → Known paths; Synthetic outputs → Tenant isolation; Suppressed cells → Release gate; Known paths → Release gate; Tenant isolation → Release gate. Arrows denote proposed dependencies, not causal proof.
How to adapt the current repository: Extend tests with mocked AMC outputs and query digests; no live credentials.
Expected outputs, failure handling and validation: Require no unauthorized exports and exact fixture counts.
References: Amazon Ads API · Amazon Marketing Cloud.
Streaming audience affinity and promotional-media evidence. Reuse typed temporal graph, exact local cohort overlap, affinity specialists and consent controls. Netflix's published creative analytics provides inspiration, not access to member data.
Independent proposed adaptations inspired by public engineering writing; no private Netflix access, deployed integration, certification or measured results. Examples use fictional or appropriately licensed data.
Concept and step-by-step architecture: Resolve a synthetic or explicitly authorized cohort, traverse title and genre edges and link approved aggregate asset observations. Distinguish title affinity from causal influence of artwork.
Diagram reading guide: Fictional eligible cohort → Genre relationship; Fictional eligible cohort → Title relationship; Title relationship → Promotional asset; Genre relationship → Aggregate affinity evidence; Promotional asset → Aggregate affinity evidence. Arrows represent proposed processing dependencies; conditions and joins follow the workflow above.
How to adapt the current repository: Extend models.py and graph.py with title, genre, asset and source-qualified aggregate metrics; retain store.py revision checks and local consent semantics.
Expected outputs, failure handling and validation: Test orphan title, expired source and suppressed group; no inference of Netflix viewer identities.
Concept and step-by-step architecture: Intersect authorized local synthetic membership under both time-specific and current permissions; suppress small counts and complementary outputs. If only aggregate evidence exists, do not reconstruct membership.
Diagram reading guide: Two cohort definitions → Historical consent; Two cohort definitions → Current consent; Historical consent → Eligible overlap; Current consent → Eligible overlap; Eligible overlap → Suppressed aggregate. Arrows represent proposed processing dependencies; conditions and joins follow the workflow above.
How to adapt the current repository: Reuse graph.py exact set analytics only on eligible local records; add aggregate evidence contract for external counts and query privacy limits.
Expected outputs, failure handling and validation: Test revocation, zero union and repeated differencing; unknown overlap remains unknown.
Concept and step-by-step architecture: Run independent specialists on one immutable source revision; replay arithmetic and require all evidence before rendering a recommendation hypothesis.
Diagram reading guide: Pinned media graph → Genre affinity; Pinned media graph → Artwork affinity; Pinned media graph → Related title discovery; Genre affinity → Deterministic evidence review; Artwork affinity → Deterministic evidence review; Related title discovery → Deterministic evidence review. Arrows represent proposed processing dependencies; conditions and joins follow the workflow above.
How to adapt the current repository: Reuse workflow.py native fan-out/fan-in and evaluator; extend source metadata with asset and title IDs, event windows and sample coverage.
Expected outputs, failure handling and validation: Failed branch yields incomplete result; no fabricated engagement metric.
Concept and step-by-step architecture: Import permitted aggregate impressions and engagement events, normalize title/asset identifier and reporting window, verify denominators and stage complete revision.
Diagram reading guide: Authorized synthetic report → Title and artwork mapping; Title and artwork mapping → Metric grain validation; Metric grain validation → Privacy threshold; Privacy threshold → Atomic graph revision. Arrows represent proposed processing dependencies; conditions and joins follow the workflow above.
How to adapt the current repository: Add a read-only fictional media report importer alongside existing provider adapters. Preserve impression eligibility and measurement definitions; avoid arbitrary joins.
Expected outputs, failure handling and validation: Reject mixed denominators, partial files and sensitive breakdowns; no private Netflix API assumed.
Concept and step-by-step architecture: Compare contextual title relationships with compatible asset aggregates, propose a creative test and preserve alternate explanations such as availability and position.
Diagram reading guide: Related title evidence → Contextual mapping; Approved artwork aggregate → Contextual mapping; Contextual mapping → Cited research hypothesis; Cited research hypothesis → Analyst review. Arrows represent proposed processing dependencies; conditions and joins follow the workflow above.
How to adapt the current repository: Reuse cross-sell specialist as related-content hypothesis generator with new typed media output; no automated viewer targeting.
Expected outputs, failure handling and validation: No causal uplift from association; require controlled experiment for causal claims.
Concept and step-by-step architecture: Use synthetic title/genre/asset data and labeled local cohorts; independently assess traversal, exact arithmetic, privacy and citation integrity.
Diagram reading guide: Fictional title graph → Known overlap fixture; Fictional title graph → Rights and consent tests; Known overlap fixture → Evidence replay; Rights and consent tests → Evidence replay; Evidence replay → Release report. Arrows represent proposed processing dependencies; conditions and joins follow the workflow above.
How to adapt the current repository: Extend tests and demo.py with fictional entertainment catalog and denied access fixtures; compare native workflow and local execution.
Expected outputs, failure handling and validation: No measured Netflix benchmark; require exact fixture arithmetic and zero denied-source output.
Public inspiration: Netflix Technology Blog. The diagrams are independent application proposals, not a reproduction of Netflix's architecture.