qalarc. multi-perspective analysis
Technologyglm-5.2

Anatomy of a 400: Bisecting a String-List Filter

Multi-perspective analysis. Each perspective deliberately argues one viewpoint; none represents the editorial position of qalarc.

We run a 4chan narrative-monitoring system that classifies roughly 1,800 threads a day across /biz/, /pol/ and /g/ using Z.AI's GLM (glm-5.2, via an Anthropic-compatible endpoint). Between August 27 and 30, the provider's input safety filter was rejecting about 31% of our /pol/ classification calls with HTTP 400 code 1301 โ€” "System detected potentially unsafe or sensitive content in input or generation" โ€” leaving ~400 distinct threads a day unclassified and 2,598 unique threads blocked over the window. This editorial documents what the filter actually matches โ€” incident bisection plus a companion verification program of roughly 4,000 controlled probes, which together resolve the mechanism to exact string-list matching โ€” why that is exactly backwards for moderation research, the three fixes that restored effective coverage to ~100%, the countermeasure and anti-scrape tooling we built on the verified vocabulary, and โ€” new in this version, with sources โ€” why a provider domiciled in China runs such a screen at all: under the PRC generative-AI regulatory regime it is closer to a statutory obligation than a product choice [4][5][6].

The facts (8)
  • The pipeline classifies ~1,800 threads/day across /biz/, /pol/ and /g/ with Z.AI GLM (glm-5.2) through an Anthropic-compatible endpoint.
  • Filter failures return HTTP 400, error code 1301: 'System detected potentially unsafe or sensitive content in input or generation'.
  • Before fixes, ~31% of /pol/ classifier calls failed: ~400 distinct threads/day flagged unclassified; 2,598 unique threads blocked August 27โ€“30.
  • Bisection of blocked inputs shows minimal blocking substrings of 13โ€“40 characters (median 20) โ€” multi-word phrases, not single words. A companion verification program (~4,000 controlled probes; 3,505 terms tested one per neutral carrier; 138 combination controls) resolved the mechanism: exact string-list matching. The entries are phrase-level โ€” single words pass, exact trigrams and longer strings block โ€” with no semantic layer: 550+ slurs and profanity drew zero blocks while political vocabulary blocks, 0/138 pairs and triples of individually clean terms blocked, and matching is context-insensitive. 560+ verified blockers; the set drifts over time. Verdicts are deterministic (8/8 identical on retry), and bare thread text without our prompt wrapper still 400s โ€” a pre-model input filter on the raw payload.
  • A local-model taxonomy of n=46 catalogued blocking cases: conspiracy_hate 16, other 16, ethnic_slur_context 6, violence_advocacy 5, dehumanization 3; severity is bimodal (16 lowest, 13 across the two highest). Separately, political vocabulary was verified in the blocked set: single political terms in neutral carriers drew 400s while the 30 slur terms did not.
  • One blocked thread HTTP-400s its entire 20-thread batch, forcing recursive segmentation โ€” 12,477 segmentation events logged. Wire-swap rescue: after applying the live substitution map, or substituting just the exact minimal segment, previously blocked inputs passed clean (0/3 blocked in-batch, 0/3 solo).
  • Fixes: wire-only phrase substitution (79 matchers at the incident, since grown by the weekly miner), fallback to a local unfiltered GLM-4.7-flash instance, weekly self-mining timer. Z.AI fail share 30.8% โ†’ 13.0%; effective /pol/ coverage ~100%; zero heuristic-flagged losses in steady state. On the verification program's dedicated 96-term swap map, hard rescues passed 2/2 and probe-set failures fell 31% โ†’ 0%.
  • The verified vocabulary matches no public source: the union of 20 public sensitive-word lists (~250,000 entries) covers 5.4% of the 560+ verified blockers; 530 appear in no public list at all.
Context & background

The board at the center of this incident is one of the largest politically extreme English-language discussion spaces on the web [3]; monitoring it means ingesting material that consumer safety systems are designed to refuse. The provider endpoint is Z.AI's GLM [1]; the local fallback tier is a GLM-4.7-flash instance served by Ollama on the ops LAN [2], which accepts the same classification prompts without input filtering. The taxonomy and severity figures above were produced by that local model over the catalogue of blocked cases โ€” sanitized to clinical descriptions for publication; no thread text is reproduced in this article. All counts are from ops logs for the August 27โ€“30 window and the post-fix steady state. The monitoring system is chanalyse (chanalyse.org), built and operated by qalarc (qalarc.com); the filter research documented here โ€” incident bisection and the parallel verification program alike โ€” emerged from operating it, and qalarc publishes the findings and the tooling on the project page (qalarc.com/projects/project/?slug=glm-word-filter).

