Lydia Ng
03 · Case Study Repository: zephyr-scripts/sgbiz-sentiment-tracker
Internal Product / Production Intelligence Workflow Automated Intelligence

SGBiz Pulse

From Repeated Monitoring to a Structured Intelligence Workflow

Important business signals are scattered across sources and often repeated or duplicated, making manual monitoring noisy and time-consuming. This workflow filters, verifies and synthesizes material change while preserving the evidence behind it.

Operating Problem Repeated, duplicated signals across fragmented sources
Approach Collect · filter and group · verify · synthesize
Operating Value Traceable digest triggered by meaningful change

“From noisy source material to structured, auditable intelligence.”

BUSINESS SUMMARY

The workflow problem and what changed

Technical architecture follows below

Organisation & workflow

An internal business-intelligence workflow for monitoring recurring Singapore commercial signals across discussions and linked articles.

What was difficult

Sources were noisy and duplicated, while engagement volume could be mistaken for evidence and AI summaries could hide how conclusions were reached.

What changed

The workflow collects and enriches source material, groups related events, applies evidence-based scoring, and produces traceable owner-level briefs.

Why it mattered

Decision-makers gained a repeatable view of material changes while retaining the evidence and decision trail behind each output.

This pattern can also apply to

  • Regulatory monitoring
  • Competitor intelligence
  • Account or market monitoring
  • Policy or sector updates

These are transferability examples, not claims of past delivery.

Architecture & Pipeline Blueprint

Deterministic + AI Intelligence Pipeline

Ingestion Deterministic Gate Synthesis
Lane 01 · Ingestion & Enrichment input
Multi-Source Pull Composio MCP

Automated fetch across Reddit forums (r/singapore, r/singaporefi etc) & targeted regional business web indices.

arrow_downward
Raw Candidate Ingestion Raw Capture

Unprocessed payload serialization, capture timestamps, metadata headers, and author footprints stored in immutable stage tables.

arrow_downward
External Link Scraping Apify Crawler

Dereferencing shared news URLs, resolving canonical payloads, bypassing soft paywalls, and extracting primary body copy.

Lane 02 · Deterministic Gate tune
Relevance & Noise Filter Rule-Based

Keyword-vector heuristic elimination of generic chit-chat, personal rants, spam, and non-commercial local discourse.

arrow_downward
Event Clustering & Dedupe Text Distance

Collapses multiple threads of community posts discussing the exact same corporate merger or restructuring into 1 distinct event entity.

arrow_downward
Deterministic Scorecard Rule-Based, Reproducible

Scoring is calculated from defined inputs and formulas, including source counts, activity and entity mentions, rather than generated by an LLM.

Lane 03 · Synthesis & Distribution send_and_archive
AI-Assisted Brief & Watchlist Constrained LLM

AI synthesis is constrained to retrieved evidence, while scoring and state changes are handled by rule-based logic. Signals are classified as New, Watch or Easing.

arrow_downward
Scheduled Owner Digest Daily Dispatch

Clean executive dispatch delivered via email / webhook only when novel or materially altered enterprise signals exceed threshold.

arrow_downward
Target Distribution Portal & Feeds

SGBiz Pulse executive console, queryable raw SQL warehouse tables, and automated alerting channels.

dns
Underlying Cross-Cutting Infrastructure Evidence-constrained synthesis, reproducible scoring, decision traces and monitoring
Full Decision Trace Log Postgres pg_cron Engine Offline Replay Test Rig Health & Observability Probe
01

The Challenge

Recurring business intelligence in high-tempo markets is severely undermined by signals scattered across disorganized digital forums, regional aggregators, and industry news outlets. For strategy and transformation leaders, attempting to monitor market shifts through manual tracking or simplistic social listening tools fails due to three systemic data-quality barriers:

filter_none Redundant Echo Chambers

Dozens of social posts and syndications reiterate the exact same singular press release or local rumor, distorting raw frequency calculations into artificial urgency.

trending_down Deceptive Metrics

Public engagement (upvotes, emotional forum commentary) is frequently mistaken for independent commercial evidence, conflating consumer controversy with actual business impact.

history_edu Hallucinatory Summaries

General AI wrappers may summarize unvetted collections without citations or a decision trail that strategic users can inspect.

02

Thinking & Rationale

The foundational philosophy of SGBiz Pulse is deliberate architectural decoupling. Rather than feeding raw forum text directly into an LLM and asking it to both analyze and score the situation, the system bifurcates qualitative synthesis from deterministic calculation.

Decoupled Processing Architecture
Step 01 Collection Raw Candidates
Step 02 Evidence Article Scraping
Step 03 Deterministic Formulaic Scorecard
Step 04 AI Synthesis Grounded Briefing
Step 05 Publication Material Change Only
Immutable Evidence Ledger Candidate payloads and query responses are retained in raw format so a business-intelligence brief can be traced to timestamps, source URLs and captured snapshots.
Rule-Based Metrics Velocity, volatility and sentiment measures use defined statistical and lexical rules rather than asking a language model to invent a score.
03

