📟 longeval-cli
Build dynamic test collections from search logs. longeval-cli turns raw search logs into a sequence of self-contained snapshots, each with its own queries, relevance labels (qrels), and documents. It is introduced in our paper Building Dynamic Test Collections: LongEval CLI and Scientific Retrieval Dataset (under review) to which we refer for the methodological background.
The pipeline
Each stage stores its results in the database or in files, so you can stop, inspect, and continue at any stage, and add a new snapshot without reprocessing the earlier ones.
| Stage | What you provide | Commands | Paper |
|---|---|---|---|
| 1. Ingest Logs | a parser for your log format | import-queries, import-clicks |
§3.1 Log Ingestion |
| 2. Select Queries | classifiers and a filter YAML per snapshot | classify, export queries |
§3.2 Query Selection and Interaction Filtering |
| 3. Create Labels | a CLAX click model (Python script) | export clicks, export qrels |
§3.3 Pseudo Relevance Label Creation |
| 4. Fetch Docs | a document source | collect-document-candidates, select-documents, fetch-documents |
§3.4 Document Collection |
| 5. Package | – | export snapshot (and export documents) |
§3.5 Packaging |
| 6. Retrieve | – (TIRA + Docker) | retrieve |
§3.6 Retrieval |
Everything that depends on your search engine (parser, classifiers, document
source) is a small Python file you pass on the command line, so the toolkit
itself stays format-independent. The exported snapshots can be loaded with
ir_datasets_longeval.
Installation
# from a clone of this repository
uv sync # base install
uv sync --extra clax # click-model training and scoring (JAX, CLAX)
uv sync --extra postgres # if your database is PostgreSQL
uv sync --extra tira # for `retrieve`
The database defaults to a local SQLite file. Pass --database-url (or set
LONGEVAL_DATABASE_URL) to use another file or PostgreSQL, e.g.
postgresql+psycopg://user:password@host/database.
Quickstart
Run the first stages on the synthetic logs that ship with the repository:
export DB=sqlite:////tmp/minimal-example.sqlite3 E=examples/minimal-example
uv run longeval-cli init-db --database-url "$DB"
uv run longeval-cli import-queries $E/logs --parser $E/parser.py --database-url "$DB"
uv run longeval-cli import-clicks $E/logs --parser $E/parser.py --database-url "$DB"
uv run longeval-cli classify --classifier $E/classifiers.py --filter $E/filter.yaml --database-url "$DB"
uv run longeval-cli database-status --database-url "$DB"
The tutorial continues from here through click-model training, qrels, documents, and the packaged snapshot, with the expected output of every step.
Documentation
| Tutorial | the whole pipeline on a small synthetic dataset with known ground truth |
| Command reference | every command, its options and output formats, the filter YAML |
| LongEval Sci 2026 setup | the configuration used for the collection in the paper (CORE logs) |
| Agent skills | step-by-step guides that let an AI agent (e.g. Claude Code) run the toolkit for you |
The agent skills double as how-to guides for the four tasks you will do most:
longeval-log-parser: write a parser for a new log formatlongeval-classifier: write or configure classifierslongeval-snapshot-filter: write a snapshot's filter YAMLlongeval-build-snapshot: build and release a snapshot end to end
Roadmap
- Query intent classification
- Query recency classification
- Topic generation
- Sampling instead of pooling
- Generalize filters.yml into a snapshot config file to reduce options needed
License
MIT, see LICENSE.
Metadata
Release files for longeval-cli 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| longeval_cli-0.1.1.tar.gz | 420.8 kB | With provenance | Details for longeval_cli-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| longeval_cli-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for longeval_cli-0.1.1-py3-none-any.whl |
Total release size: 498.0 kB
Release files / longeval_cli-0.1.1.tar.gz
| Download URL | longeval_cli-0.1.1.tar.gz |
|---|---|
| Size | 420.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d5604d267c1d605f0759beb817a93a6dd292488c2819ef14d4d08a0395763dc6
|
|
BLAKE2b-256 checksum How to use checksums |
6ca3281a6353fc4df731d39ef159cc94f2e7c4b4d8667a55bd28f241f29edaee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.
Transparency logRelease files / longeval_cli-0.1.1-py3-none-any.whl
| Download URL | longeval_cli-0.1.1-py3-none-any.whl |
|---|---|
| Size | 77.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a742501a202fcb4093a8c15754702569b21781f547cbd73893b6b44512353f3c
|
|
BLAKE2b-256 checksum How to use checksums |
dea3b21fdc259c9ec14e4572de98856876613b04ce3f62d033193621546155e2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.
Transparency logSecurity for longeval-cli 0.1.1
Provenance
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for longeval_cli-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.
Transparency logA 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.