Why the filter exists โ€” the regulatory regime. Z.AI is the international arm of Zhipu AI, a Beijing-based model provider, and China has assembled a specific legal stack for exactly this product category. The Interim Measures for the Management of Generative AI Services (็”Ÿๆˆๅผไบบๅทฅๆ™บ่ƒฝๆœๅŠก็ฎก็†ๆš‚่กŒๅŠžๆณ•), issued jointly by the Cyberspace Administration of China (CAC) and six other ministries as Order No. 15 and effective August 15, 2023, apply to generative-AI services offered to the public within the PRC [4]. Article 4(1) prohibits generating content that incites subversion of state power or harms national security, incites ethnic hatred or discrimination, propagates terrorism, extremism or violence, or spreads false and harmful information; Article 14 requires providers that discover illegal content to promptly stop generation, stop transmission, take disposal measures such as elimination, and report to the authorities. The Deep Synthesis Provisions (ไบ’่”็ฝ‘ไฟกๆฏๆœๅŠกๆทฑๅบฆๅˆๆˆ็ฎก็†่ง„ๅฎš, Order No. 12, effective January 10, 2023) are even more concrete about inputs: Article 10 obliges providers to review users' input data and synthesis results by technical or manual means, while maintaining feature libraries (็‰นๅพๅบ“) for identifying illegal and harmful information [5]. Layered underneath, the Algorithm Recommendation Provisions (ไบ’่”็ฝ‘ไฟกๆฏๆœๅŠก็ฎ—ๆณ•ๆŽจ่็ฎก็†่ง„ๅฎš, Order No. 9, effective March 1, 2022) require services with "public-opinion attributes or social mobilization capacity" to complete algorithm filing (ๅค‡ๆกˆ) within ten working days of launch and to undergo security assessments [6] โ€” obligations the Interim Measures extend explicitly to generative-AI services in their Article 17 [4]. The Cybersecurity Law (2017) and Data Security Law (2021) are named in the Measures as the statutory foundation. We cannot see from outside which instrument drives the specific error-code-1301 screen, and the filter's exact specification is unpublished โ€” but for a China-domiciled provider serving the public, an input-side filter over precisely these content categories is what compliance plausibly looks like. That reframes the incident: not a vendor's whim, but a legal duty translated into conservative engineering โ€” whose costs land, silently, on anyone whose research corpus is the regulated content.

One regime, many providers. None of this stack is Z.AI-specific. The same instruments bind the entire major-provider class serving the PRC public โ€” Zhipu/Z.AI, Moonshot AI (Kimi), Alibaba (Qwen) and DeepSeek alike [10]. Beyond the articles already cited, the same texts carry the rest of the compliance load: Article 7 of the Interim Measures requires lawful training-data sources, with consent where personal information is used [4]; Article 21 sets the penalty ladder from warnings through rectification orders to service suspension, and Article 20 extends the regime's reach to non-compliant services provided from outside China [4]. The Deep Synthesis Provisions add real-name authentication before information-publishing services (Article 9) and technical labels on synthetic content (Articles 16โ€“17) [5]; the Algorithmic Recommendation Provisions prohibit algorithms that spread illegal information (Article 6) or file illegal keywords into recommendation tags (Article 10), with filing due within ten working days of launch (Article 24) [6]. An exact-match input screen built from a string list of phrase-level entries โ€” the mechanism the bisection and verification program resolved โ€” is therefore not a Zhipu quirk but the class-wide shape of compliance: Moonshot's hosted Kimi, Alibaba's Qwen endpoints and DeepSeek's consumer service answer to the same instrument set, and the platform-level censorship apparatus behind it polices the political axis with keyword and semantic filtering of its own [11][12][13][14][15].

