Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Gemma Hallucinated 29 npm/PyPI Packages. I Built a Tool to Catch Them.

说明与用途

Gemma 模型生成了29个不存在的 npm/PyPI 包,可能导致安全风险。ghostdeps 工具检查 AI 推荐的包名并分类,防止安装不存在的依赖。

问题

AI language models can hallucinate non‑existent package names, risking accidental installation of malicious or non‑existent code.

结果

ghostdeps identified 29 out of 118 (24.6%) hallucinated packages in 535 Gemma prompts, with nearly half of niche tasks producing ghosts. Re‑runs showed high repeatability of hallucinations, indicating a systemic issue.

工作流

  • 1. Prompt the local AI model for a package recommendation. 2. Parse the model’s answer to extract install commands. 3. Query npm and PyPI registries for each extracted package name. 4. Classify each name as alive, GHOST, POSSESSED, dead, tombstone, EXORCISED, or unknown. 5. Report the classification results to the user.
  • 6. Optionally rerun the prompt with different seeds or higher temperature to test repeatability of hallucinations.
  • 7. Use ghostdeps check on a package.json, requirements file, or pasted chatbot answer to pre‑validate dependencies before installation.

证据

The npm registry has never heard of that package. The GitHub repository returns a 404.

来源

ghostdeps is a tool for detecting AI-hallucinated dependencies before they make it into your project.

来源

535 questions, all local, on a laptop with a 4 GB GPU, about 70 minutes of model time.

来源

29 of 118 (24.6%)

来源

  • 记录日期: 2026-11-01T09:43:58.395Z