Use Piika
Operate Piika through its package entrypoints and benchmark manifests. Prefer dry runs and manifest-backed defaults so run artifacts preserve the actual experimental condition.
Establish context
- Work from the repository root containing
package.json. - Inspect
git status --short --branch; do not disturb unrelated work. - Read
README.mdfor the current high-level workflow. - Read
docs/cli.mdwhen using the packagedpiikaCLI or prebuilt indexes. - Read
references/workflows.mdfor the command and option matrix. - Use
--helpand--dry-runbefore unfamiliar or expensive operations.
Choose the benchmark source
- Use a built-in benchmark when
npm run run:benchmark:query-set -- --helplists it. - Use
npm run prebuilt -- setup ...for a Castorini prebuilt index/topics/qrels combination. - Use
npm run install:benchmark-manifest -- --manifest <path>for any other reusable benchmark. Validate first with--dry-run. - Use explicit
--query-file,--qrels, and--index-pathonly for ad hoc experiments where generic benchmark identity in the run manifest is acceptable.
Never add a dataset-specific TypeScript registry entry when an installed manifest expresses the same configuration.
Choose the backend and topology
- Prefer the default direct
pyserini-rest-2toolinterface for remote Pyserini and ordinary local runs. - Use
pi-serini-3toolonly to reproduce cached search-result browsing behavior. - Use the single-process runner for smoke tests and small query sets.
- Use shared BM25 when multiple queries should reuse one local backend.
- Use sharded shared BM25 for parallel production runs.
Confirm that the configured index is reachable before launching a long run. A remote index name is not a local filesystem path.
Choose outputs
- Use
answerfor question answering. - Use
ranked_listfor TREC-style document rankings. - Use
answer+ranked_listto produce both from one research pass. - Set
--ranked-list-depthas a maximum. - Set
--ranked-list-countonly when an exact list length is an intentional experimental constraint. - Add
--supplied-doc-bundlewhen each query includes preselected evidence. Ensure bundle qids align with qrels and ground truth.
Execute and verify
- Print the launch plan with
--dry-run. - Run a small
--limitsmoke test when using a new model, backend, or dataset. - Launch the intended full topology.
- Run retrieval evaluation when qrels exist.
- Run judge evaluation in
gold-answerorreference-freemode as appropriate. - Generate a report from the same run directory.
- Inspect the run's
benchmark_manifest_snapshot.jsonandrun_setup.jsonbefore comparing results.
Treat provider usage limits, missing indexes, judge nonzero exits, malformed ground truth, and qid mismatches as failed setup—not valid benchmark outcomes.