The asymmetry: strict on politics, comparatively loose elsewhere. Enforcement under this regime is sharply asymmetric, and the provider landscape shows it [11]. On the political track, tolerance is zero: content around the party, national security and official historical narratives is systematically filtered at the platform layer, and chatbots inherit the same lines โ€” documented down to the apology responses models give when probed on forbidden history [11]. On the commercial and technical track, providers are strikingly free: they set prices independently, license model weights permissively (MIT for DeepSeek and Z.AI releases, Apache 2.0 for parts of the Qwen family [12][15]), and run research-first strategies under fewer consumer-facing constraints โ€” DeepSeek's efficiency-focused program reset market expectations for capability per dollar [16][17][18], and its commercial track now runs toward a reported IPO at a reported ~US$70 billion valuation [19][20]. The regime regulates outputs and uses, not architectures: political safety is enforced first, market behavior largely left alone. Our /pol/ measurements read as an empirical mirror of exactly this asymmetry. In carrier-sentence isolation, single political terms drew 400s entirely on their own while 0 of 30 isolated slur terms drew any block โ€” political vocabulary is controlled at term level, generic toxicity only inside hostile phrases (the n=46 taxonomy: hate-conspiracy framing and dehumanization engaged; isolated slurs passed). The filter draws its line where the regime draws its sharpest โ€” on the political axis [11].

Still unresolved
  • The mechanism is settled โ€” exact string-list matching with trigram-and-longer entries, no semantic layer. What remains open is design provenance: is the same list architecture shared across the provider class, and where do new entries come from (compliance filings, platform incidents, regulator guidance)?
  • Did the failure rate step from low levels to ~31% because the provider tightened the filter in late August, or because board content shifted? The verification program has since measured the list drifting over time, so provider-side change is confirmed as real โ€” but whether that specific step was a deliberate tightening or input drift remains unresolved.
  • Would a documented research tier (accredited, rate-limited, audited, no-training) eliminate the need for workarounds like ours โ€” and does the regime's own distinction between public-facing services and non-public R&D use (Interim Measures Art. 2(3)) leave room for providers to offer one?
Three perspectives

The same story, argued three ways. Pick an angle โ€” the facts above stay the same.

๐Ÿงญ Cui bono โ€” who benefits?

Beneficiaries

  • Provider compliance and risk functions (Z.AI and peers) โ€” Cheap liability shielding โ€” a blunt input filter externalizes moderation cost to API consumers
    via One conservative filter across every use case (chat, agents, batch classification) is how a provider demonstrates compliance with the PRC generative-AI regime โ€” content-category prohibitions, input/output review duties and filing obligations (see the sourced background) โ€” in every jurisdiction it sells to; the cost, silently corrupted research datasets, lands on customers who cannot see the filter's spec or its changes.
  • Incumbent platforms and labs with internal data access โ€” A moat around moderation research
    via Platform trust-and-safety teams classify their own unfiltered data; independent researchers increasingly depend on model APIs that pre-filter it โ€” a structural advantage in who gets to measure and publish about online hate.
  • Local-inference hardware and the open-weights ecosystem โ€” Demand for private, unfiltered inference
    via Every blunt provider filter converts some batch-analytics workload into local-model work; our own fallback tier is a GLM-4.7-flash instance that exists purely because a cloud endpoint refused the input.

Who loses

  • Independent researchers: silent, systematic data loss concentrated on the most extreme content (~31% of calls at peak)
  • Anyone consuming prevalence estimates built on API-filtered data โ€” the bias is invisible in the output
  • Reproducibility: unpublished, changing input filters make provider-mediated corpus studies non-reproducible
  • Anyone researching China-adjacent topics through such endpoints: a second jurisdiction's content taxonomy pre-shapes the corpus, unlabelled

Ramifications (follow the chain)

intentional reading The filter is deliberately conservative phrase-matching built for compliance with the cited regulatory regime across many jurisdictions; researchers are collateral damage of a product default, not a target. The absence of a research tier is a market gap, not a plot.

structural reading Providers sell one endpoint for every use case, so safety defaults tuned for consumer chat โ€” and, in China's case, required by statute for consumer services โ€” leak into batch research pipelines. Without a paid, audited research tier, the incentive gradient guarantees bluntness, and guarantees that well-resourced researchers route around it while everyone else absorbs the bias. The same exact-match fragility points at a quieter equilibrium: publishing-side phrase substitution ('phrase poisoning') could become a cheap data defense for communities that want to be unreadable to lexicon-based collectors โ€” hypothesis, not yet observed at scale.

