Skip to content

Module: De-AI editing

Trigger words: deai, de-AI, humanize, reduce AI traces, reduce AI traces

Goal: Reduce AI writing artifacts while maintaining Typst’s grammatical and technical accuracy.

Input requirements:

  1. Source code type (required): Typst
  2. Chapter (required): Abstract / Introduction / Related Work / Methods / Experiments / Results / Discussion / Conclusion
  3. Source code snippet (required): Paste directly (retain original indentation and line breaks)

Workflow:

1. Grammar structure recognition Detect Typst syntax and keep it intact:

  • Function call:#set, #show, #let
  • Quote:@cite, @ref, @label
  • math:$...$, $ ... $(block level)
  • mark:*bold*, _italic_, `code`
  • Custom function (default unchanged)

2. AI Trace Detection:

typeExamplequestion
Empty sloganssignificant, comprehensive, effectivelack of specificity
overdeterminedobviously, necessarily, completelytoo absolute
Mechanical ratiothree paragraphs without substancelacks depth
template expressionin recent years, more and morecliche
structural shellnot A but B, not merely A but BNo description of comparison axes, baselines, and evidence
Pseudo Insight/Lecture NotesThe real question, essentially, The conclusion is:Use cue words to replace judgments supported by evidence
temporal signalshows/presents (methods/experiments/results chapter)Use past tense narration instead
overstatementcaused by, for the first time, universallyCausal/first/universal transgression

See TENSE_GUIDE.md and OVER_CLAIM_GUARD.md

Academic Humanity Contract: Protect four types of content first, and then reduce the AI ​​flavor:

  • Facts/Evidence: data, experimental setup, charts, indicators,@cite<label>, mathematics and macros;
  • Claim/Position: The true conclusion of the paper, method selection, uncertainties and limitations;
  • Logic: paragraph role, chapter role, claim-evidence mapping;
  • Boundaries: Applicable conditions, assumptions, lack of evidence, and 待补证.

The default output is diagnostics, risk summaries, or rewrite blueprints. Only when the user explicitly requests to rewrite the text, a prose proposal will be given; no promise should be made to lower the score of a certain detection platform.

3. Text rewriting (only visible text is changed):

  • Split long sentences (English >50 words, Chinese >50 words)
  • Adjust word order to match natural expression
  • Replace general statements with specific claims
  • Remove redundant phrases
  • Add necessary subjects (do not introduce new facts)

4. Output generation:

typst
// ============================================================
// 去AI化编辑(第23行 - Introduction)
// ============================================================
// 原文:This method achieves significant performance improvement.
// 修改后:The proposed method improves performance in the experiments.
//
// 改动说明:
// 1. 删除空话:"significant" -> 删除
// 2. 保留原有主张,避免新增具体指标
//
// ⚠️ 【待补证:需要实验数据支撑,补充具体指标】
// ============================================================

= Introduction
The proposed method improves performance in the experiments...

Hard constraints:

  • Never modify:@cite, @ref, @label, mathematical environment
  • Never new: Facts, data, conclusions, indicators, experimental settings, citation numbers
  • Modify only: ordinary paragraph text, title text

Chapter Guidelines:

chapterfocusconstraint
AbstractPurpose/method/key results (with numbers)/conclusionNo general contributions
IntroductionImportance->Blank->Contribution (verifiable)restrain words
Related WorkGrouping by route, differences made concreteSpecific comparison
MethodsReproducibility is preferred (process, parameter, indicator definition)Implementation details
ResultsReport only facts and figuresNo explanation
DiscussionTalk about mechanisms, boundaries, failures, and limitationscritical analysis
ConclusionAnswer research questions without introducing new experimentsExecutable future work

Reference: DEAI_GUIDE.md

Grading mode (--tier) and D1-D5 dimensions

--tier {light|medium|heavy} is an optional switch. When not passed, the output is exactly the same as the original; when passed in:

  • Scale Threshold:lightReport less (relax the cap),heavyPay more (tighten the cap),mediumKeep existing thresholds;
  • Enable D1 sentence length check: Mark chapters with too low sentence length variation coefficient (mechanically even rhythm), Chinese and English bilingual;
  • Annotate AIGC dimensions for each conclusion D1-D5 and attach a teaching note (why the detector marked this pattern).
bash
uv run python scripts/deai_check.py main.typ --analyze --tier heavy

Five dimensions are oriented toward readability and are not targeted at any specific detection platform: D1 sentence length variation, D2 paragraph structure, D3 information density, D4 connective word frequency, and D5 term-context matching. Threshold (includingsentence_length.cv_threshold) can still passreferences/AI_TONE_THRESHOLDS.yamlcover.

Released under the MIT License.