CoolFace
Datasetpublic

oliverkinch/da-instruct-dynaword-contemporary

da-instruct-dynaword-contemporary Danish instruction fine-tuning dataset generated via backtranslation from danish-foundation-models/danish-dynaword, restricted to contemporary Danish subsets with no annotation-based quality filtering. Subsets consisting primarily of historical or archaic Danish are excluded. See oliverkinch/da-instruct-dynaword-contemporary-hq for a version with additional quality filtering via dynaword-annotations. Dataset description Each row… See the full description on the dataset page: https://huggingface.co/datasets/oliverkinch/da-instruct-dynaword-contemporary.

sourceHugging Faceotherupdated 4mo agoView on Hugging Face
0likes14downloads
Dataset Card

da-instruct-dynaword-contemporary

Danish instruction fine-tuning dataset generated via backtranslation from `danish-foundation-models/danish-dynaword`, restricted to contemporary Danish subsets with no annotation-based quality filtering.

Subsets consisting primarily of historical or archaic Danish are excluded. See `oliverkinch/da-instruct-dynaword-contemporary-hq` for a version with additional quality filtering via dynaword-annotations.

Dataset description

Each row is a (prompt, target) pair where:

  • —`target` is a passage of authentic Danish text drawn from a curated subset of DynaWord
  • —`prompt` is a realistic Danish user instruction that would plausibly elicit that text from a language model

Prompts were generated by Qwen/Qwen3.5-397B-A17B using a backtranslation approach: given a passage and its source context, the model is asked to write the user message that would cause a chatbot to produce a similar text. Domain-specific prompt templates (government, literary, academic, tax guidance, news, speech) ensure that the generated instructions match the register and genre of the source text.

Construction

1 — Subset selection

Subsets consisting primarily of historical or archaic Danish were excluded, leaving 32 contemporary subsets. 10,000 IDs were randomly sampled without replacement from the full pool of IDs across these subsets. No annotation-based quality filter was applied.

2 — Passage extraction

Articles shorter than 400 characters were discarded. Longer articles were chunked into passages of up to 2,500 characters using a hybrid scoring approach (paragraph boundary detection with quality scoring). A maximum of 2 passages per article was kept.

Passage-level quality filters reject:

  • —OCR noise (inter-word double spaces, ligature splits, high mixed-alphanumeric token ratio)
  • —Repetitive content (unique word ratio < 28% or word run ≥ 6)
  • —Document colophons and mastheads (phone/email/ISSN markers in first 300 chars)
  • —YAML/markdown frontmatter

3 — Prompt generation

For each passage, Qwen3.5-397B-A17B was prompted with the passage text and source context metadata to generate a Danish user instruction. Six domain-specific system prompts were used:

  • —government — administrative and public information requests
  • —literary — prose, fiction, letters and historical texts
  • —academic — scholarly articles and analytical texts
  • —tax_guidance — practical citizen queries about tax rules
  • —speech — parliamentary speeches and public addresses
  • —news — news articles and encyclopedic texts (default)

Generated prompts were validated with rule-based filters: language detection (must be Danish), user-request detection (must include a question or imperative verb), shouting token check, roleplay pattern rejection, and prompt-target content overlap check.

4 — Results

8,271 instruction pairs generated from 10,000 randomly sampled source IDs across 32 dynaword subsets.

Source coverage

SubsetDomainSource typePairs
wikiencyclopedianews2,263
retsinformationdklegalgovernment1,567
ai-aktindsigtgovernmentgovernment1,242
nordjyllandnewsnewsnews633
tv2rnewsnews451
cellarEU documentsgovernment438
ncc_maalfridweb/governmentgovernment277
health_hovedstadenhealthgovernment236
opensubtitlesfilm/TV subtitlesliterary220
Domsdatabasenlegalgovernment179
municipality_meetingsgovernmentgovernment177
skattaxtax_guidance115
hestforumnews90
tidsskrift-dkjournalism/academicacademic53
wiki_miscwiki commentsnews45
kbadministrativepublicationadministrativegovernment39
retspraksislegalgovernment38
ncc_booksbooksliterary37
miljoeportalenenvironmentgovernment36
wikibookseducationalnews25
danske-talerspeechesspeech24
epEU parliamentspeech20
eur-lex-sum-daEU lawgovernment13
wikisourcebooksliterary10
ftparliamentspeech9
ncc_newspapernewsnews9
depbanklinguistic corpusliterary8
ncc_parliamentparliamentspeech7
fm-udgivelsergovernmentgovernment4
botxtbooksliterary2
naatwebspeech2
notaaccessible libraryliterary2

Schema

python
{
    "id": "backtranslation_passages_dynaword-<hash>",
    "prompt": "Danish user instruction (generated)",
    "target": "Danish text passage (from source corpus)",
    "meta": {
        "passage_idx": 0,                # passage index within the source article
        "source_config_name": "skat",    # HuggingFace config name
        "source_dataset": "danish-foundation-models/danish-dynaword",
        "source_id": "skat::SKM...",     # original article ID
        "source_key": "skat",
        "source_name": "skat",           # dynaword subset name
        "source_record_index": 42,
        "source_split": "train",
        "source_type": "tax_guidance",   # prompt template used
        "target_chars": 1842
    },
    "sources": [
        {"config_name": "skat", "dataset": "danish-foundation-models/danish-dynaword",
         "row_id": "skat::SKM...", "split": "train"}
    ]
}

Usage

python
from datasets import load_dataset

ds = load_dataset("oliverkinch/da-instruct-dynaword-contemporary")
# ds["train"]

# Format for SFT
def format_example(row):
    return {
        "messages": [
            {"role": "user",      "content": row["prompt"]},
            {"role": "assistant", "content": row["target"]},
        ]
    }

Licence

This dataset inherits the licences of the constituent DynaWord subsets. Subsets carry a range of open licences (CC0, CC-BY, CC-BY-SA, government open data). See the DynaWord dataset card for per-subset licence details.

The generated prompt column was produced with Qwen/Qwen3.5-397B-A17B and is released under CC-BY 4.0.

Related datasets

DatasetSubsetsQuality filterPairs
`oliverkinch/da-instruct-dynaword-contemporary`contemporary onlynone8,271
`oliverkinch/da-instruct-dynaword-contemporary-hq`contemporary onlydynaword-annotations11,303
`oliverkinch/da-instruct-dynaword-hq`all 40 subsetsdynaword-annotations10,660
`oliverkinch/da-instruct-dynaword`all 40 subsetsdynaword-annotations39,847