Skip to content

Latest commit

 

History

13 Commits

Folders and files

Repository files navigation

SocialGraph AI

GraphRAG-powered social media intelligence workspace

SocialGraph AI connects authorized public social content through shared topics, retrieves evidence using hybrid vector/lexical search and graph traversal, and produces aggregate narrative, sentiment and activity reports. The repository contains working backend and browser UI code, a native LangGraph workflow, Docker deployment files, test suite, and an offline synthetic dataset. It is a production-oriented single-node baseline, not a certified enterprise production service.

Quick start — Docker

Requirements: Docker with Compose v2. Copy the environment template and replace the API key mapping with a strong random key. The key maps to a tenant, not a user profile.

cp .env.example .env
# Edit .env and replace the example API key.
docker compose up --build

Open http://localhost:8000. Enter your configured key, click Connect, then Load synthetic demo. Submit the pre-filled research question. The demo contains ten fictional posts; links are illustrative and are not real social evidence. API docs: http://localhost:8000/docs.

Local execution without Docker

Python 3.11 or 3.12 recommended.

python -m venv .venv
source .venv/bin/activate
pip install -r requirements-dev.txt
export SOCIALGRAPH_KEYS='{"local-development-key-change-me":"demo"}'
export SOCIALGRAPH_ENGINE=langgraph
uvicorn app.main:create_app --factory --host 127.0.0.1 --port 8000

The graph uses LangGraph by default. For restricted/offline environments with FastAPI, httpx and uvicorn installed but no LangGraph, explicitly set SOCIALGRAPH_ENGINE=local to use the same nodes in sequential order. This mode does not simulate parallel execution or claim to be LangGraph. No API key for an LLM is needed in either engine. Without OPENAI_API_KEY, reports use deterministic topic counts. For semantic embeddings set SOCIALGRAPH_EMBEDDINGS=openai and OPENAI_API_KEY; changing embedding mode requires re-ingesting the source data. With the local mode the vectorizer is signed hashed token features, not a neural embedding model. OpenAI data transmission requires an appropriate data processing agreement and user authorization.

Features

Feature Implementation
Social ingestion X recent-search, YouTube video-search, authorized JSON import
Normalization Pydantic, UTC timestamps, platform/external-ID idempotency
GraphRAG Persistent bipartite post-topic graph; weighted two-edge traversal; paths returned
Hybrid search Vector cosine + token overlap; high-degree topic penalty
Agent orchestration Native StateGraph with three specialist subgraphs, parallel fan-out and explicit barrier
Sentiment English lexicon baseline; not calibrated
Activity Retrieved-post time buckets and platform counts; not market-share estimates
Narrative Ranked topics, source IDs and co-occurrence relationships
Synthesis Optional OpenAI JSON response; deterministic fallback on provider/validation failure
Evaluation Claim schema and source-ID integrity, bounded retry and fail-closed node
Dashboard Graph SVG, metrics, query, evidence links, connector/import forms
Persistence SQLite WAL, tenant-scoped data and reports, deletion of derived reports
Security Key-to-tenant mapping, per-process tenant rate limit, parameterized SQL, CSP, non-root container

Agent architecture

SocialGraph AI system architecture

flowchart TD
  A[Authorized APIs or JSON] --> B[Normalize and extract topics]
  B --> C[(Post-topic graph + vectors)]
  Q[Research question] --> R[GraphRAG retriever]
  C --> R
  R --> S[Sentiment subgraph]
  R --> T[Trend subgraph]
  R --> N[Narrative subgraph]
  S --> J[Explicit join / synthesizer]
  T --> J
  N --> J
  J --> E[Evaluator]
  E -->|valid| F[Persist report and source evidence]
  E -->|invalid, first attempt| J
  E -->|invalid, retry exhausted| X[Fail closed]
Loading

The join is add_edge(["sentiment_agent", "trend_agent", "narrative_agent"], "synthesizer"), which waits for all three predecessor branches. Each wrapper publishes only its own output key, preventing concurrent state collisions. The evaluator only verifies citation IDs, not whether a source semantically entails a claim. See docs/ARCHITECTURE.md for the retrieval formula and limitations.

