stemedb/latent/use_case_1.md
jordan b3e8a9a058 feat: Multi-application expansion with chaos testing and community UI
Major additions:
- Community Next.js app (port 18187) for browsing claims with API docs
- stemedb-chaos crate: Fault injection, chaos testing, CRDT properties
- Latent ingestion system: Reddit/FDA ingesters with ADK-Go agents
- Disputed claims handling: Manual review workflows and validation
- Aphoria security scanner: New extractors (SQL injection, command
  injection, weak crypto, TLS version), policy-based ignores, UAT reports
- Docker infrastructure: Dockerfile, docker-compose.yml for full stack
- VulnBank demo: Intentionally vulnerable multi-language test corpus

SDK & API enhancements:
- Source registry handlers for tracking data provenance
- Metrics endpoint
- Skeptic filtering improvements

Code quality:
- Split 14 large files (>500 lines) into focused modules
- All files now under 500-line limit per project guidelines

Documentation:
- Chaos testing guide, circuit breakers, observability docs
- Phase 7 UAT documentation updates
- Martin Kleppmann technical writer agent

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 01:24:14 -07:00

3.2 KiB

Latent Use Case #1: The "Short" Signal

Early Detection of Gastroparesis in GLP-1 Agonists

1. The Scenario

It is April 2023. Novo Nordisk (NVO) is trading at record highs driven by the "Ozempic Craze." The official FDA label for Semaglutide lists common GI issues like nausea and vomiting as "transient" and "manageable." The market consensus is that the drug is perfectly safe for long-term use.

A BioTech analyst at a mid-sized hedge fund uses Latent to monitor the GLP-1 sector for "Epistemic Divergence."

2. The Discovery

On April 12, Latent's Divergence Analyzer triggers a CRITICAL alert:

  • Molecule: Semaglutide
  • Concept: adverse_event.gastric_motility
  • Divergence Score: 0.84 (High)
  • Primary Driver: A cluster of 400+ reports in /r/Ozempic and /r/Wegovy describing "stomach paralysis" and "inability to eat for days" occurring after 6 months of use.

3. The Evidence Graph

The analyst opens the Molecule View to inspect the conflict:

Tier Source Assertion Confidence
0 (Regulatory) FDA Label "GI events are transient; resolve after few weeks." 1.0 (Permanent)
1 (Clinical) SUSTAIN Trials "Nausea reported in 20% of cohort; no paralysis noted." 0.9 (Valid)
5 (Social) Reddit Cluster "Stomach paralysis; ER visit required; ongoing after cessation." 0.45 (High Vol)

The Skeptic Lens identifies a categorical contradiction:

"The FDA (Tier 0) asserts the condition is transient. The Latent Signal (Tier 5) asserts the condition is permanent/severe. These cannot both be true."

4. The Investigation

The analyst uses Time Travel to see if this is a new phenomenon. Latent shows that the "Gastroparesis" cluster started forming in January 2023, growing at 30% month-over-month.

The analyst checks the Source Inspector and finds several posts from verified physicians on Twitter (#MedTwitter) corroborating the Reddit reports: "Seeing 2-3 ER admits a week for gastric obstruction in Ozempic patients."

5. The Actionable Insight

While the FDA label is silent, the Latent Signal is screaming. The analyst concludes:

  1. A regulatory label update is inevitable within 6-12 months.
  2. The "Ozempic is perfectly safe" narrative is about to break.
  3. Liability risks for Novo Nordisk are currently unpriced.

The Action: The fund shorts NVO and buys puts.

6. The Outcome

In September 2023, the FDA officially updates the Ozempic label to include a warning for Gastroparesis. CNN and major news outlets pick up the story. The stock price dips as the market reacts to the "news."

The hedge fund, having acted 5 months earlier based on the Latent Signal, realizes a 15% gain on their position.

7. Why this only works with StemeDB

Traditional databases would have failed the analyst:

  • Postgres: Would have overwritten the old label or required complex version-table joins that hide the conflict.
  • Vector DBs: Would have found "similar" posts but couldn't weigh them against the Authority of the FDA label.
  • Manual Review: The analyst would have spent 100 hours scrolling Reddit to find what StemeDB identified in 100 milliseconds.

Latent turned the knowledge lag into Alpha.