Configuration
Every engine environment variable, annotated — database, storage, check budgets, fingerprint tuning, and retrieval knobs.
Configuration is environment variables only. Every variable has a working
default; a bare docker compose up needs none of them. Compose reads a
.env file next to docker-compose.yml (copy .env.example).
Postgres
| Variable | Default | Purpose |
|---|---|---|
DATABASE_URL | postgresql+psycopg://noplag:noplag@localhost:5432/noplag | SQLAlchemy URL with the postgresql+psycopg driver hint |
POSTGRES_USER / POSTGRES_PASSWORD / POSTGRES_DB | noplag | Credentials for the docker-compose Postgres service |
ENGINE_PORT | 8000 | Host port the API listens on (compose) |
Object storage
| Variable | Default | Purpose |
|---|---|---|
CORPUS_STORAGE_DIR | system temp dir | Local filesystem path for raw uploaded document bytes. The extracted text lives in Postgres; the original bytes are kept so documents can be re-extracted when the extractors improve. The temp-dir fallback is fine for evaluation, not for durable storage |
Sample corpus
| Variable | Default | Purpose |
|---|---|---|
NOPLAG_LOAD_SAMPLE_CORPUS | 1 | The container entrypoint loads the bundled Wikipedia sample corpus on first start so the demo has something to match against. Set to 0 when you bring your own corpus |
Checks
| Variable | Default | Purpose |
|---|---|---|
NOPLAG_CHECK_BUDGET_S | 60 | Per-check retrieval time budget in seconds. A very large document that exceeds it returns partial (but uniform) coverage instead of hanging |
NOPLAG_TENANT_ID | fixed UUID | Single-tenant id every request runs as. Only override when layering your own multi-tenancy on top of the engine |
Fingerprint algorithm tuning
| Variable | Default | Purpose |
|---|---|---|
NOPLAG_FP_K | 5 | k-gram size (characters) for winnowing |
NOPLAG_FP_W | 8 | winnow window size in k-grams |
NOPLAG_CHUNK_SENTENCES | 4 | chunk size in sentences |
NOPLAG_CHUNK_OVERLAP | 1 | sentence overlap between adjacent chunks |
The defaults are the tuned winners from the PAN-PC-11 sweep. Changing
NOPLAG_FP_K or NOPLAG_FP_W requires re-fingerprinting the corpus —
fingerprints only match when the corpus side and the query side agree.
Smaller chunks improve granularity but increase per-document storage.
L1 retrieval tuning (large corpora)
These only matter once the corpus is large enough that you've built the
fingerprint_df table (scripts/compute_fingerprint_df.py) — see
Operating at scale.
| Variable | Default | Purpose |
|---|---|---|
NOPLAG_L1_DF_BUDGET | 15000 | document-frequency budget per chunk probe |
NOPLAG_L1_POOL_CAP | 20000 | candidate pool cap per query |
NOPLAG_L1_NONDISCRIM_DF | 50000 | threshold above which a fingerprint is considered non-discriminative |
NOPLAG_STOP_LIST_N | 1000 | size of the DF-derived stop-fingerprint list |
All are read at query time; changing them needs a restart but no re-index.
Alignment
| Variable | Default | Purpose |
|---|---|---|
NOPLAG_ALIGN_PARALLEL | 1 | Set to 0 to force single-process L0 alignment (tests, single-core boxes). Defaults to a process pool sized to the machine |