GraphRAG knowledge graph

Illustrative post-topic knowledge graph

Fictional example: related posts are connected through shared topics. The diagram illustrates graph expansion, not a verified real-world social network.

Technology stack

Technology stack

Product potential

Subjective product concept scorecard

These are illustrative concept ratings, not measured market benchmarks or a production-readiness certification.

API examples

export KEY=local-development-key-change-me
curl -X POST http://localhost:8000/v1/demo -H "X-API-Key: $KEY"
curl -X POST http://localhost:8000/v1/analyze \
  -H "X-API-Key: $KEY" -H 'Content-Type: application/json' \
  -d '{"question":"Atlas AI battery and subscription narratives","top_k":12}'
Method Endpoint Purpose
GET /healthz, /readyz Liveness/readiness
GET /v1/overview Tenant counts and graph edges
POST /v1/demo Seed synthetic data
POST /v1/posts Import up to 100 posts
POST /v1/collect One authorized API search page
POST /v1/analyze Run agent graph and persist report
GET /v1/reports/{rid} Read tenant-owned report
DELETE /v1/posts/{pid} Remove post and purge tenant reports

JSON import format (array inside the API's posts field, bare array in UI):

{"posts":[{"platform":"other","external_id":"sample-1","text":"A fictional product review mentions battery life.","url":"https://example.com/sample-1","published_at":"2026-11-01T00:00:00Z","engagement":5,"topics":["battery life"]}]}

Social data access

Set X_BEARER_TOKEN or YOUTUBE_API_KEY to use the corresponding official endpoint. Access, retention, redistribution and allowed uses depend on your platform agreement. YouTube connector imports video title and description, not comments or transcripts, and reports engagement as zero (unknown). X imports recent results only and sums available public interaction counts. Other platform names are accepted for authorized imports, not live connectors. Do not infer reach or compare engagement across providers without normalizing their metrics. No private scraping, author identity graph, deanonymization, automated targeting or publishing is implemented.

Tests and deployment status

Recorded local test results

python -m pytest -q

Local run: 9 passed, 1 skipped. The native LangGraph test was skipped because the dependency was unavailable in the build environment; package installation failed. CI installs it and runs that test. JavaScript syntax and Python compilation checked. Live social APIs, OpenAI, browser rendering, Docker build, load tests and security review were not executed. No secrets are bundled. Before internet-facing use, follow docs/OPERATIONS.md.

Repository map

  • app/main.py — API, authentication, rate limit, application lifecycle
  • app/models.py — input validation and canonical social post schema
  • app/store.py — durable graph adjacency, vector retrieval, provenance
  • app/embedding.py — local vectorization or OpenAI embeddings
  • app/agents.py — StateGraph, specialists, synthesis and evaluation
  • app/connectors.py — official API adapters
  • app/demo.py — explicitly fictional sample
  • app/static/ — responsive dashboard
  • tests/ — runnable regression tests
  • docs/ — architecture and operational readiness
  • Dockerfile, compose.yaml, .github/workflows/ci.yml — deployment and CI

References: LangGraph StateGraph, X developer docs, YouTube Data API.

Google Ads engineering — repository-specific visual design gallery

Contextual trend evidence for advertising research. Existing authorized public content graph, hybrid retrieval, topic and sentiment analysis, bounded native workflow. Ads use is aggregate contextual research, not personal profiling. These ten diagrams describe independent conceptual proposals; they do not claim live Google integration, production deployment, measured results or affiliation.

Adaptation strategy for the current repository

Reuse app/models.py canonical post schema, store.py graph/provenance, embedding.py retrieval, agents.py specialist workflow and connectors.py authorized-source adapters. Add read-only aggregate Google Ads keyword/campaign reporting and explicit contextual topic mapping; no person-level advertising profiling or activation.

Google integration references: Google Ads reporting · GA4 Data API. These are proposed adapter contracts; live data access and field compatibility must be validated separately.

01. Topic evidence graph

SocialGraphAI: Topic evidence graph

Concept and architecture. Connect public topic evidence to candidate search themes; never infer individual targeting characteristics.

How to read it. Nodes are domain components and arrows identify proposed dependencies or associations. Components: Public topic; Authorized post; Related topic; Search theme; Evidence source; Aggregate report.

Step-by-step workflow: Resolve research topic, retrieve authorized public posts, follow related-topic and source evidence edges, then map candidate contextual search themes using explicit vocabulary.

How to adapt the current repository: Reuse app/store.py adjacency and provenance and app/agents.py topical analysis; add proposed aggregate Ads search-theme metadata nodes without user identity edges.

Outputs, failure handling and validation: Return cited topic evidence and candidate themes; reject unauthorized content and avoid personal targeting claims.

02. Hybrid retrieval fusion

SocialGraphAI: Hybrid retrieval fusion

Concept and architecture. Merge relevance signals and preserve provenance; separate quoted evidence from model interpretation.

How to read it. Branches show independent inputs or analyses that converge for a checked result. Components: Research question; Lexical ranking; Vector ranking; Bounded graph expansion; Evidence synthesis.

Step-by-step workflow: Generate lexical and vector candidate rankings, fuse scores, expand bounded graph neighborhood, preserve source references and pass verified evidence to synthesis.

How to adapt the current repository: Reuse app/embedding.py, store.py retrieval and native workflow; add aggregate keyword-theme evidence as a separate retrieval source rather than mix raw metrics into embeddings.

Outputs, failure handling and validation: Test ranking recall, duplicate sources, graph depth limit and unsupported citations; abstain when evidence is insufficient.

03. Narrative evolution

SocialGraphAI: Narrative evolution

Concept and architecture. Track aggregate changes over time; do not claim actual market demand from social activity alone.

How to read it. Read the ordered stages from left to right; preserve evidence and state. Components: Topic observed; Aggregate activity; Narrative shift; Evidence refresh; Review theme.

Step-by-step workflow: Group observations by reporting window, compare aggregate activity and themes, track narrative shifts with source timestamps and refresh evidence before review.

How to adapt the current repository: Reuse existing aggregate activity/narrative specialists; add a versioned topic time-series schema and explicit mapping to Ads aggregate reporting windows.

Outputs, failure handling and validation: Test sparse periods, late posts and source coverage changes; social activity is not actual search demand or conversion evidence.

04. Sentiment uncertainty

SocialGraphAI: Sentiment uncertainty

Concept and architecture. Sentiment summaries are uncertain and context-dependent; inspect source coverage rather than label individuals.

How to read it. Compare separate criteria; cells are not measurements. Components: Positive evidence; Negative evidence; Mixed context; Sarcasm uncertainty; Source coverage; Review threshold.

Step-by-step workflow: For each aggregate topic examine positive, negative and mixed evidence, ambiguity/sarcasm and source coverage; report uncertainty instead of a single authoritative label.

How to adapt the current repository: Reuse existing sentiment analysis; add structured evidence counts and uncertainty annotations before synthesis.

Outputs, failure handling and validation: Test ambiguous language and contradictory sources; prohibit sentiment profiles of individual users and unsupported targeting recommendations.

05. Contextual keyword research

SocialGraphAI: Contextual keyword research

Concept and architecture. Candidate keywords are hypotheses; no automatic audience creation or ad bidding.

How to read it. Read the ordered stages from left to right; preserve evidence and state. Components: Public theme; Retrieve related topics; Compare allowed search aggregates; Propose keyword hypotheses; Human review.

Step-by-step workflow: Resolve public theme, expand related topics, compare permitted aggregate search-theme metrics, propose keyword hypotheses with sources and send for review.

How to adapt the current repository: Reuse topical GraphRAG and add read-only Ads keyword report adapter with compatible dimensions and explicit theme-to-keyword mapping.

Outputs, failure handling and validation: Return contextual keyword ideas only; test missing metrics and no automatic ad targeting, activation or bidding.

06. Google data isolation

SocialGraphAI: Google data isolation

Concept and architecture. No cross-source person-level join, account identity inference or private social data access.

How to read it. Sources are separated from mapping and analysis outputs. Components: Authorized public content; Ads aggregate keyword reports; BigQuery topic summaries; Explicit topic mapping; Evidence graph; Aggregate research.

Step-by-step workflow: Ingest authorized public content and Ads aggregate reports separately, normalize time/topic labels, map through approved contextual keys, then store aggregate evidence with provenance.

How to adapt the current repository: Extend app/connectors.py with proposed Google adapter and store.py with source-qualified aggregate records; do not cross-join user identifiers.

Outputs, failure handling and validation: Test scope mismatch, unauthorized source and incompatible granularity; preserve source boundaries and data-use restrictions.

07. Source provenance map

SocialGraphAI: Source provenance map

Concept and architecture. Record source provenance and time windows; abstain on conflicting or inadequate evidence.

How to read it. Nodes are domain components and arrows identify proposed dependencies or associations. Components: Trend claim; Public source A; Public source B; Timestamp; Topic edge; Audit record.

Step-by-step workflow: For each trend claim resolve source posts, observed timestamps, topic relationships and evidence IDs, then verify citation validity and contradictory sources.

How to adapt the current repository: Reuse durable graph adjacency and provenance in store.py and evaluator in agents.py; add source revision/report timestamps for Google context.

Outputs, failure handling and validation: Test stale evidence, invalid source IDs and insufficient coverage; return qualified hypothesis or abstention.

08. Privacy and policy gate

SocialGraphAI: Privacy and policy gate

Concept and architecture. Restrict use to contextual research and lawful data; do not expose raw personal profiles.

How to read it. Read the ordered stages from left to right; preserve evidence and state. Components: Authorized source; Aggregate only; Remove personal profiling; Check usage rights; Release research summary.

Step-by-step workflow: Validate source authorization and purpose, aggregate evidence, exclude personal profiling and sensitive targeting, check content usage rights and release only a reviewed research summary.

How to adapt the current repository: Reuse existing tenant authentication/rate limits and policy checks; extend with explicit aggregate-only advertising output contract.

Outputs, failure handling and validation: Test attempts to infer individual identity or private attributes; deny and avoid exposing raw identifiers in logs.

09. Advertising research scenario

SocialGraphAI: Advertising research scenario

Concept and architecture. Illustrative topic exploration may inform a brief, not demonstrate observed conversion or ROAS improvement.

How to read it. Branches show independent inputs or analyses that converge for a checked result. Components: Seasonal product theme; Topic activity evidence; Related search theme; Cited research brief.

Step-by-step workflow: For a fictional seasonal product theme, retrieve related public-topic evidence, compare contextual keyword themes from approved aggregate data and generate cited research brief.

How to adapt the current repository: Reuse SocialGraph topic and synthesis agents; add a separate Ads context task with typed output and evidence validation.

Outputs, failure handling and validation: State alternative explanations and missing metrics; no claim of conversion uplift or observed ROAS.

10. Trend evaluation plan

SocialGraphAI: Trend evaluation plan

Concept and architecture. Use synthetic public-content fixtures and labeled relevance, not unverified benchmark claims.

How to read it. Compare separate criteria; cells are not measurements. Components: Topic retrieval recall; Evidence citation; Temporal relevance; Privacy refusal; Sentiment calibration; Unsupported claim checks.

Step-by-step workflow: Build synthetic topic graph, labeled retrieval queries and evidence/temporal/privacy cases; run local and native orchestration and compare citation correctness.

How to adapt the current repository: Extend app/demo.py and tests with mocked Ads aggregate reports and contextual mappings, including adversarial personal-profile requests.

Outputs, failure handling and validation: Measure topic recall, provenance, temporal relevance and refusal behavior; no measured Google benchmark claimed.

Meta / Facebook engineering — repository-specific visual gallery

Social topic discovery and public-content evidence. Reuse app/store.py, embedding.py, agents.py, connectors.py and canonical post models. Add only approved Page/Instagram professional-account sources, not unrestricted Facebook social graph scraping.

Independent proposed adaptations; no live Meta integration, official affiliation, internal architecture or measured outcomes claimed. Validate API version, app review, permissions and platform terms before implementing.

01. Public-content topic graph

SocialGraphAI: Public-content topic graph

Concept and step-by-step workflow: Resolve contextual theme, retrieve permitted posts/media metadata, traverse related topics and retain source timestamps. Produce aggregate topic finding without profiling individuals.

Diagram reading guide: Topic → Authorized Page post; Topic → Instagram media; Topic → Related topic; Authorized Page post → Source timestamp; Topic → Aggregate finding. Arrows indicate proposed processing or dependency relationships, not proof of causality.

How to adapt the current repository: Extend canonical post schema and store adjacency with source/account/media type; add approved Graph API adapter alongside existing connectors.

Expected outputs, failure handling and validation: Missing permission or source yields abstention; no private friends graph or unrestricted public-content access.

02. Hybrid social retrieval

SocialGraphAI: Hybrid social retrieval

Concept and step-by-step workflow: Fuse lexical and vector candidates then expand permitted graph neighbors, deduplicate sources and validate result-local citations.

Diagram reading guide: Research query → Lexical rank; Research query → Vector rank; Lexical rank → Bounded topic expansion; Vector rank → Bounded topic expansion; Bounded topic expansion → Cited answer. Arrows indicate proposed processing or dependency relationships, not proof of causality.

How to adapt the current repository: Reuse embedding.py/store.py and agents.py evaluator; add channel-specific normalization and source filters.

Expected outputs, failure handling and validation: Test duplicates, depth limits and fabricated evidence IDs; no invented public posts.

03. Narrative trend timeline

SocialGraphAI: Narrative trend timeline

Concept and step-by-step workflow: Compare authorized aggregate activity and theme changes between equivalent windows, account for source coverage and missing dates.

Diagram reading guide: Topic observed → Window A summary → Window B summary → Source refresh → Trend review. Arrows indicate proposed processing or dependency relationships, not proof of causality.

How to adapt the current repository: Reuse narrative/activity specialists; add Page/Instagram metric definitions and timestamp granularity.

Expected outputs, failure handling and validation: Sparse or changed coverage is reported; social activity does not prove demand or causality.

04. Sentiment evidence matrix

SocialGraphAI: Sentiment evidence matrix

Concept and step-by-step workflow: Aggregate sentiment on topic evidence rather than individual people; retain conflicting examples and disclose ambiguity.

Diagram reading guide: Independent dimensions: Positive text evidence; Negative text evidence; Mixed context; Sarcasm uncertainty; Coverage; Manual review. No measured values are implied.

How to adapt the current repository: Extend existing sentiment specialist with confidence/coverage fields and explicit aggregate-only output.

Expected outputs, failure handling and validation: Test irony, mixed language and contradictory sources; avoid sensitive personal inference.

05. Page and media ingestion

SocialGraphAI: Page and media ingestion

Concept and step-by-step workflow: Read only permitted business/Page or professional-account resources, normalize stable IDs, content/time and access status, then stage graph/index update.

Diagram reading guide: Approved account scope → Graph API response → Normalize source record → Versioned graph → Index refresh. Arrows indicate proposed processing or dependency relationships, not proof of causality.

How to adapt the current repository: Add read adapter to connectors.py and extend store.py source lineage; verify product permissions and app review first.

Expected outputs, failure handling and validation: Reject incomplete pages, revoked scope and unsupported resource; respect retention/deletion.

06. Contextual campaign research

SocialGraphAI: Contextual campaign research

Concept and step-by-step workflow: Map approved aggregate topic evidence to a possible creative brief. Compare campaign report context separately; no linkage to individual accounts.

Diagram reading guide: Public theme → Related topics; Public theme → Owned media insight; Public theme → Aggregate ad report; Related topics → Brief hypothesis; Owned media insight → Brief hypothesis; Brief hypothesis → Evidence. Arrows indicate proposed processing or dependency relationships, not proof of causality.

How to adapt the current repository: Reuse topic retrieval and synthesis, add optional read-only Marketing Insights source keyed by context not identity.

Expected outputs, failure handling and validation: No automated audience targeting, causal conversion claim or inferred personal traits.

07. Graph evidence and moderation boundary

SocialGraphAI: Graph evidence and moderation boundary

Concept and step-by-step workflow: Treat posts as untrusted data, remove embedded commands from control flow, preserve legitimate facts and enforce aggregate privacy before output.

Diagram reading guide: Allowed source → Filter untrusted content → Extract topic facts → Validate citations → Aggregate report. Arrows indicate proposed processing or dependency relationships, not proof of causality.

How to adapt the current repository: Reuse prompt/evidence validator and tenant controls; add injection and source-use policy fixtures.

Expected outputs, failure handling and validation: Fail closed on unsupported source or profiling request; no platform moderation action.

08. Social intelligence evaluation

SocialGraphAI: Social intelligence evaluation

Concept and step-by-step workflow: Use fictional Page/media records and labeled questions to evaluate retrieval, grounding, aggregate sentiment and refusal.

Diagram reading guide: Independent dimensions: Topic recall; Citation precision; Temporal relevance; Sentiment uncertainty; Privacy refusal; Source freshness. No measured values are implied.

How to adapt the current repository: Extend app/demo.py and tests with mock authorized Graph API responses and revocation cases.

Expected outputs, failure handling and validation: No claim of access to all Facebook content or measured Meta benchmark.

Official references: Meta developer docs · Graph API · WhatsApp Business Platform.

Microsoft / Azure engineering — repository-specific visual gallery

Microsoft-oriented enterprise topic intelligence and contextual research. Reuse app/store.py, embedding.py, agents.py and connectors.py for authorized content, topic graphs, hybrid retrieval and evidence validation. Microsoft adaptation uses approved Teams/SharePoint content or licensed aggregate research; not unrestricted LinkedIn scraping or employee profiling.

Independent proposed adaptations; no claim of live Microsoft integration, internal architecture, certification or measured results.

01. Authorized workplace topic graph

SocialGraphAI: Authorized workplace topic graph

Concept and step-by-step workflow: Map only authorized source records to contextual topics and relationships, preserve source/time/access references and derive aggregate themes rather than profiles.

Diagram reading guide: Topic → Permitted Teams thread; Topic → Permitted SharePoint document; Permitted Teams thread → Related topic; Permitted SharePoint document → Related topic; Related topic → Aggregate evidence. Arrows describe proposed processing/dependencies, with branching semantics explained above.

How to adapt the current repository: Extend canonical content schema and connectors.py with approved Microsoft Graph/Work IQ reads where supported; keep source-specific permissions and retention.

Expected outputs, failure handling and validation: Reject denied source and individual profiling request; no private chats or LinkedIn graph access assumed.

02. Permission-aware hybrid topic retrieval

SocialGraphAI: Permission-aware hybrid topic retrieval

Concept and step-by-step workflow: Apply trusted scope before both retrieval branches, fuse ranks, expand only permitted neighbors and validate source citations. Recheck access for stale records.

Diagram reading guide: Research query → ACL-filtered lexical search; Research query → ACL-filtered vector search; ACL-filtered lexical search → Bounded graph expansion; ACL-filtered vector search → Bounded graph expansion; Bounded graph expansion → Cited summary. Arrows describe proposed processing/dependencies, with branching semantics explained above.

How to adapt the current repository: Reuse embedding.py/store.py and agent evaluator; optionally add Azure AI Search provider for index, preserve typed graph boundary.

Expected outputs, failure handling and validation: Unauthorized topic edge cannot leak source text; test revoked access and fabricated citation.

03. Aggregate theme evolution

SocialGraphAI: Aggregate theme evolution

Concept and step-by-step workflow: Compare topic-level activity across equivalent windows and account for coverage changes, late records and uncertainty. Do not infer employee productivity or performance.

Diagram reading guide: Topic window A → Compare coverage; Topic window B → Compare coverage; Compare coverage → Refresh authorized evidence; Refresh authorized evidence → Trend review. Arrows describe proposed processing/dependencies, with branching semantics explained above.

How to adapt the current repository: Reuse narrative and activity specialists; add explicit time/source coverage metadata and aggregate-only output contract.

Expected outputs, failure handling and validation: Sparse evidence remains uncertain; no surveillance or individual sentiment ranking.

04. Contextual advertising hypothesis

SocialGraphAI: Contextual advertising hypothesis

Concept and step-by-step workflow: Connect permitted aggregate public-topic evidence with compatible search campaign/keyword context by reviewed topical mapping, not personal identifiers.

Diagram reading guide: Authorized public research theme → Explicit topical mapping; Microsoft Ads aggregate report → Explicit topical mapping; Explicit topical mapping → Evidence review; Evidence review → Draft brief. Arrows describe proposed processing/dependencies, with branching semantics explained above.

How to adapt the current repository: Add separate Microsoft Advertising report adapter in connectors.py; restrict workplace data from advertising use unless independently authorized and appropriate.

Expected outputs, failure handling and validation: No cross-source identity joins or sensitive targeting; no actual demand or conversion claim.

05. Untrusted content and retention

SocialGraphAI: Untrusted content and retention

Concept and step-by-step workflow: Validate authorized purpose and access, extract topic evidence without following embedded instructions, minimize personal detail and enforce retention.

Diagram reading guide: Source permission → Treat content as data; Treat content as data → Topic extraction; Topic extraction → Redact personal detail; Redact personal detail → Retention and audit. Arrows describe proposed processing/dependencies, with branching semantics explained above.

How to adapt the current repository: Reuse current tenant and evidence checks; add Microsoft resource revocation/deletion mapping and purpose restrictions.

Expected outputs, failure handling and validation: Test injection and deleted source; no secret or personal profile in output.

06. Topic intelligence evaluation

SocialGraphAI: Topic intelligence evaluation

Concept and step-by-step workflow: Use fictional messages/docs and authorized public-content fixtures to evaluate recall, source validity and aggregate privacy independently.

Diagram reading guide: Synthetic content graph → Topic recall; Synthetic content graph → Temporal relevance; Synthetic content graph → Privacy and citation; Topic recall → Release review; Temporal relevance → Release review; Privacy and citation → Release review. Arrows describe proposed processing/dependencies, with branching semantics explained above.

How to adapt the current repository: Extend app/demo.py/tests with mocked Microsoft resource responses and revocation cases; compare local/native graph modes.

Expected outputs, failure handling and validation: No measured Microsoft/LinkedIn product benchmark or deployed integration.

References: Microsoft Advertising report types · Customer Insights · Microsoft Graph.

Netflix engineering — repository-specific visual gallery

Entertainment narrative and public content research. Reuse app/store.py, embedding.py, agents.py and connectors.py for authorized public content, topic links, narrative/sentiment and hybrid retrieval. No private viewer history or unapproved scraping.

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.

01. Public title-discussion topic graph

SocialGraphAI: Public title-discussion topic graph

Concept and step-by-step architecture: Resolve title identity, retrieve approved public or licensed content and map recurring themes to title metadata. Keep discussion separate from factual title metadata and viewing behavior.

Diagram reading guide: Research title → Authorized public posts; Research title → Related themes; Authorized public posts → Reviewed title mapping; Related themes → Reviewed title mapping; Reviewed title mapping → Aggregate narrative. Arrows represent proposed processing dependencies; conditions and joins follow the workflow above.

How to adapt the current repository: Extend canonical source record and topic graph with title ID and source authorization, preserve source timestamps and evidence IDs.

Expected outputs, failure handling and validation: Ambiguous title or unavailable source remains unknown; no individual profiling.

02. Launch narrative timeline

SocialGraphAI: Launch narrative timeline

Concept and step-by-step architecture: Compare comparable windows and source coverage, detect aggregate theme shifts and preserve contradictory evidence. Avoid interpreting social activity as actual streams.

Diagram reading guide: Pre-launch window → Coverage normalization; Launch window → Coverage normalization; Coverage normalization → Theme change evidence; Theme change evidence → Qualified report. Arrows represent proposed processing dependencies; conditions and joins follow the workflow above.

How to adapt the current repository: Reuse activity and narrative specialists; add explicit release window and source coverage schema.

Expected outputs, failure handling and validation: Sparse data and deleted sources flagged; no prediction of Netflix viewing hours.

03. Spoiler-aware evidence retrieval

SocialGraphAI: Spoiler-aware evidence retrieval

Concept and step-by-step architecture: Fuse lexical/vector candidates and expand bounded topic graph, apply user-selected spoiler preference and verify sources before generating summary.

Diagram reading guide: Research query → Lexical results; Research query → Vector results; Lexical results → Topic expansion; Vector results → Topic expansion; Topic expansion → Spoiler-filtered summary. Arrows represent proposed processing dependencies; conditions and joins follow the workflow above.

How to adapt the current repository: Reuse embedding.py and store.py; add optional spoiler metadata with deterministic output filter, not assumed perfect model classification.

Expected outputs, failure handling and validation: Test ambiguous spoiler and invalid citation; omit uncertain detail when necessary.

04. Creative research topic mapping

SocialGraphAI: Creative research topic mapping

Concept and step-by-step architecture: Compare aggregate theme evidence to authorized promotional descriptors using documented contextual mapping, not personal identity joins. Produce testable creative hypothesis.

Diagram reading guide: Public theme evidence → Explicit topical mapping; Approved artwork descriptors → Explicit topical mapping; Explicit topical mapping → Evidence review; Evidence review → Creative brief. Arrows represent proposed processing dependencies; conditions and joins follow the workflow above.

How to adapt the current repository: Reuse topic synthesis and optional research connectors; add separate asset descriptors and purpose-bound analysis contract.

Expected outputs, failure handling and validation: No causal uplift or targeted member profiling; no automatic publishing.

05. Aggregate sentiment uncertainty

SocialGraphAI: Aggregate sentiment uncertainty

Concept and step-by-step architecture: Aggregate contextual language evidence, retain mixed and ironic examples and disclose uncertainty. Never infer personal sensitive traits or authoritative opinion of every viewer.

Diagram reading guide: Topic evidence → Positive and negative signals; Topic evidence → Mixed or ironic context; Positive and negative signals → Coverage review; Mixed or ironic context → Coverage review; Coverage review → Qualified sentiment. Arrows represent proposed processing dependencies; conditions and joins follow the workflow above.

How to adapt the current repository: Reuse sentiment specialist; add evidence coverage and disagreement fields, avoid personal-level reports.

Expected outputs, failure handling and validation: Test sarcasm, contradictory sources and sparse windows; no sentiment guarantee.

06. Entertainment research regression

SocialGraphAI: Entertainment research regression

Concept and step-by-step architecture: Evaluate known title references, topic recall and source grounding independently from privacy and spoiler refusal on fictional posts.

Diagram reading guide: Synthetic discussion corpus → Title resolution; Synthetic discussion corpus → Topic retrieval; Synthetic discussion corpus → Privacy and spoiler tests; Title resolution → Release report; Topic retrieval → Release report; Privacy and spoiler tests → Release report. Arrows represent proposed processing dependencies; conditions and joins follow the workflow above.

How to adapt the current repository: Extend app/demo.py and existing tests; use mock licensed public content adapter and revocation fixtures.

Expected outputs, failure handling and validation: No live Netflix or social provider integration; no fabricated engagement benchmark.

Public inspiration: Netflix Technology Blog. The diagrams are independent application proposals, not a reproduction of Netflix's architecture.