Skip to main content

📟 longeval-cli

Python PyPi CI status License

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

The longeval-cli pipeline: 1. Ingest Logs → parsed logs, 2. Select Queries → queries, 3. Create Labels → qrels, 4. Fetch Docs. → docs, 5. Package → snapshot, 6. Retrieve → pool

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

pip install longeval-cli                 # base install
pip install "longeval-cli[clax]"         # click-model training and scoring (JAX, CLAX)
pip install "longeval-cli[postgres]"     # if your database is PostgreSQL
pip install "longeval-cli[tira]"         # for `retrieve`

Extras combine, e.g. pip install "longeval-cli[clax,postgres]"; with uv, use uv add longeval-cli or uv tool install longeval-cli. On Linux, the clax extra pulls in PyTorch, whose default wheels bring ~4 GB of CUDA libraries which are not really needed. To skip them, install the CPU build first: pip install torch --index-url https://download.pytorch.org/whl/cpu.

To run the examples (the quickstart below and the tutorial) or to develop, work from a clone of this repository instead:

git clone https://github.com/clef-longeval/longeval-cli.git && cd longeval-cli
uv sync                      # base install
uv sync --extra clax         # likewise --extra postgres / --extra tira

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:

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.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for longeval-cli 0.1.2
File Size Uploaded Provenance Actions
longeval_cli-0.1.2.tar.gz 424.8 kB With provenance Details for longeval_cli-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for longeval-cli 0.1.2
File Interpreter ABI Platform Actions
longeval_cli-0.1.2-py3-none-any.whl Python 3 none any Details for longeval_cli-0.1.2-py3-none-any.whl

Total release size: 504.4 kB

Release files / longeval_cli-0.1.2.tar.gz

Download URL longeval_cli-0.1.2.tar.gz
Size 424.8 kB
Tags Source
SHA-256 checksum
How to use checksums
157263605c2ac03ae385b22e5bdca14fe45928b2ac1a426246e203d808b6b04d
BLAKE2b-256 checksum
How to use checksums
5b206a1ab1bc62dfea1c7ef803268d07a70a5fa49419627b6c20c250c3957a2d
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 11, 2026.

Transparency log

Release files / longeval_cli-0.1.2-py3-none-any.whl

Download URL longeval_cli-0.1.2-py3-none-any.whl
Size 79.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
561d86352f840cccf69891dd0d5a5c6511d9990bc62f3eded4f83a1e82c3808c
BLAKE2b-256 checksum
How to use checksums
8f34ae0a3d20fcf7cef813bac0c0f2fa6832fa366b6ee8e2e6e3570a154cbc73
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 11, 2026.

Transparency log

Security for longeval-cli 0.1.2

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.

Select from 2 files

Attestation for longeval_cli-0.1.2.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 11, 2026.

Transparency log

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page