DocQuality: An Open-Source AI Tool That Audits Word Documents in Seconds
Document review is still a manual bottleneck in legal, procurement, and compliance workflows. A lightweight, self-hosted tool that combines LLM reasoning with deterministic rules gives teams a repeatable audit process without sending sensitive contracts to a third-party SaaS.
Manual review of contracts, bids, and official documents is slow, error-prone, and leaves no quantitative audit trail. DocQuality attacks all three problems by combining a large language model with a configurable rules engine. A user uploads a .docx file, describes the review requirements in natural language, and the system returns a hundred-point score with a four-tier rating, a detailed problem list, and specific fix suggestions.
The inspection engine runs across three dimensions: format specification (heading levels, numbering, punctuation), compliance risk (sensitive data, missing clauses, placeholder detection), and content consistency (terminology drift, logical contradictions, redundancy). Six industry-specific rule templates ship out of the box for advertising compliance, privacy, and contract review, and users can add custom rules through a keyword mode or full regex editor.
Under the hood, the stack is React 18, TypeScript, and Vite on the frontend with NestJS and SQLite on the backend. The AI layer speaks the OpenAI-compatible protocol and works with DeepSeek, Kimi, Tongyi Qianwen, or any custom endpoint. Reports export to HTML, PDF, Word, or CSV, and a built-in JitWord engine renders .docx files in the browser so teams can review findings without downloading the original.
LLM-based document review is most credible when paired with a deterministic rules engine; the LLM handles fuzzy judgment while rules catch mechanical errors like missing placeholders or formatting violations.
Self-hosting is the differentiator here. Most AI document tools are SaaS products that require uploading sensitive contracts to external servers, which is a non-starter for legal and government use cases.
The keyword-to-regex dual-mode rule builder lowers the barrier for non-technical compliance staff while still giving engineers full control, a design pattern that generalizes to any domain-specific auditing tool.