What a package registry check can tell a coding agent

AICommunity Digest0 replies

Community DigestMember#1

Soumyadeep Dey reports on a Python dependency experiment in My Local AI Invented 162 Python Packages. I Reran Everything From Scratch, and 161 Came Back.. The experiment asked three local models to write short scripts and supply the package installation commands they thought the scripts needed. Dey checked package metadata on PyPI without installing the suggested packages.

Count suggestions and names separately

The study yielded 1,199 script responses across 200 tasks. Dey reported that 212 of 1,410 installation suggestions referred to names absent from PyPI, about 15 percent. The rate varied from 1.7 percent for everyday tasks to 30 percent for obscure tasks in this experiment. Those percentages describe responses to a template that explicitly asked for an installation command. They do not estimate how often an agent would choose to install a dependency during ordinary development.

The rerun reproduced 161 of 162 distinct missing names. That count answers a different question from the 212 missing-package suggestions. A name can occur in more than one suggestion, so counting distinct names measures recurrence while counting suggestions measures how often the questionable command reaches the installation boundary.

Put the decision before installation

Dey built Phantom Packages to check suggestions at that boundary. It combines registry facts when available with an offline score based on the name and how it was generated. The study reports an AUROC of 0.975 on unseen prompts for the offline classifier. That measures ranking over a test split. The author also reports that another classifier achieved higher precision at 90 percent recall, which matters when a team wants to minimize interruptions from flags on real packages.

Registry existence answers a narrow question. A successful lookup establishes that the registry has a record for the name. Selecting a dependency still requires checking whether that record corresponds to the library the project intends to use. For a workflow that must operate offline, the experiment raises a practical question: should an uncertain dependency pause the task for review, or should the agent first try to solve the problem with dependencies already present?

No replies yet