Implemented Pipeline

The production pipeline executes continuously in Supabase, orchestrated by automated chronologies that transition unprocessed web signals into boardroom-ready intelligence.

STAGE 01

Tracked Entity & Topic Sweeper

Composio MCP integration runs targeted querying across Singapore corporate ecosystems, tracking regulatory announcements, corporate restructuring, real estate occupancy rates, and banking sentiment.

Hourly Run
STAGE 02

Deep Link Dereferencing (Apify)

If an ingested candidate points to an external primary investigative article (e.g. Business Times, Straits Times, SGX filings), a headless crawler scrapes the target content, validating that the forum discussion reflects actual reportage.

Event Triggered
STAGE 03

Heuristic Deduplication & Event Clustering

Applies strict string-distance and canonical URL deduplication. When multiple posts aggregate around one occurrence, they are gathered into a single Event Container, preventing repetitive alert spam.

Automated
STAGE 04

Audit-Logged Novelty Decision Gate

Before triggering a notification, the pipeline checks historical records. A signal is published when it represents a new development or changes an existing position, while dismissal decisions are recorded in the activity log.

Gate Keeper
04

Signal Taxonomy & Scorecard

Detected intelligence items are categorized into three workflow states so readers can distinguish new or changed signals, continuing watch items and easing or contradicted signals.

New / Changed fiber_new
Emerging Structural Shifts

Brand-new regulatory filings, executive departures, unconfirmed institutional acquisitions, or sudden sector-wide pricing shifts that require primary evaluation.

Action: Immediate Digest Priority 1
Continuing Watch visibility
Ongoing Situation Monitoring

Known developments with steady metric accretion. Updates are bundled into daily periodic wraps rather than interruptive ad-hoc alerts.

Action: Scheduled Wrap Priority 2
Easing / Contradicted check_circle
Resolution or False Rumor

Prior concerns refuted by verified regulatory releases, official corporate responses, or diminishing community velocity. Automatically de-escalated.

Action: Archive with Note Resolved
analytics Deterministic Scorecard Output Sample
EVENT ID: SG-2024-089A
Singtel · Regional Data Centre Consortium Expansion Clustered from multiple forum items and linked source material
Status: New / Changed
Raw Candidates Source items retained
Unique Domains Source diversity tracked
Velocity Score Calculated from stored inputs
Decision Trace Available · rule-based scoring
Synthesized Briefing: Illustrative briefing: multiple source items are grouped into one event, while source references and scoring inputs remain available for review.
05

System & Technical Specification

Constructed with managed services, scheduled jobs, recovery handling and explicit data-access rules to reduce operational maintenance.

Frontend Application React · TypeScript · Vite

Interactive dashboard with signal filters, cluster drill-down and a raw-payload audit view.

Backend & Database Supabase Postgres · Edge Functions · RLS

Relational schema isolating raw candidates from verified events. Strict Row Level Security policies governing enterprise multi-tenancy.

Scheduling Engine Postgres pg_cron

In-database job dispatch triggering ingestion, deduplication sweeps, and digest compilation without separate external cron servers.

External Connectivity Composio MCP & Apify Gateway

Standardized Model Context Protocol connections for authenticated forum access and distributed scraping actors.

science Offline Replay Test Rig & Decision Audit Log

To verify pipeline integrity when updating prompt templates or heuristic thresholds, SGBiz Pulse includes an offline test harness. Historical candidate snapshots can be replayed to check deduplication logic and AI synthesis against defined acceptance criteria without invoking live internet sources.

check Deterministic Replay
check Prompt Drift Guard
check Traceable Decisions
06

Outcomes & Strategic Value

A Repeatable Intelligence Workflow

SGBiz Pulse converts fragmented and duplicated source material into a structured monitoring surface. Users receive filtered alerts while retaining access to the underlying evidence and decision trace.

Core Capabilities Demonstrated
account_tree
Beyond Simple API Chaining Orchestrating stateful, multi-tier data workflows with intermediate persistence rather than fragile single-shot completions.
calculate
Combining AI with Deterministic Logic Restricting LLM responsibilities to qualitative text synthesis while assigning scoring and filtering entirely to verifiable algorithms.
verified_user
Evidence Quality & Auditability Supporting review by linking summarized claims to timestamped source material retained by the workflow.
inventory_2
Productising Recurring Research Replacing manual, recurring analyst sweeps with continuous autonomous operations governed by precise health checks.
NEXT STEP

Have a similar workflow or systems problem?

If recurring research depends on noisy sources, manual synthesis, or conclusions without a clear evidence trail, we can explore a more structured workflow.

Discuss a workflow problem