SignalCount enables fast approximate counts for semantic queries
Researchers have developed SignalCount, a system that provides rapid approximate counts for complex text-based queries without needing real-time LLM calls.
Source: Grafy Research LabResearchers have developed a new system called SignalCount that allows users to receive approximate counts for complex, text-based queries in a matter of seconds. This capability is critical for interactive applications where users need to know the scale of a dataset before committing to expensive, time-consuming processing tasks.
What problem does SignalCount solve?
In many modern databases, information is stored as a combination of structured columns (like age or location) and unstructured text (like clinical notes or customer support logs). While a user can easily filter by structured data, they often need to query the text using semantic meaning. For example, a medical researcher might want to find patients who "stopped a specific medication because of high blood sugar."
According to the paper by Matteo Agius-D'Arrigo, Zachary Zelner, Harrison Ju, and Rushab Munot, a standard Large Language Model (LLM) can identify these patients, but running an LLM over hundreds of thousands of records is slow and costly. If a user is still refining their search term, waiting thirty minutes for a batch process to finish just to see if their query was too broad is inefficient. Users need a "preview" of the count to decide if a query is worth running.
How does it differ from previous methods?
Existing approximate query processing (AQP) methods typically rely on an "oracle"—a highly accurate but expensive model—to label a sample of data at the moment the query is made. This ensures accuracy for new, ad-hoc queries, but it introduces significant latency because the system must wait for the oracle to respond to each sample.
SignalCount changes this architecture by moving the oracle offline. Instead of calling an expensive LLM at query time, the system uses a fast, non-generative classifier that has been calibrated using the historical logs of a production LLM. This allows the system to provide estimates almost instantly, even for entirely new search criteria that the classifier has never seen before.
How does the estimation process work?
When a user enters a semantic query, SignalCount performs two main steps. First, it counts the records that match the structured filters exactly. Second, it draws a uniform sample of at most 1,000 records from that filtered set.
Because the fast classifier might not be perfectly accurate, the system uses the previously collected logs from the LLM "judge" to calibrate the classifier's probabilities. The final estimate is calculated by multiplying the average calibrated probability of the sample by the total count of the filtered set. To provide a sense of reliability, the system also returns a 90% confidence interval. This interval is calculated using a combination of sampling variance and one-sided, rate-dependent margins to account for potential calibration errors, a method the authors describe as being fitted by split conformal prediction across different tenants.
What are the performance results?
In a multi-tenant production deployment, the researchers found that SignalCount is highly efficient. The system achieved a p99 latency of 3.8 seconds, and notably, this latency remained flat even as the size of the filtered dataset grew beyond the 1,000-record sample.
In terms of accuracy, when tested on data held out from the initial calibration, the system's interval covered the true count returned by the full production pipeline in 92% of cases. The authors noted that while the estimates were generally reliable, they tended to run approximately 15% high in aggregate. This is because a classifier that is nearly unbiased on a per-record basis can still exhibit bias when applied to specific, new criteria.
Why is this important for AI-driven data analysis?
The ability to rapidly prototype queries over unstructured data is a significant step toward making LLM-powered databases more interactive. By providing a "low-cost" way to estimate the results of a "high-cost" semantic search, SignalCount allows users to shape their datasets in real-time. This reduces wasted computational resources and allows for a much tighter feedback loop between a human researcher and a massive, text-heavy database.
For researchers working with large volumes of academic papers or complex documentation, understanding how to navigate and quantify information within those texts is essential. While SignalCount is a specialized database tool, the principles of using fast models to approximate the behavior of larger ones can be explored when using Reader to query and synthesize information from multiple PDFs and research papers.
Frequently asked questions
Does SignalCount require an LLM to run every query?
No, SignalCount does not call an LLM at query time. Instead, it uses a fast, non-generative classifier that has been calibrated offline using previous logs from an LLM. This allows the system to provide approximate counts in seconds rather than minutes or hours.
How accurate are the counts provided by SignalCount?
SignalCount provides an approximate count accompanied by a 90% confidence interval. In production tests, the interval covered the true count in 92% of estimates for held-out data. However, the point estimates were found to be approximately 15% higher than the actual counts in aggregate.
Can SignalCount handle brand new search criteria?
Yes, SignalCount is designed to handle ad-hoc, semantic predicates. Because it uses a calibration method that accounts for error margins, it can provide estimates for new natural language criteria that were not part of the initial training or calibration process.


