Skip to main content Switch to mobile version log-ai-compressor 3.4.0 Local log forensics: line numbers + sha256 per finding, offline re-checkable; no causal chain = INSUFFICIENT. Optional AI off by default, redacted excerpts only. Loghub benchmarks reproducible.
pip install log-ai-compressor==3.4.0 Copy PIP instructions
Every finding carries line numbers + the sha256 of the cited text. Change the cited text — line endings normalized — and verify returns TAMPERED.
v3.4.0 · 3-minute self-proof: pip install "log-ai-compressor==3.4.0" → copy the packaged sample → log-ai-compressor run examples/app.log -f json -o examples/app_report.json → log-ai-compressor verify --report examples/app_report.json → expected VERIFIED. The copy-paste block is below; no clone needed.
For ops / backend / security engineers reading logs. Analysis runs locally — 0 API calls, logs stay on your machine. The optional AI interpretation layer is off by default; if you enable it, only redacted excerpts are sent to the provider you configure, with preview and explicit consent before sending.
verify re-reads the raw log and checks every quote against the cited text. If the cited text was edited, it exits 1 — you never have to trust the tool. Line endings (CR/LF) are normalized per the stated contract and do not count as tampering.
Metric scope: PA 90.45% uses Loghub Content (timestamps/hosts/levels stripped, Drain protocol); raw PA is reported separately and is not comparable to Content. Same PA metric and annotated-line denominator, evaluated under different input protocols (Loghub Content vs raw); do not mix the two results.
Third-party full reproduction (2026-12-04): a non-author re-ran all 14 LogHub-2.0 holdout sets on an independent Windows machine: macro PA 90.45% / GA 95.20%, annotated lines 10,083,330, claim_ready=true. Public receipt: https://gitee.com/hu-chenyu-dev/log-ai-compressor/issues/IKWWD3#note_52604900. Claim wording is limited to offline non-LLM, 14 sets, Content PA/GA macro average, same protocol, third-party reproduction; not a global leaderboard rank.
$ log-ai-compressor verify --report examples/app_report.json 模式:复核已导出报告 对象:报告 app_report.json 证据:共 4 条引用,匹配 3 条,失配 1 条,源不可读 0 条,缺行号 0 条,缺摘要 0 条 自校验结论:TAMPERED # 退出码 1 ✗ MISMATCH c3801f905159 examples\app.log 期望 bc5b93cec7cde01c 实际 1b8242c1671f1e29 Key lines from the run (Chinese CLI; stdout + stderr, so the MISMATCH line may appear before or after the verdict): 4 quotes checked, 3 matched, 1 mismatched → verdict TAMPERED, exit 1. The full run also ends with a one-line explanation. Hashes and exit codes are byte-identical to what you will get; reproduce it with the cited-text edit below.
▶ Install & self-proof below · 中文 README
$ python -m pip install -i https://pypi.org/simple "log-ai-compressor==3.4.0" $ python -c "import log_ai_compressor, pathlib, shutil, os; os.makedirs('examples', exist_ok=True); shutil.copy(pathlib.Path(log_ai_compressor.__file__).parent/'data/examples/app.log', 'examples/app.log')" $ log-ai-compressor run examples/app.log -f json -o examples/app_report.json $ log-ai-compressor verify --report examples/app_report.json 自校验结论:VERIFIED The last line is verbatim output (Chinese CLI): verdict VERIFIED, all 4 quotes matched, exit 0. No clone needed: line 2 copies the sample log out of the installed wheel. The key lines at the top are from a real run too: change the cited db-primary to db-primarY in examples/app.log, re-run verify, and you get exactly that. Change it back → VERIFIED again. There is no "mostly passed" tier.
Byte-reproducible JSON (--stable)
A normal JSON report carries generated_at and timing fields, so the same log produces a different file hash on every run (#IKXCA6). For tickets or CI reconciliation, add --stable:
$ log-ai-compressor run examples/app.log -f json --stable -o examples/app_report.json $ sha256sum examples/app_report.json # same input, same bytes, same hash Stable mode nulls generated_at, drops meta.duration_sec / lines_per_second / analysis_cost_sec, and writes report_sha256 (computed over canonical content). --stable only accepts -f json / -f json_full; a Markdown request fails loudly instead of silently ignoring the flag.
Repository is hosted on Gitee (reachable worldwide, but slow from some regions). The package itself installs from PyPI with no dependency on Gitee. Screenshots live in the Chinese README — this page stays text-only so every line renders anywhere.
Open the UI (the recommended entry point)
Three steps to a conclusion: ① drag a log into the window (or pick a local file with Browse) → ② levels default to ERROR/FAIL/WARN only → ③ press Start. The first thing you get is one card — located root cause, or "insufficient evidence" with the exact gap — not a wall of template clusters. Press Re-check evidence and the tool re-reads the raw log line by line and returns VERIFIED / TAMPERED.
The UI is zero-build and zero-CDN, so it works offline; the file browser picks local paths and never uploads. The one exception is FastAPI's own /api/docs (Swagger), which pulls its stylesheet from jsdelivr — the main screen is unaffected.
CLI (no UI: pipes, CI, agents)
The install and sample commands are in the first screen above. After them:
【日志分析摘要】examples\app.log 原始日志 ≈379 tokens → 摘要 ≈234 tokens(压缩 38%) 确定性指纹 `48e5781aafc4b27fe0f68c5847afe6d891936ac9f2e0af59aefaa9860f9c2886`(同一份日志跑两遍必须完全一致) 总行数 24,错误 8 行,去重后 4 种,时间范围 2024-03-15 08:00:00 ~ 2024-03-15 08:00:25。 已定位根因:java.net.ConnectException: Connection refused(另有 1 个根因候选) (证据出处末尾 16 位十六进制 = 该段原文 sha256 前 16 位,可自行复核) 1. [P0 | ERROR | ×3 | 根因 | 行 4~13] authorization failed: connection refused to db-primary:5432 证据出处:L4 bc5b93cec7cde01c -> 因果链源头(1 个错误由其衍生) 2. [P0 | ERROR | ×3 | 行 6~11] request 8812 failed: upstream unavailable 证据出处:L6 21d12907c3115d34 3. [P0 | ERROR | ×1 | 根因 | 行 18~22] java.net.ConnectException: Connection refused 证据出处:L18-L22 68af24f230baff5c -> Caused-by 因果链直连,根因:java.net.ConnectException: Connection refused 4. [P0 | ERROR | ×1 | 行 23~23] stock check timeout after 3000ms item=SKU-7781 证据出处:L23 a72b9f38845a14ed Prove it to yourself: edit the cited text
模式:复核已导出报告 对象:报告 app_report.json 证据:共 4 条引用,匹配 3 条,失配 1 条,源不可读 0 条,缺行号 0 条,缺摘要 0 条 自校验结论:TAMPERED ✗ MISMATCH c3801f905159 examples\app.log 期望 bc5b93cec7cde01c 实际 1b8242c1671f1e29 Translation: 4 quotes checked, 3 matched, 1 mismatched → verdict TAMPERED, exit 1. Change it back → VERIFIED again. No "mostly passed" tier. Machine-readable: add --json and read checked: 4 / matched: 3 / mismatched: 1.
What it is (and what it is not)
Do the numbers hold up?
Loghub 2.0 fourteen-dataset holdout: 10,083,330 annotated lines / 2,370 clusters.
GA (grouping accuracy): 95.20% vs Drain3 81.06% — same tokenization, same scoring
PA (parsing accuracy): 90.45% vs Drain3 60.55%
Reproducible: docs/repro_manifest.json pins full 64-hex-character SHA-256 digests, byte sizes, per-dataset line counts, and 7 snapshot sha256s; scripts/verify_repro_manifest.py checks all 11 entries.
Metric scope: PA 90.45% is Loghub Content (timestamps/hosts/levels stripped, Drain protocol); the same implementation on raw input is reported separately, not mixed with Content.
What I will not claim
Reproducible ≠ state of the art. There is no leaderboard rank. A single non-author full 14-set run has passed; it is not a multi-lab certification.
The LLM comparison is a 2,000-line-per-dataset sample, not full data.
The HDFS block-level result cannot be re-run here (the 1.5 GB raw log is not on this machine); merged recall is 37.17% — that is the number most worth doubting.
Want to reproduce it? (please do)
Post back three things: OS + Python version, exit code, last 20 lines on failure. A failure is worth more than a pass — it means the docs or environment assumptions are wrong.
Repo: https://gitee.com/hu-chenyu-dev/log-ai-compressor
Release v3.4.0: https://gitee.com/hu-chenyu-dev/log-ai-compressor/releases/tag/v3.4.0
Reproduction guide: docs/REPRODUCIBILITY.md
Real-reproduction invitation: https://gitee.com/hu-chenyu-dev/log-ai-compressor/issues/IKWWD3
PyPI: https://pypi.org/project/log-ai-compressor/
Full reproduction (optional, ≈445 MB / 11 entries)
Clone the repo, drop the Loghub datasets under data/ as described in docs/REPRODUCIBILITY.md §5.2, then:
python scripts/verify_repro_manifest.py # all 11 PASS before continuing python scripts/refresh_benchmarks.py # ~60 min python scripts/prove.py # every public claim re-checked Without data, verify_repro_manifest.py reports 11 MISS and exits 1 — that is expected.
Full documentation, design notes and stage-by-stage evidence are in the Chinese README.md.
🙏 External reproducers
Every number in this repository is currently self-reported by the author. This table only lists people who actually ran it (rules: docs/REPRODUCIBILITY.md, section 8):
To get listed: run the install, run, and verify commands above, then reply in Issue #IKWWD3 with OS + Python version + exit codes. Named or anonymous, pass or fail — both count.
Released: Dec 5, 2026
MIT View SPDX License List
log analyzer llm compressor troubleshooting benchmark reproducible root-cause local-first forensics mcp
Development Status 4 - Beta
Intended Audience Developers
System Administrators
Operating System OS Independent
Programming Language Python :: 3
Topic System :: Logging
Release files for log-ai-compressor 3.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
Built distribution (wheel)
Total release size: 3.1 MB
Release files / log_ai_compressor-3.4.0.tar.gz
Release files / log_ai_compressor-3.4.0-py3-none-any.whl
Security for log-ai-compressor 3.4.0
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.
Release history Release notifications | RSS feed
Dec 5, 2026 2 release files No provenance
Dec 3, 2026 2 release files No provenance
Dec 3, 2026 1 release file No provenance
Dec 2, 2026 2 release files No provenance
Dec 1, 2026 2 release files No provenance
Nov 25, 2026 2 release files No provenance
Nov 24, 2026 2 release files No provenance
Nov 21, 2026 2 release files No provenance
Nov 20, 2026 2 release files No provenance
Nov 17, 2026 2 release files No provenance
Yanked reason: 2.16.5 wheel 漏打 examples/,从 PyPI 装的用户跑 README 第二条命令会 exit 1;请用 2.16.6
Yanked reason: 2.16.4 wheel 同样漏打 examples/,pip 用户跑 README 第二条命令会 exit 1;请用 2.16.6
Yanked reason: 2.16.2 的 README 首屏仍钉 2.16.1,照着做会装回缺陷版;产物本身已修好,但请用 2.16.4。
Yanked reason: 2.16.1 的 sdist 过不了本仓库自己的发布门禁:缺 scripts/samples/llm_eval/manifest.json、把示例生成的报告当源码打进包、SAST 基线缺一条。请用 2.16.4。
"PyPI", "Python Package Index", and the blocks logos are registered trademarks of the Python Software Foundation.
© 2026 Python Software Foundation
Deployed from 4d99e05











