--- license: cc-by-4.0 pretty_name: Bintulu LLM Dataset (text-to-text, vector-ready) language: - en - ms tags: - text-to-text - text2text - bintulu - sarawak - borneo - tourism - energy-hub - bilingual - instruction-tuning - retrieval task_categories: - text-generation - translation language_details: Bahasa Malaysia (ms) + English (en); `mix` rows are task prompts in either language configs: - config_name: default data_files: - split: train path: data/train.jsonl --- # Bintulu LLM Dataset A text-to-text (prompt → answer) corpus about Bintulu, Sarawak — its national parks, beaches, energy industry, history, food, transport and guesthouse hospitality. Built for two uses: 1. **Fine-tuning** a text-to-text LLM (instruction, QA, dialogue, translation, NLI, MCQ). 2. **Embedding/retrieval** — every row's `text` field (canonically equal to `input_text`) is the embeddable surface for a vector store. ## Schema Each JSONL row: | field | type | meaning | |---------------|--------|-----------------------------------------------------| | `input_text` | string | prompt / source sentence (embed with `text`) | | `target_text` | string | expected answer / completion | | `text` | string | canonical embeddable surface (`== input_text`) | | `meta` | dict | `id` (`bintulu-t2t-#####`), `category`, `lang`, `source` | ## Counts - **Rows: 1681** unique `(input_text, target_text)` pairs (seeded, deduplicated). - Categories: translation (753), itinerary (300), sarawak_malay (282), knowledge_qa (69), multiple_choice (55), dialogue (49), recommendation (44), definition (39), instruction (35), nli (29), fact_check (26). - Languages: en 646, mix 502, **ms 533 (≥500 — includes 282 rows of Bahasa Melayu Sarawak dialect under the `sarawak_malay_*` categories)**. - Deterministic: regenerate identically with `python build_bintulu.py` (seed `20260905`). ## Load locally ```bash pip install datasets from datasets import load_dataset ds = load_dataset("ctaxnagomi/bintulu-llm-dataset", split="train") print(ds[0]) ``` or directly: ```bash python -c "import json; rows=[json.loads(l) for l in open('data/train.jsonl')]; print(len(rows))" ``` ## Embedding submission (vector store ingestion) Requirements for submitting this corpus to an embedding model: - **Model**: multilingual recommended for `en`/`ms` rows, e.g. `BAAI/bge-m3` (1024-dim) or `jinaai/jina-embeddings-v2-base-en` (T5-style, 8192-token window) via the Hugging Face Inference API. - **Embedded surface**: the `text` field, but for retrieval tasks embed the *query* and *document* with the same prompt style (`text` == `input_text`). - **Normalisation**: L2-normalise vectors before storing; retrieval uses cosine similarity. - **Truncation**: truncate to the model window (512 tokens for BGE-family / Sentence-BERT, 8192 for Jina v2). Truncate from the *left* for long prompts. - **Batching**: batch ≤ 64 rows, keep the HTTP connection alive, and retry with exponential backoff on HTTP 429 / 503. - **Precision**: store `float32`; row order must match `train.jsonl`. - **Auth**: send `Authorization: Bearer {{YourHFToken}}` (replace the placeholder with your HF read token; never commit the token). See [`scripts/embed.py`](scripts/embed.py) for a ready-to-run ingestion script. ## Grounding sources Wikipedia (Bintulu, Similajau National Park), Sarawak Tourism Board, Sarawak Forestry Corporation, Bintulu Development Authority (BDA), and sector-verified facts collected for the Kim Guesthouse project. Sarawak Malay dialect rows are grounded in Asmah Haji Omar (2015), Wikipedia "Sarawak Malay" (phonology and vocabulary, Nabilah Bolhassan 2019), the Borneo Dictionary Melayu Sarawak wordlists, and the DangoSarawak community glossary. Generated by a deterministic seeded builder (`ctecx-ai-grounded`, `ctecx-ai-grounded-sarawak`).