Skip to main content

PaperLab.space core

pip install paperlab-space

Evaluate LLMs on your own spreadsheet data and get paper-ready results.

Give it an Excel or CSV file, say which columns are inputs and answers, pick models and metrics, and get back an Excel workbook of outputs and scores, a LaTeX table for your paper, and a reproducibility config. paperlab-space is the open-source engine behind PaperLab.space; use it from the command line or from Python.

  • Spreadsheets in: .xlsx (any sheet), .csv, .tsv, with encoding detection and Unicode-safe handling for non-Latin scripts. Validation catches empty cells, duplicate IDs, and garbled text before you spend API calls.
  • Any model: OpenRouter (including free models), Gemini, OpenAI, Anthropic, Ollama, and everything else LiteLLM supports, run side by side. You bring your own API keys.
  • Robust runs: per-model rate limits tuned for free tiers, retries with backoff, and resume after interruption. A cost and time estimate is shown before anything is sent.
  • Metrics: exact match, accuracy (with label extraction from chatty answers), precision/recall/F1, token F1. Tokenisation handles Chinese, Japanese, Thai, and Burmese.
  • Paper-ready output: Excel, a booktabs LaTeX table, and a YAML config recording model versions, prompt, seed, metric settings, and a hash of your data.

PyPI DOI

Status: early release (0.1). See PLAN.md for the roadmap: BLEU/chrF/ROUGE, LLM-as-judge, and significance tests are next.

Install

pip install paperlab-space

This installs both the Python library and the paperlab-space command.

Quickstart (command line)

export OPENROUTER_API_KEY=sk-or-...   # free key from https://openrouter.ai
export GEMINI_API_KEY=...             # free key from https://aistudio.google.com

paperlab-space init my_data.xlsx            # writes run.yaml, guessing the column roles
paperlab-space validate my_data.xlsx -i question -e answer   # check the data, preview JSONL
paperlab-space estimate run.yaml            # tokens, cost, and time; no requests sent
paperlab-space run run.yaml                 # writes results-run/

run.yaml looks like this (see examples/sentiment):

dataset:
  path: data.csv
mapping:
  input: text            # column(s) available to the prompt
  context: [language]    # extra columns available to the prompt
  expected: label        # the answer key (never shown to the model)
  id: id
prompt: |-
  Classify the sentiment of this {language} text as "positive" or "negative".
  Text: {text}
models:
  - openrouter/nvidia/nemotron-3-super-120b-a12b:free
  - id: gemini/gemini-2.5-flash
    temperature: 0
metrics:
  - name: accuracy
    labels: [positive, negative]
  - f1
seed: 42

The output folder contains:

File What it is
results.xlsx Summary sheet (scores, failures, cost), per-row outputs and scores, and the config
table.tex A booktabs table to \input{} into your paper
run.yaml The reproducibility config: re-run with paperlab-space run run.yaml
results.json Everything, for paperlab-space run run.yaml --resume results.json after an interruption

Free models change often; paperlab-space run stops a model early with a clear message if its ID no longer exists. Browse current free models at openrouter.ai/models.

Quickstart (Python)

from paperlab_space import ColumnMapping, RunConfig, estimate, export, load_dataset, run

data = load_dataset("my_data.xlsx", sheet="test")
config = RunConfig(
    mapping=ColumnMapping(input="question", expected="answer"),
    prompt="Answer briefly: {question}",
    models=["openrouter/nvidia/nemotron-3-super-120b-a12b:free", "gemini/gemini-2.5-flash"],
    metrics=["exact_match", "token_f1"],
)
print(estimate(config, data))
results = run(config, data)
print(results.scores["gemini-2.5-flash"]["exact_match"].value)
export.write_all(results, "results/")

run works in scripts and Jupyter notebooks. Use await arun(...) inside your own async code.

Metrics

Run paperlab-space metrics for the list. Every metric takes normalisation options in the config:

metrics:
  - exact_match                         # case-insensitive, trims punctuation like "Paris."
  - name: exact_match
    label: exact_match_strict           # same metric again with different options
    ignore_case: false
    trim_punctuation: false
  - name: f1
    average: macro                      # macro | micro | weighted

Custom metrics subclass paperlab_space.metrics.Metric and use the @register decorator.

Citing

If paperlab-space helps your research, please cite it:

@software{paperlab_space,
  author    = {{Kaung Nay Lin Khant}},
  title     = {paperlab-space: no-code LLM evaluation on spreadsheet data},
  publisher = {Zenodo},
  doi       = {10.5281/zenodo.23436738},
  url       = {https://doi.org/10.5281/zenodo.23436738}
}

This DOI always points to the latest version. To cite the exact version you used (recommended for reproducibility), pick it from the Zenodo record; the version is also recorded in your run.yaml. GitHub's "Cite this repository" button gives the same information from CITATION.cff.

Development

uv sync
uv run pytest                   # unit tests, no network
uv run pytest -m live           # real-provider smoke tests (needs API keys)
uv run ruff check . && uv run ruff format --check .
uv run mypy src tests

License

Apache 2.0

Metadata

Release files for paperlab-space 0.1.4

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

Source distribution (sdist)

Source distribution for paperlab-space 0.1.4
File Size Uploaded
paperlab_space-0.1.4.tar.gz 288.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for paperlab-space 0.1.4
File Interpreter ABI Platform
paperlab_space-0.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 337.6 kB

Release files / paperlab_space-0.1.4.tar.gz

Download URL paperlab_space-0.1.4.tar.gz
Size 288.8 kB
Tags Source
SHA-256 checksum
How to use checksums
a3b1b7769d5bfd331e934647784fcb617cdacca0d29fb0e8f4e3d39029f0d221
BLAKE2b-256 checksum
How to use checksums
c132c55026b37241c785d4d747f2e5e0f1d1ffcd18e230a5cf278341d4e95e01
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 17, 2026.

Transparency log

Release files / paperlab_space-0.1.4-py3-none-any.whl

Download URL paperlab_space-0.1.4-py3-none-any.whl
Size 48.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2c0bbfbee7bdedc777b20995599c7f16f264d359da99d0e68bb7917f3dafbd23
BLAKE2b-256 checksum
How to use checksums
b077b3048798063e68fecfd07f6dec89368bea29d77a3b8248aa893b52021b6e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 17, 2026.

Transparency log

Release history Release notifications | RSS feed

0.1.5

2 release files

This release

0.1.4 This release

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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