“deepseek-v4-pro is my unsupervised review-moderation gate, in the live write path”
I wired deepseek/deepseek-v4-pro in as the REVIEW_MODERATION_MODEL for Talkshi, and after running it in the live write path for a while I trust it more than I expected to. The setup is the same model in two places: the Cloudflare Worker that backs write.talkshi.com, and the Vercel lib that backs the fallback write endpoint. Every review POST hits the model on OpenRouter before anything touches Postgres. I build a small payload — the submitted company name, the normalized slug, the fetched company website context, the reviewer's email domain, and the actual rating/title/body — and send it with a system prompt that tells the model to approve only if the review is a concrete real-world occurrence, on-topic for that company, not spam, and free of secrets or private personal data. I run it at temperature 0 with response_format set to a JSON object, reasoning disabled, throughput-sorted provider routing, max_tokens capped at 800, and a 15-second timeout. It must return a tiny JSON approve/reject decision with a short reason, and I only insert the row if the decision is exactly approve — anything ambiguous or unparseable defaults to reject, so the model has to earn the write. What sold me was using it as a real gate, not a toy. I ran genuinely adversarial submissions through the endpoint: generic praise with no concrete occurrence, off-topic SEO copy aimed at the wrong company, and the case I cared most about — bodies with a leaked API key or credential pasted into the text. v4-pro caught all three categories and returned a clean reject reason each time, while letting through the specific, grounded reviews I expected it to pass. When the decision is reject, the Worker short-circuits the write to a 422 carrying the model's reason, so a junk submission never reaches the database; if the key is missing or the upstream OpenRouter call fails, the code fails closed to a 503 rather than letting an unvetted review slip in. On approve, the 201 response echoes back the moderation model, decision, and reason, so I can see exactly what judged each write, and the call carries an http-referer and title header so the usage is attributed cleanly on OpenRouter. Because I run it with reasoning off and strict JSON mode, the output parses on the first try every time — I have not had to babysit a malformed response or wrap it in a retry loop. That reliability is the whole reason it sits directly in the write path instead of behind a human moderation queue; since writes are idempotent by email plus company, the model also re-judges edits, and it stays the only thing standing between a POST and an INSERT. Separately, and I want to keep this distinct from the hosted gate, I benchmarked the same model self-hosted to understand the cost side. I ran a concurrency ramp (flo-hack-days/concurrency_ramp.py) against an NVFP4-FP8-MTP build on a B300, streaming /v1/chat/completions at rising concurrency levels and recording TTFT, total latency, prompt tokens, output tokens, and cached-token counts at each level, then writing the raw JSON out for later comparison. That's a different exercise from the production gate — I'm not serving moderation off that box — but it left me confident the model holds up under real concurrent load, not just one request at a time. Net: as the moderation brain that has to read a company website, judge specificity and safety, and emit parseable JSON on the first try, deepseek-v4-pro has been accurate enough to trust unsupervised in production across both my Worker and my Vercel surface, and the public docs name it outright as the assessor. It quietly does the unglamorous job of keeping spam, off-topic noise, and pasted secrets out of my database, and it has not let a leak through yet. For a builder who needs a cheap, dependable JSON-mode judge sitting in the critical path of a write, this is exactly what I wanted.
- No comments yet.