Why
v0.6.6 claimed "self-evolving" but the evolution pipeline only existed in the Python CLI. The HTML version — the one people actually see — was a static detector. Detect, display score, done. No rewrite. No compare. No learning loop.
One day of real usage exposed three problems:
- The evolution loop was missing the rewrite step. Users had to copy text to ChatGPT manually, rewrite, and paste back. The tool called itself "self-evolving" but the rewrite step was entirely external.
- "Who evolves?" had no answer. Detection rules never changed. The AI model never changed. What exactly was "self"?
- No compare, no evolution. Comparing required four manual steps — go to history, select old version A, select new version B, click Compare. Users wouldn't do it. No compares = no evolution data = weights never change.
Core Design Decisions
Who Evolves?
The scoring weights evolve. The 14-dimension detection engine is fixed (regex patterns, counting logic, thresholds). What changes are the per-dimension multipliers used to compute the total score — learned from rewrite history. Pure math, no AI.
The LLM handles rewriting (step 2). The evolution engine is statistics (step 4) — counting improvements per dimension, computing beta-smoothed improvement rates, classifying dimensions into proven / fragile / hard_to_improve / saturated. The engine never calls an API.
One sentence: Rules stay fixed. Weights self-calibrate. It learns what you can actually fix.
Why Separate Raw and Adaptive Scores?
If evolution deltas were computed from weighted scores, it would form a self-devouring loop:
high weighted score → small delta → dimension looks unimproved → weight drops → weighted score rises → delta shrinks further
Fix: Evolution always uses raw scores. Weights only affect the displayed adaptive score. detect() now outputs three data sets: rawPct, adaptivePct, and rawDims per dimension.
Why Auto-Compare?
Users won't click "Compare" manually. After saving a rewritten version, the system auto-finds the previous save, auto-compares, auto-writes the evolution log, and auto-triggers evolveEngine(). Save = Compare = Evolve.
The manual Compare tab remains — for cross-time comparisons or non-AI rewrites.
AI Rewrite Positioning
AI Rewrite is an optional shortcut, not a core capability. The full loop works without it:
Rewrite with any tool → Paste back → Detect → Save → Auto-Compare → Evolve
The built-in rewrite only saves copy-paste and ensures consistent prompt constraints.
Why Prompts Never Name Weak Dimensions
If the prompt says "Your Structure is weak (40/100), improve it" — the AI attacks Structure. Evolution data shows Structure → proven → weight up. Self-fulfilling prophecy.
Correct approach: "Improve this article" with hard constraints — no fabricated data, no fake citations, no keyword stuffing.
What Changed
1. Detection Engine
detect(text, evoWeights) — weights affect only adaptivePct. rawPct and dimension scores are untouchable.
2. JS Evolution Engine (600+ lines)
Browser-side evolution. Reads compare history from localStorage, classifies dimensions, adjusts weights.
| Condition | Behavior |
|---|---|
| < 5 compares | Cold start, no weight changes |
| < 8 rewrites (per dimension) | insufficient_data, weight 1.0 |
| Raw baseline ≥ 85 | Saturated, locked at 1.0 |
| β improve rate ≥ 80%, Δ ≥ 5 | Proven, weight 1.15–1.25 |
| Improve rate 50–80% | Fragile, weight 0.90–1.10 |
| Improve rate < 30% | Hard to improve, weight 0.85 |
| 3 consecutive stale rounds | Auto-reset to 0.95 |
Safety: ±0.05 max change per cycle, 0.85 floor, normalization to 14, Beta smoothing.
3. AI Rewrite Engine (180 lines)
Internal PM version uses server-side proxy (no API key needed). External version stores user's key in localStorage with CORS guidance.
4. Server Proxy Endpoint
POST /api/geo/ai-rewrite — proxies through local DeepSeek gateway at 127.0.0.1:8788. Key never exposed to browser.
5. Auto-Compare
Saving after AI rewrite triggers auto-compare with the previous version (within 1 hour). Compare result displayed inline with per-dimension deltas.
6. Import/Export
Evolution data exports as JSON. Re-import after cache clear. Warning displayed in History tab.
7. Bilingual UI
Header toggle switches all UI text between English and Chinese. Detection engine auto-switches dimension labels based on content language.
8. Compare Log Enhancements
Log entries now include source (ai_rewrite / manual_edit), model, accepted flag, and before_raw/after_raw dimension scores. Dual-write: server API + localStorage.
Bugs Found Under Pressure
Bug 1: L is not defined
The language-switch function L() was local to detect(). renderResult() also needed it. Crash on every Run Check. Fixed by extracting L() and _lastIsCN to global scope.
Bug 2: _isCN is not defined
copyResult() referenced a global _isCN that was never set in the external version. Fixed by using _lastIsCN.
Before / After
| Metric | v0.6.6 | v0.7.0 |
|---|---|---|
| Evolution | Python CLI only | Full HTML engine |
| Rewrite | Manual copy to ChatGPT | One-click AI (optional) |
| Compare | 4 manual steps | Auto on save |
| Data safety | Lost on cache clear | JSON import/export |
| Chinese support | Engine only | Full UI toggle |
| Scoring | Single score | Raw + adaptive dual-track |
Remaining Issues
- Cache clear loses data — import/export is a workaround. Cloud sync could be a PRO feature.
- Evolution needs accumulation — 5 compares for cold start, 8 per dimension for classification. Low-frequency users may never see results.
- AI Rewrite CORS — browser direct API calls may hit cross-origin restrictions. Users need proxy setup.
- Dimension cross-contamination — improving Structure may incidentally improve Readability. Statistics not perfectly clean. Deferred to v2.
FAQ
Q: Is GEO Auditor free?
A: Yes. MIT open source. The online detector at zhibi.xyz runs entirely in your browser with zero network calls. No registration, no limits.
Q: How is this different from Originality.ai / GPTZero?
A: Those tools detect if AI wrote something. GEO Auditor measures how well something is written for AI search engines to cite — 14 actionable dimensions from Conclusion-First to Anti-AI Voice. Plus it self-evolves: scoring weights learn from your rewrite history (5+ compares to activate).
Q: Can I train my own AI agent with this?
A: Yes. Run python3 geo_auditor.py --agent-prompt after accumulating rewrite data. The CLI exports writing rules derived from your evolution history — load them as your agent's system prompt to raise its baseline writing quality.
Q: Does the evolution engine need an API key?
A: No. The evolution engine is pure JavaScript math running in your browser. It reads from localStorage, classifies dimensions, adjusts weights. No API calls. The optional AI Rewrite button needs your own API key — but you can skip it and use any LLM tool you already have.