gget virus: Enabling Deterministic Viral Sequence Retrieval for AI Scientific Agents
Scientists increasingly rely on autonomous AI agents to navigate the vast landscape of biological data. Yet these agents often struggle with the fundamental task of finding the right information. While Large Language Models (LLMs) can reason through complex biological questions, they frequently stumble when retrieving specific viral sequences from global databases. This research introduces a specialized tool, gget virus. It transforms viral data retrieval from a fickle, error-prone process into a reliable, programmable operation.
The Bottleneck in Automated Virology
Modern virology relies on a massive, decentralized puzzle: the global repository of viral genomes. To design a vaccine or track a new variant, researchers must query databases like the National Center for Biotechnology Information (NCBI) Virus resource. They need to collect specific sets of genetic sequences. Currently, these databases are optimized for human beings clicking through web interfaces. Users employ dropdown menus, checkboxes, and search bars to filter results.
For an autonomous AI agent, this web-centric design is a minefield. An agent tasked with "finding all Influenza A sequences from Africa collected in 2024" might interpret metadata inconsistently. It might fail to navigate through multiple pages of results (a process called pagination). It might even terminate a download prematurely. In scientific discovery, these are not mere technical glitches. They are catastrophic failures. If an agent retrieves 90% of the required sequences instead of 100%, every downstream calculation will be biased. This affects phylogenetic trees (diagrams showing evolutionary relationships) and machine learning models. The core problem is a lack of "determinism." This is the guarantee that a specific query always yields the exact, complete, and reproducible set of data intended.
The Infrastructure of Genomic Surveillance
To understand this work, one must understand the layers of the NCBI ecosystem. The NCBI Virus resource acts as a portal. It aggregates data from various underlying sources like GenBank (a massive annotated database of all publicly submitted sequences) and RefSeq (a curated collection of high-quality reference sequences). Accessing this data typically involves using Application Programming Interfaces (APIs). These are sets of rules that allow different software programs to communicate.
Existing APIs, such as the NCBI Datasets REST API, offer some filtering capabilities. However, they are often incomplete for complex, multi-constraint queries. Researchers often face two suboptimal choices. They can use a limited programmatic interface that misses crucial data. Alternatively, they can download massive, unfiltered datasets and perform filtering locally. This "download-then-filter" approach is incredibly inefficient. It consumes vast amounts of bandwidth and storage. The authors argue that "agentic science" needs a middle layer. We need a deterministic retrieval engine that combines the rich filtering power of the web interface with the strict, repeatable logic of a programming tool.
Bridging the Gap Between LLMs and Databases
The researchers first measured how poorly current AI agents perform. They developed VirBench, a benchmark of 120 manually curated queries. These queries mimic real-world virology workflows. They involve up to 16 simultaneous filters like host species, geographic location, and sequence completeness.
The results were striking. When using standard web-searching and coding tools, the performance of state-of-the-art agents varied wildly. For instance, Claude Sonnet 4 achieved a mean accuracy of only 16.9%. Meanwhile, the more advanced GPT-5.5 reached 91.3% [Figure 2A]. Even the best models showed significant "instability." This means they gave different answers to the same question when asked repeatedly [Figure 2B]. Errors were often massive in scale. Agents either missed large chunks of data or over-counted sequences due to faulty logic [Figure 2C].
To solve this, the authors built gget virus. It implements a "staged query optimization" strategy .
Instead of blindly downloading everything, the tool follows a logical hierarchy. First, it fetches lightweight metadata using the NCBI REST API. It applies as many filters as possible on the server side. Second, it performs client-side filtering. This narrows down the exact list of accession IDs (unique identifiers for biological records). Finally, it retrieves only the specific GenBank records or nucleotide sequences that passed every test.
This staged approach is remarkably efficient. In one test case involving SARS-CoV-2 sequences, the standard method required 284 GB of data. gget virus achieved the same result using only 3.8 GB [Supplementary Table S4]. This represents a reduction of over 98% in data volume.
When the researchers equipped the AI agents with gget virus, the transformation was profound. Accuracy jumped across the board. Even the weakest models like Claude Sonnet 4 rose to 92.8% accuracy [Figure 2A]. Stability reached near-perfect levels between 0.92 and 1.00. The number of "tool calls" (the steps an AI takes to solve a problem) also decreased [Figure 2D, E]. This makes the agents faster and more focused.
Enabling Reliable Autonomous Discovery
The implications of this work extend beyond mere efficiency. By providing a deterministic layer, the researchers have provided a "ground truth" for AI scientists. We can move from asking if an AI can find data to asking what it can discover.
This tool allows for the automated construction of high-fidelity datasets. These are useful for phylodynamics (the study of how viruses spread geographically and temporally) and vaccine design. Because gget virus handles the messy nuances of the NCBI database, it removes a layer of "noise." It manages things like retrying failed requests or searching across multiple metadata fields for hidden signals. This shifts the burden of data integrity from the fallible reasoning of a language model to the rigid logic of a specialized software tool.
Where the Edges Lie
While gget virus solves the problem of retrieval logic, it does not solve the problem of data quality. The tool is a conduit, not a corrector. If the underlying NCBI databases contain erroneous annotations, gget virus will faithfully retrieve those errors. The accuracy of the resulting dataset is strictly bounded by the quality of the source material.
The system also remains dependent on the stability of NCBI's external infrastructure. The tool includes robust retry mechanisms to handle transient API failures. However, it cannot function if the central servers are offline. Finally, the tool is still subject to the physical constraints of a user's network. Performance may be reduced in low-bandwidth settings. The researchers note that remaining errors in AI agents often stem from how agents process the tool's output. The errors are usually not caused by the retrieval layer itself.
Figures from the paper
How this was made
Model: nvidia/Gemma-4-26B-A4B-NVFP4
Persona: science_essayist
Template: explainer
Refinement: 0
Pipeline: forge-1.1
Evaluator: nvidia/Gemma-4-26B-A4B-NVFP4
Score: 94% (passed)
Claims verified: 15 / 15
Model: nvidia/Gemma-4-26B-A4B-NVFP4
NVIDIA GB10 · 128 GB unified · NVFP4 · 100% local · $0 cloud
Tokens: 106,671
Wall-time: 554.9s
Tokens/s: 192.2