Partyhat Engineering
From one URL to a recommendation in thirty seconds
Partyhat finds the conversations where a real customer’s experience is worth sharing, suggests wording grounded in that experience, the way writing and search suggestions do, and leaves every decision with them. Partyhat never posts. This page covers how it works, and the decisions behind it.
- posts scored per run
- 1,000+
- to the first suggestion
- <3s
- full run across 12+ platforms
- 30s
- per moderation decision
- ms
The pipeline
-
Research
From one URL, extract the brand’s facts, voice, market positioning, and location.
-
Match
Find advocates whose interests and history suggest they already use the product.
-
Verify
The advocate confirms they have used it, and a short AI interview captures their real experience.
-
Discover
Search and score the most recent, relevant, and popular posts across a dozen-plus platforms in parallel.
-
Strategize
A multimodal pass over each thread decides between replying in it and starting a new post, using engagement patterns for the same niche and platform.
-
Suggest
Retrieval-grounded generation suggests wording in the advocate’s voice, consistent with their history, using only their verified experience and the brand’s facts.
-
Screen
The Partyhat Safety Encoder checks every suggestion before the advocate sees it.
-
Decide
The advocate sees the suggestion first. They edit it, rewrite it, or discard it, and nothing posts unless they choose to post it themselves.
Design decisions
Every system makes trade-offs. These are ours, and why we made them.
Encoders decide. Frontier models write.
Classification and routing run on our own fine-tuned DeBERTa-v3 encoders, served on Modal, which answer in milliseconds. Frontier models handle generation. Cases the encoders are unsure about go to higher-effort models, then to human labelers.
Trade-offWe maintain our own weights. In exchange, the decisions that run thousands of times per run are fast, cheap, and auditable.
Every run can be replayed.
Platform searches fan out through Kafka, and every run is logged. Our evals replay real production traffic instead of synthetic test sets, so a new model or component is judged on exactly what it would have seen.
Trade-offA durable event log costs more to run than in-process concurrency. It is also what makes every eval trustworthy.
Replays see only what the original run saw.
Each run records the snapshot of the brand–advocate–community graph it used, including the embedding version. Replays never see engagement that happened later.
Trade-offWithout this, future data leaks into the evals and every model looks better than it really is.
Train on the objective that matters.
We started with node2vec, but it optimizes for nodes that appear together, not for engagement, and it cannot embed new nodes. We replaced it with two-tower embeddings built from each node’s content and its graph neighborhood, trained on engagement and split by time. An ablation showed node2vec added nothing, so we removed it.
Trade-offRetrieval now depends on a trained model. That is why we version it.
Version embeddings instead of aligning them.
A retrain re-embeds every node with the new model, and the switch happens all at once. Old and new vectors are never mixed, and every graph snapshot records which version it used.
Trade-offFull re-embeds take compute. They are simpler and safer than aligning embedding spaces.
Leaderboards suggest candidates. Our evals choose.
Each day, the system tries promising new models and components against replayed traffic. Blinded LLM judges score relevance, strategy, accuracy, naturalness, helpfulness, and safety, and the results go into a quality and cost report.
Trade-offPublic benchmarks are a starting point, not a decision. Nothing ships on a leaderboard score alone.
Estimate what you can’t observe, and measure how reliable the estimate is.
We only see engagement for comments that were actually posted. For the rest, we estimate it from the closest real comments on the same platform. We check those estimates against real outcomes in each segment, by platform, niche, and thread age, and only trust them where they have proven reliable.
Trade-offLess coverage, more honesty. Segments where the estimates are unreliable are left out.
People make the final call.
Advocates approve every message, and the hardest automated decisions go to human labelers. Their decisions become gold labels that seed the next round of evals, so the system improves per brand, per advocate, and across the whole system.
Trade-offHuman review adds a step. It is also the main source of the system’s accuracy and of the trust people place in it.
Safety is part of the architecture
Partyhat began as a content moderation layer, and the Partyhat Safety Encoder still runs at the center of the system. It catches as much harmful content as OpenAI’s omni-moderation with 43% fewer false refusals, and it screens every suggestion before a person sees it. The rules it enforces are set out in our Code of Conduct.
Stack
- SvelteKit
- Electron
- Node.js
- MongoDB
- Neo4j
- Kafka
- AWS ECS Fargate
- Modal
- RunPod
- Hugging Face
- Stripe
Talk shop
Building something similar, or investing in this space? We’re glad to compare notes.
Schedule a call