Configuration

Configuration is YAML, validated through Pydantic models. The typed settings reference and JSON Schema document field defaults and basic constraints. Task options document the options actually read by task wrappers.

Configuration structure

Section Controls
dump Input path, language, optional snapshot identifier
seed Deterministic selection/shuffling seed
output_dir Corpus, tasks, caches, and benchmark manifest root
inspection Inspection sample size and pilot limits
corpus Article/page limits, paragraph bounds, cleaning filters
tasks Enabled tasks, per-variant targets, task options
services Embedding, knowledge-base, and LLM clients

Relative paths use the current working directory. Unknown fields in typed sections are rejected. tasks.<name>.options is an open dictionary: unknown option keys are not uniformly rejected, so use the names in the task-option reference. generate also checks cross-task dependencies and supported task names.

A target counts records per output variant. Enabling NER with target: 1000 requests 3,000 variant records. Four paragraph tasks at 1,000 each request 4,000 records. The shared generator uses separate article pools within the coherence/ordering pair and within the membership/next-paragraph pair: each pair's summed targets must fit its eligible article pool.

Reranking candidates

# Fragment: tasks.reranking
enabled: true
target: 1000
options:
  candidate_count: 20
  hard_negative_count: 19
  query_per_title: 1

candidate_count includes the gold title. hard_negative_count must be exactly candidate_count - 1; omit it to derive that value automatically. The code requires at least two distinct titles and enough usable queries for the target.

Embeddings

# Fragment: services.embeddings
provider: sentence_transformers
model: sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2
batch_size: 128
local_files_only: false

Online loading can download model files. With local_files_only: true, the configured model must already exist in the local cache or at the local model path. Record the exact model snapshot for reproducible research; a model name alone does not freeze all upstream files or numerical execution details.

Gemini and Vertex AI

# Fragment: services.llm
provider: gemini
model: gemini-3.1-flash-lite
api_key: ""
api_version: v1beta
batch_size: 10
temperature: 0

Paste a Google AI Studio/Gemini Developer API key into api_key. The shown model is an example used by this checkout, not a promise of future availability or a claim of optimal benchmark quality. Select a model available to your account. Both classification and hybrid QA support provider: gemini and provider: vertex. Google SDK documentation describes the services and authentication.

Gemini resolves keys in this order: nonempty api_key, then the configured api_key_file, then GEMINI_API_KEY or GOOGLE_API_KEY from the environment. An explicitly configured missing/empty key file raises an error rather than silently skipping to environment fallback. Inline keys are masked in config representations, excluded from config serialization and manifests, and hidden from validation-error input dumps. The YAML file itself contains the plaintext key, so keep personal settings in an ignored config.*.yaml file.

For Vertex AI, use provider: vertex, set project/location, and authenticate with the Google Cloud credentials supported by the SDK. GOOGLE_CLOUD_PROJECT is a fallback for project. The Vertex client path does not use the Gemini API-key fields.

LLM service settings include timeouts, retry count, output-token limit, and API version. Classification and QA task options can override the model and batch size. These are distinct from the embedding model and embedding batch size.

Shared NER ontology

NER and extractive QA use the same knowledge-base mapping. Full examples include the original 17 labels, 106 QID memberships, and priority order. To use a custom vocabulary, replace all three aligned settings:

# Fragment: services.knowledge_base
provider: wikidata
ner_ontology_by_label:
  PERSON: [Q5, Q15632617, Q12737077]
  PLACE: [Q515, Q6256, Q4022]
ner_labels: [PERSON, PLACE]
ner_label_priority: [PERSON, PLACE]

Mapping keys must exactly match ner_labels; use at least two distinct uppercase codes. Priority must contain each label once. QIDs must have the form Q followed by a positive integer, and cannot repeat within one label. Shared QIDs across labels are allowed and resolved by priority. An empty list disables matching for that label without removing it from the vocabulary.

The resolver examines the item's P31 followed by zero or more P279 edges. See Wikidata's definitions of instance of and subclass of. Priority is a benchmark policy for overlapping classes, not a universal linguistic ontology.

NER instructions may contain {ner_labels}; generation substitutes the active vocabulary. Defaults and packaged templates support this. When changing your own literal instructions, ensure that their stated label list remains consistent.

Mapping fingerprints separate SQLite label-cache entries. Changed mappings invalidate dependent task output caches; title-to-QID lookups remain reusable. Legacy default-mapping label caches are reused only for the default ontology. A new mapping needs its own resolved entries before offline: true can succeed.

QA mode and conflict replacement

# Fragment: tasks.extractive_qa
target: 1000
options:
  generation_method: hybrid
  conflict_replacement_rounds: 5

template mode creates questions from configured templates. hybrid mode asks the LLM to rewrite selected questions while preserving extractive answer spans. Invalid rewrites can fall back to template questions; fallback counts are reported.

After selection/rewriting, contradictory question/context groups are replaced as whole groups. Hybrid replacements receive a separate model answer check that omits the gold answer. The replacement must have a unique model-supported answer matching the gold span. This check applies to replacement records, not a semantic audit of every record. Exhausting replacement attempts preserves the existing published task directory and raises a generation error.

Classification taxonomy

Classification must be enabled explicitly and needs at least four distinct labels, a configured embedding service, and an LLM service. The labels are benchmark categories chosen by the dataset author. label_hints maps labels to category-text hints for candidate sampling; the LLM supplies the final label.

# Fragment: tasks.classification
enabled: true
target: 8
options:
  labels: [Coğrafiya, Mədəniyyət, Elm və texnologiya, Digər]
  candidate_total: 16
  manual_review_total: 8
  llm_batch_size: 8

Choose and document a language-appropriate taxonomy before a research release. The small integration example tests connectivity and formats; its four labels do not constitute an expert-validated classification benchmark.