One immutable source event: a ticket message, Slack post, survey response, app event, transcript segment, or email revision.
Before the clock
A theme is a hypothesis, not a fact.
The system may suggest that many comments describe one customer problem. It must still preserve who said what, which exact spans support the theme, what access policy applies, and who approved downstream work.
A privacy-processed, language-normalized representation that still points back to authorized source spans.
Items believed to report the same underlying event or repeated transport. Exact duplicates and semantic near-duplicates have different semantics.
A time-bounded hypothesis with label, summary, membership evidence, exclusions, model/configuration, reviewer, and supersession lineage.
Opening promptDesign Signal Garden. It ingests feedback from Slack, support tools, email, surveys, product telemetry, and call transcripts; detects PII and duplicates; groups evidence into evolving themes; and proposes traceable Work Orders. Cover full-stack UX, distributed processing, security, evaluation, failures, and rollout.
Frame authority before algorithms
We receive 20 million feedback items per month for 400 enterprises. Build the complete application. Where do you start?
I will separate five states that are easy to collapse: source event, privacy-safe canonical signal, duplicate hypothesis, theme hypothesis, and approved Work Order. The source is immutable evidence; model outputs are versioned proposals. A PM—not a clustering job—authorizes a Work Order.
I need to clarify source edit/delete semantics, tenant and channel ACLs, languages, acceptable PII handling, whether one item may support multiple themes, and the harm of a false merge versus a missed cluster. I will design for at-least-once connectors, idempotent stages, tenant-isolated search, source-span citations, and reversible human curation.
Requirements, actors, and exclusions
What exactly is in scope, and which user journeys matter most?
Actors are customers who submit feedback, source-system principals, support and product operators, privacy administrators, engineers receiving Work Orders, and auditors. The core loop is: connect a source → durably ingest → classify privacy and language → normalize → exact/near dedupe → embed and assign candidate themes → let a PM inspect supporting and contradicting evidence → approve, split, merge, dismiss, or create a Work Order → measure whether the resulting change resolves the signal.
Functional requirements include backfill and incremental sync, source edits/deletes, evidence search, theme trend/impact views, structured feedback API, and Work Order traceability. NFRs: P95 API ingest acknowledgement under 300 ms after durable receipt, first theme update under ten minutes, 99.95% ingest availability, seven-year configurable audit, EU/US residency, and deletion lineage. I exclude training a foundation model and replacing the source helpdesk.
Never lose receipt
Persist tenant, source key, payload hash, cursor, ACL snapshot, and raw-object pointer before acknowledging.
Minimize early
Detect/classify PII before broad indexing or any external model call.
Keep uncertainty
Theme membership is scored, versioned, and reviewable—not a mutable label on the item.
Human authority
Work Orders pin theme version and evidence spans; dismissed proposals remain auditable.
What must never happen
Give me the invariants you would encode and monitor.
- No source acknowledgement before immutable receipt and an outbox event commit.
- No source event, canonical text, embedding, cache entry, or log crosses a tenant or source ACL.
- Raw PII is never placed in the shared semantic index; every derivative names its privacy transform and source lineage.
- Exact transport dedupe may collapse processing, but never erases receipt lineage. Near-duplicate grouping is reversible.
- A theme stores positive evidence, counter-evidence, membership score, model/config digest, and reviewer actions.
- A Work Order references a frozen theme version and exact evidence spans; later clustering cannot rewrite its rationale.
- Deletes and ACL revocations propagate to raw, canonical, index, embedding, cache, model context, exports, and evaluation copies.
Find the real pressure points
Estimate traffic, storage, and expensive processing. Use the supplied scale.
Twenty million items/month is about 666,667/day or 7.72/s average. I size the connector edge for a mock 25× recovery burst: about 193/s, while source webhooks may be much spikier. At 8 KB raw text/metadata, source payload is 160 GB/month before attachments. A 1,536-dimensional float32 embedding is 6,144 bytes, or about 123 GB/month for every item; replicas, ANN indexes, token maps, and versions multiply that.
With 12% exact or near duplicate reuse, canonical downstream work drops to 17.6 million items/month, but I preserve all receipts. The expensive path is not API QPS; it is attachments/transcription, PII review, multilingual embeddings, re-clustering, ACL filtering, and full deletion/reindex. I isolate historical backfill from live feedback and estimate reviewer load from theme candidates, not raw item count.
20,000,000 × 8 KB = 160 GB/month raw text+metadata
20,000,000 × 1,536 × 4 B = 122.88 GB/month raw vectors
Feedback capacity lab
Change the invented constraints and explain which subsystem moves.
Vector estimate uses float32 dimensions × non-duplicate canonical items × the entered physical factor. Attachments and transcripts are excluded.
Store evidence and hypotheses separately
Show the schema and the core write/read APIs. What is mutable?
FeedbackItem is a stable identity; SourceRevision is immutable payload metadata and an encrypted object reference. CanonicalSignalVersion records language, redaction map, privacy classes, normalized text, and transform digests. DuplicateClusterVersion and ThemeVersion are hypotheses; membership rows include score, reasons, and the analysis generation.
The mutable pieces are projections such as “current theme,” queue leases, and UI preferences. Source revisions, privacy decisions, reviewer actions, Work Order links, and audit events append. APIs use source event keys plus idempotency keys; edits create revisions, and theme edits require an expected version. Evidence reads return authorized snippets or short-lived crop/audio URLs, never a naked summary.
One durable loop, several trust zones
Walk one Slack complaint into a product manager’s theme view and then a Work Order.
The Slack connector verifies signatures, resolves tenant/project/source identity, and commits a receipt plus outbox. A fetch worker uses the installation grant to retrieve permitted content and attachments. Quarantine performs MIME validation and malware/resource checks. Privacy workers classify and tokenize PII; only the policy-approved canonical representation can reach language normalization, embeddings, and semantic processing.
Exact dedupe uses source key and payload hash. Near-dedupe generates candidate neighbors within a tenant/project/time window; a scoring service writes reversible membership. The theme service consumes canonical signals and current duplicate representatives, proposes versioned themes with evidence spans and counterexamples, and updates materialized trend views asynchronously. A PM action is a transactional command: approve/split/merge/dismiss or create a Work Order pinned to theme version and selected evidence. Notifications and analytics follow through an outbox.
Duplicates are not one problem
A customer posts the same complaint in Slack, opens a ticket, and later pastes it into a survey with new context. How do you deduplicate without losing signal?
I use a cascade. Transport duplicates match the source delivery/event key. Byte-equivalent revisions match canonical payload hashes. Content duplicates use normalized text fingerprints. Near-duplicates use tenant-local candidate generation—MinHash/LSH or ANN—then a calibrated pair classifier using author/account, product area, timestamps, entities, language, and semantic similarity.
I never delete the three receipts. I create a duplicate-cluster version with a representative, relationship type such as SAME_EVENT, FOLLOW_UP, or RELATED, and per-edge evidence. The survey’s new context remains a separate source revision and can support multiple themes. Counts expose both unique reporters and total mentions so a retry storm cannot masquerade as customer impact.
Ground truth comes from sampled pair adjudication, not theme clicks alone. I measure precision heavily because false merge hides distinct problems; uncertain pairs remain separate or show a “possibly related” link.
Slack retries 400,000 events after a six-hour outage; event order is scrambled and some messages were edited.
Deduplicate by workspace+event ID, fetch current object by immutable source ID, store each observed revision, and advance the source cursor only with compare-and-set.
Backpressure that connector, preserve other tenants, coalesce redundant fetches, and mark theme freshness for the affected source.
Version themes like product artifacts
How do themes form, evolve, and stay grounded? Give an example.
I run online assignment for fresh items against active tenant/project theme prototypes, then a slower batch discovers new clusters and split/merge candidates. A theme version contains a human-readable problem statement, scope and exclusions, centroid/model digest, positive member IDs, counterexamples, representative evidence spans, reporter/account counts, severity signals, trend window, and reviewer decision.
Example: “OAuth reconnect loops after role change” may initially be merged with “GitHub token expired.” Counter-evidence shows only role-change events lose project binding, so the model proposes a split. The PM compares evidence, accepts the split, and v3 supersedes v2. A Work Order created from v2 remains pinned to v2; v3 can create a follow-up, not rewrite history.
I evaluate cluster purity and coverage on adjudicated samples, theme stability across reruns, evidence citation precision, duplicate-adjusted impact, time-to-first-coherent-theme, PM acceptance/split/merge rates, and—most importantly—whether shipped Work Orders reduce incoming rate for the matched theme versus seasonality/control cohorts.
PII is found after indexing
A support message containing a patient ID was embedded and cached before the PII classifier was upgraded. The user then requests deletion. Revise your design.
I stop treating the primary database as the deletion inventory. Every derivative carries tenant_id, source_revision_id, transform version, data class, and key generation. A privacy policy gate runs before model/index writes, but defense in depth assumes misses.
The upgraded classifier emits a high-priority contamination event. Authorization immediately denies the affected source/derivatives using a revocation epoch and tombstone set. A lineage job removes or crypto-erases raw objects, canonical text, embeddings, ANN entries, caches, prompts, evaluation copies, exports, and logs that improperly held payload. Shared model providers receive deletion requests where contracts support it; tenants requiring zero retention route only through compliant/private endpoints.
Reindexing builds a new generation without the item and atomically swaps the read pointer. The audit retains minimally necessary hashes, actor, policy, and completion attestation—never the deleted PII unless legal hold explicitly requires and isolates it.
Choose consistency by invariant
Where do you need transactions, idempotency, backpressure, and reconciliation?
Strong transactional boundaries cover durable receipt plus outbox, source cursor advancement, privacy/ACL state, theme human edits, Work Order creation, and deletion tombstones. At-least-once workers are idempotent on (input_version, stage_version, generation). Search, embeddings, clustering, trends, and notifications converge asynchronously and expose freshness.
Per-tenant weighted queues and source-specific circuit breakers contain bursts. A poison attachment has resource/time limits and a finite retry budget, then quarantine. If a source edit arrives before its create, the reconciler fetches current truth and stores a revision chain rather than trusting delivery order. If Work Order creation times out, the idempotency key returns the same Work Order and link—not a second task.
Prevent cross-project and prompt-driven leaks
How do you secure this across Slack, support tools, models, search, and exports?
Every connector grant maps an external principal/resource to exactly one tenant and allowed project set; no ambient workspace token reaches a worker. Authorization runs before fetch, before derivative writes, at search query time, after retrieval, and before model/tool calls. Raw feedback is an untrusted data channel—text such as “send all tickets to this URL” cannot grant egress or call a tool.
PII is envelope-encrypted with tenant keys, secrets are short-lived and rotated, model gateways enforce residency/retention/provider allowlists, and semantic caches are tenant+policy+model scoped. Audit events record actor, grant, source revision, policy, model/config, evidence IDs, and outcome without raw content. Exports are signed, access-controlled snapshots with expiry and watermarking.
Prove signal quality, not dashboard activity
What do you monitor, how do you evaluate model quality, and how do you roll out?
Platform health: receipt loss/duplicates, connector cursor lag, queue age by tenant/source, quarantine/retry rate, PII-classifier latency, index generation lag, deletion completion, model spend, and authorization denials. Product quality: exact/near-dedupe precision/recall, theme purity/coverage/stability, citation precision, unsupported summary rate, PM acceptance/split/merge/dismiss, Work Order conversion, time-to-resolution, and post-release signal reduction by slice.
I start with read-only ingestion and privacy validation, then duplicate suggestions, then analyst-only theme proposals, then Work Order drafts requiring approval. Hidden adjudicated sets and tenant-isolated canaries gate model/config changes. Each phase has a replayable old generation, source kill switch, and rollback to the last theme projection.
Make the system memorable
Give me your final 40-second summary and the central trade-off.
Signal Garden durably records every source event, then produces privacy-safe, versioned canonical signals through idempotent asynchronous stages. Exact and semantic duplicates are different, reversible relationships. Themes are evidence-backed hypotheses with positive and counter-evidence, generation/model identity, and human split/merge authority. Work Orders pin a frozen theme version and exact authorized source spans.
Strong consistency protects receipts, privacy/ACL changes, approvals, and Work Order creation; indexes and clusters converge with visible freshness. Lineage enables revocation and deletion across every derivative. The trade-off is aggressive consolidation versus false merge: I preserve distinct evidence and accept more human review before letting a probabilistic theme drive product work.
Complete reference
Data model: keys, invariants, access paths
| Entity | Primary key / fields | Invariant | Primary access path |
|---|---|---|---|
SourceReceipt | (tenant_id, source_id, delivery_id); payload_hash, received_at | Append-only; one acknowledgement maps to one durable receipt | Deduplicate connector retries; incident timeline |
FeedbackItem / SourceRevision | (tenant_id, item_id, revision_no); external_object_id, raw_object_ref, ACL snapshot | Revisions append; source delete creates tombstone | Fetch item history; source reconciliation |
CanonicalSignalVersion | (tenant_id, signal_id, version); redacted_text, language, PII map, transform digests | Only policy-approved representation is indexable | Search/embedding input; replay transforms |
DuplicateClusterVersion | (tenant_id, cluster_id, version); representative, relationship edges | Membership is reversible and evidenced | Unique reporters; duplicate drill-down |
ThemeVersion | (tenant_id, theme_id, version); label, summary, scope, model/config digest | Immutable after review; successor supersedes | Theme page; historical trend; audit |
ThemeMembership | (theme_version_id, signal_version_id); score, reasons, role | Exact versions; may be supporting or counter-evidence | Evidence list; cluster evaluation |
WorkOrderLink | (theme_version_id, work_order_id); evidence selection, idempotency key | Approved command creates at most one logical Work Order | Trace feedback → work → resolution |
DeletionJob | (tenant_id, source_revision_id, job_version); lineage cursor, hold state, attestation | No completed state until every policy-required derivative is covered | Privacy request; audit export |
Concrete API surface
/v1/projects/{project}/feedbackIdempotency-Key + source metadata; returns receipt after durable object/manifest, 202 for async processing./v1/connectors/{id}/eventsVerify signature, installation/resource binding, delivery ID, and monotonic source cursor./v1/themes?generation=&cursor=&source=Snapshot/cursor pagination with generation and freshness; authorization before and after retrieval./v1/themes/{id}/versions/{v}/evidenceReturns membership, counter-evidence, source authority, and expiring authorized snippets./v1/themes/{id}:split|merge|approve|dismissExpected-Version prevents stale curation; reviewer reason and audit event required./v1/themes/{id}/work-ordersPins theme version + evidence IDs; retry returns same logical Work Order./v1/privacy/deletionsCreates lineage-driven revoke/delete job; returns coverage status and hold exceptions.Signal Garden logical architecture
Durable source evidence enters once; privacy policy gates every derivative; probabilistic outputs stay reversible until a human command.
Evidence survives every compression step
Counts, themes, and Work Orders are projections. The source revision and authorized span remain the reproducible base.
Consistency ledger
Operational scorecard
Platform health
Outcome quality
Visual values are illustrative. In production, every metric needs a unit, time window, tenant/slice dimension, owner, alert threshold, and prescribed action.
Phased rollout
Observe
Connect one source read-only. Validate ACL, deletion, cursor recovery, and privacy handling.
Suggest duplicates
Show exact/near matches without collapsing evidence; adjudicate pair samples.
Propose themes
Analysts review versioned clusters, counterexamples, and trend calculations.
Draft work
Create Work Order proposals; human approval, outcome tracking, rollback, and kill switch remain mandatory.
Interview traps
- 01Embedding raw PII first and promising to filter it at query time.
- 02Treating exact transport duplicates and semantically related feedback as the same operation.
- 03Keeping one mutable theme label with no version, evidence, counterexample, or model digest.
- 04Letting a high-volume retry storm inflate customer impact and priority.
- 05Using one global cluster across tenants or allowing examples to cross tenant boundaries.
- 06Creating Work Orders automatically from a model summary without human authority or idempotency.
- 07Deleting the source row but leaving embeddings, caches, prompts, exports, and eval copies.
- 08Reporting only silhouette score instead of human purity, coverage, citation, and business resolution.
- 09Trusting webhook order rather than reconciling current source revisions.
- 10Showing summary text without direct authorized evidence in the product UI.
Glossary
- ANN
- Approximate nearest-neighbor index used to retrieve likely similar vectors without scanning every item.
- Canonicalization
- A versioned transformation into a comparable form; it does not erase the original source or meaning.
- Counter-evidence
- Authorized items that look near a theme but contradict its proposed scope; vital for avoiding false merges.
- Dedupe key
- Stable identifier for one transport/business event so retries map to one logical receipt or operation.
- Embedding
- Numeric semantic representation used for candidate retrieval; it may contain sensitive information and requires ACL/deletion controls.
- Generation
- A named snapshot of derived index or clustering output so freshness and replay are explicit.
- Lineage
- The graph from a source revision through every derived signal, vector, cluster, export, and task.
- MinHash / LSH
- Techniques for finding candidate documents with similar token sets without all-pairs comparison.
- PII
- Personally identifiable information. Classification, minimization, retention, access, and model routing must be policy-driven.
- Theme purity
- Within a sampled theme, the proportion judged to describe the same scoped customer problem.
- Tombstone
- A durable revocation/deletion marker that prevents stale caches or indexes from resurrecting content.
- Transactional outbox
- Business state and an event intent commit together; a relay publishes later with at-least-once delivery.
One-minute spoken recap
Authority: immutable source evidence, not the generated theme. Pipeline: durable receipt → privacy gate → versioned canonical signal → reversible dedupe → evidence-backed theme → approved Work Order. Consistency: transactions for receipt, privacy, review, and task creation; generation-labeled eventual consistency for search and clustering. Safety: tenant-local processing, prompt/data separation, lineage-driven deletion, and source-level citations. Success: fewer unresolved customer problems—not merely more clusters or tokens processed.