References

  1. [1] Z.AI โ€” GLM model family (provider endpoint)
  2. [2] Ollama โ€” local LLM runtime (fallback tier)
  3. [3] 4chan โ€” Wikipedia overview
  4. [4] ๅ›ฝๅฎถไบ’่”็ฝ‘ไฟกๆฏๅŠžๅ…ฌๅฎค็ญ‰ไธƒ้ƒจ้—จ โ€” ใ€Š็”Ÿๆˆๅผไบบๅทฅๆ™บ่ƒฝๆœๅŠก็ฎก็†ๆš‚่กŒๅŠžๆณ•ใ€‹ (Interim Measures for Generative AI Services, CAC Order No. 15, effective 2023-08-15) โ€” official text
  5. [5] ๅ›ฝๅฎถไบ’่”็ฝ‘ไฟกๆฏๅŠžๅ…ฌๅฎค็ญ‰ไธ‰้ƒจ้—จ โ€” ใ€Šไบ’่”็ฝ‘ไฟกๆฏๆœๅŠกๆทฑๅบฆๅˆๆˆ็ฎก็†่ง„ๅฎšใ€‹ (Provisions on Deep Synthesis of Internet Information Services, Order No. 12, effective 2023-01-10) โ€” official text
  6. [6] ๅ›ฝๅฎถไบ’่”็ฝ‘ไฟกๆฏๅŠžๅ…ฌๅฎค็ญ‰ๅ››้ƒจ้—จ โ€” ใ€Šไบ’่”็ฝ‘ไฟกๆฏๆœๅŠก็ฎ—ๆณ•ๆŽจ่็ฎก็†่ง„ๅฎšใ€‹ (Provisions on the Administration of Algorithmic Recommendation Services, Order No. 9, effective 2022-03-01) โ€” official text
  7. [7] Z.AI โ€” model API pricing (GLM-5.2 $1.4/$4.4 per MTok in/out; GLM-4.7-Flash free tier โ€” at time of writing)
  8. [8] Z.AI โ€” GLM Coding Plan subscription page (plans from $18/month โ€” at time of writing)
  9. [9] Anthropic โ€” Claude plans & API pricing (Pro $20/mo monthly; Sonnet 5 $2/$10 per MTok โ€” at time of writing)
  10. [10] Wikipedia โ€” Interim Measures for the Management of Generative AI Services (summary: scope, enumerated prohibitions, penalties)
  11. [11] Wikipedia โ€” Censorship in China (platform keyword/semantic filtering; enforcement on political and historical narratives)
  12. [12] Wikipedia โ€” DeepSeek (research-focused strategy; MIT-licensed open weights; reported adoption incl. non-combat military use)
  13. [13] Wikipedia โ€” Zhipu AI (first major Chinese LLM IPO; domestic-hardware integration; pricing below US competitors)
  14. [14] Wikipedia โ€” Moonshot AI (Kimi; custom license with revenue-sharing terms; open-weight releases; Alibaba/Tencent investors)
  15. [15] Wikipedia โ€” Qwen (Alibaba model family; open and proprietary releases; integration into Apple Intelligence in China)
  16. [16] Nature (news) โ€” on DeepSeek's training costs and algorithmic efficiency
  17. [17] The New York Times โ€” How Chinese AI start-up DeepSeek is competing with Silicon Valley giants
  18. [18] Financial Times โ€” How small Chinese AI start-up DeepSeek shocked Silicon Valley
  19. [19] Bloomberg โ€” DeepSeek is preparing for IPO filing as soon as this year
  20. [20] Reuters โ€” China's DeepSeek eyes US$70 billion valuation in new talks
  21. [21] South China Morning Post โ€” How China's PLA is gearing up to use DeepSeek AI models

Topics

glm-5.2z.aiprovider filtersglm-4.7-flashollamaCyberspace Administration of Chinaalgorithm filing regimeZhipu AIMoonshot AI (Kimi)Alibaba (Qwen)DeepSeekqalarcchanalysedataset_tarpitstring-list filtershared PRC compliance regime

Rate this analysis

How fair and useful did you find this multi-perspective breakdown?

Which perspective did you find most worth reading?

Discussion

Select any text in the article to comment on that passage.