Training data sources
This document lists every source that goes into the Flipper One assistant's training data, how
each one is processed, and its license. The code that does it is scripts/build_sft_mix.py; its
docstring is the authoritative list of filters and caps.
Status: v0.1 is still being built. The numbers below are the caps the mix builder uses, not
final counts. Exact per-source counts for each released model will be in data/sft/stats.json
and on the model cards when v0.1 ships.
Overview
| Part of the mix | Share (approx.) | Made by |
|---|---|---|
| Generated tool-use conversations | at least ~35% of trained tokens | Teacher model + real lab tools + simulated hardware |
| Style variants (do / teach, learn / result) | rewrites of the above and of Q&A | Teacher model, checked automatically |
| Command and function-calling datasets | ~2,800 records | Public datasets |
| Security / networking / ham Q&A | ~1,600 records | Public datasets, Stack Exchange, NCVEC |
| General chat | ~10% of records | Public dataset |
Held out from training: the 150-conversation eval set (data/gen/val150.jsonl, plus near-duplicates
of its requests) and the KaliBench test split.
Models used to make the data
| Role | Model | License |
|---|---|---|
| Teacher: writes assistant turns | Inkling 2 Mini (UD-Q8_K_XL GGUF, llama.cpp), reasoning effort "medium" | Apache-2.0 |
| Tool simulator: hardware, modules, Flipper Zero | Inkling 2 Mini | Apache-2.0 |
| Style rewrites (teach mode, short answers) | Inkling 2 Mini | Apache-2.0 |
| Validator: scores each conversation | Laguna S 2.1 (Poolside) | OpenMDW-1.1 |
| Teacher for coding and log-review samples (planned for v0.1) | Laguna S 2.1 | OpenMDW-1.1 |
| Near-duplicate filter and rewrite checks (embeddings only, writes no text) | IBM Granite Embedding small English R2 | Apache-2.0 |
The teacher's reasoning traces are not trained on. Only its visible answers and tool calls are.
1. Generated tool-use conversations (the core)
scripts/gen_tool_data.py. For each sample the teacher invents a realistic user request in one
of 10 categories. It then runs a full tool-calling conversation using the tools in
data/tools/tools.json:
| Category | What it teaches |
|---|---|
single_tool, multi_tool, complex |
Doing the task with the right tools; complex is long and multi-step |
flipper_zero |
Driving a USB-attached Flipper Zero over its CLI |
knowledge |
Looking things up in the on-device knowledge base |
no_tool |
Answering directly when no tool is needed |
clarify |
Asking one short question when a detail is missing |
authorization |
Handling requests aimed at systems the user may not own |
unavailable |
Saying so when hardware or software isn't present |
tool_error |
Diagnosing and recovering from failing tools |
Where tool results come from:
- Real, in an isolated lab. Shell and Kali commands run in a Podman network with no internet
(
lab/). It holds a Kali container (the "Flipper One") and deliberately vulnerable targets: web, shop, ftp, ssh, smb, dns, mqtt and cache. - Real. Results from the knowledge base (see below) and web search.
- Simulated by the teacher. Wi-Fi/BLE radios, GPIO/UART/I2C/SPI/CAN, M.2 modules and the
Flipper Zero, because the device hasn't shipped. The simulator is grounded in
data/ref/flipper_zero_formats.md, which holds real CLI output formats recorded from a Flipper Zero with all identifiers replaced. It is also grounded in the CLI reference extracted from the Flipper Zero firmware source and indata/tools/result_formats.json. Within one conversation the simulator keeps state, so a missing module stays missing.
Automatic checks: a conversation is rejected, never patched, when any of these happen:
- a tool call doesn't match its schema;
- a host, IP or finding is invented that no tool result contains;
- calls loop or repeat;
- the assistant asks a needless authorization question;
- it reuses placeholder file names;
- the simulator leaks editorial notes.
Rejected rollouts are kept with the reason for analysis. Requests that are near-duplicates of an earlier round (Granite Embedding cosine ≥ 0.96) are not generated again.
Validation: Laguna S 2.1, a different model family from the teacher, scores conversations 1-5 on grounding, tool use, correctness, behavior and simulator consistency. A trial on 100 samples passed 95, rated 3 unsure and failed 2. Full-set validation is planned for v0.1.
At mix time:
- Lab network names and addresses are randomized per conversation:
lab.internalbecomescorp.local,home.arpaand similar, and the lab subnet becomes a random private /24. - Placeholder file names are replaced.
- Escalation copies are added: the conversation ends with a call to
escalate(hand off to the bigger model), for complex requests and long multi-tool requests.
v0.1 target: 3,000 accepted conversations from the main round, plus earlier pilot rounds.
2. Style variants
The user switches style in chat. "Just do it" gives quiet and short answers; "teach me" explains every step. No system flag is involved.
- Teach variants (
scripts/gen_teach_variants.py, ~1,300). The teacher rewrites a generated conversation's text in teach style: what it runs and why, the exact command, how to read the output, how to do it yourself. Tool calls and results stay byte-identical. Every rewrite is checked: it must show the commands, invent no IP, MAC, port or host, and keep the user's request (embedding similarity ≥ 0.94). - Mode switches inside one chat (built from existing conversations, no new text from a model): style persists, is switched on, or is switched off partway, plus explicit "just do it" requests.
- Q&A learn / result modes:
- Learn is the original full answer to a question that carries a learning cue.
- Result (
scripts/gen_qa_short.py, ~800) is a short direct answer the teacher condenses from the original. Every number, IP, CVE, port and command in it must appear in the original. - Ham radio explanations (
scripts/gen_ham_explain.py, queued for v0.1). The teacher writes a tutor-style explanation for each of the 1,389 exam questions that don't need a diagram: why the keyed answer is right, why the other choices are wrong, and the calculation step by step when there is one. Questions that cite an FCC rule get that 47 CFR Part 97 section's text in the prompt. The official answer key decides: an explanation is rejected if its answer doesn't match the key, it calls another choice correct, it drops a number that's in the correct answer, or it cites a Part 97 section that doesn't exist.
3. Commands and function calling
| Source | Used for | Cap | License |
|---|---|---|---|
| tldr-pages (common + linux) | Request → linux_command / kali_tool call, 122 tools; placeholders filled with realistic values |
1,000 | CC BY 4.0 |
| DCAgent/nl2bash-verified | The original NL2Bash pairs → linux_command call, deduplicated |
400 | see dataset card |
| Salesforce/xlam-function-calling-60k | Generic function calling with the dataset's own tools; only rows generated by Mixtral-8x22B (ids above 33,658) | 800 | CC BY 4.0 |
| glaiveai/glaive-function-calling-v2 | Generic function calling | 300 | Apache-2.0 |
| NousResearch/hermes-function-calling-v1 | Multi-turn function calling | 300 | Apache-2.0 |
Function-calling records keep their own tools and get no Flipper system prompt. Only records whose every call parses and names a listed tool are kept. Command records end on the call; no output is invented.
4. Security, networking and radio Q&A (no tool calls)
These teach the model when not to call a tool.
| Source | Used for | Cap | License |
|---|---|---|---|
| Stack Exchange (HuggingFaceTB/stackexchange_2025_md, HuggingFaceH4/stack-exchange-preferences for security.SE) | Accepted answers, highest score first. Quotas: security 200, unix 140, networkengineering 140, serverfault 70, superuser 40, reverseengineering 40, askubuntu 30, iot 20, raspberrypi 20; for general radio and antenna knowledge, Amateur Radio 300 and Electronics 150 (only questions tagged RF, antenna, radio, SDR, transmission line and similar) | 1,150 | CC BY-SA 4.0 (attribution URL kept per record) |
| Trendyol/Trendyol-Cybersecurity-Instruction-Tuning-Dataset | Defensive security Q&A | 400 | Apache-2.0 |
| PentesterFlow/OffsecCyber (train split) | Web offensive, HackerOne, PortSwigger labs, NVD subsets | 200 | Apache-2.0 |
| oi-uae/cyber-security | ARVO code review + NVD sample | 300 | see dataset card ("other") |
| NCVEC question pools: Technician 2026-2030, General 2023-2027, Extra 2024-2028 | US amateur radio exams (1,431 questions; the 42 that need a diagram are left out, and 10% are held out for evaluation). Three record types: result (the question, with or without its choices, answered with just the keyed answer), learn (question + a learning cue, answered with the checked explanation), and lookup ("what's the answer to T1A06?" answered after a real knowledge-base search) | 700 result, 700 learn, 150 lookup | Public domain |
| 47 CFR Part 97 (eCFR) | FCC amateur radio rules | (planned for v0.1) | Public domain (US Government) |
Answers over 1,500 tokens or with obvious junk (images, "as an AI language model", tiny answers) are dropped. Each Q&A also gets the learn/result variants described above.
5. General chat
| Source | Used for | License |
|---|---|---|
| HuggingFaceTB/smol-smoltalk | Short and medium general conversations, about 10% of records | Apache-2.0 |
6. Coding (planned for v0.1)
- Coding and log-review conversations made by Laguna S 2.1 and checked by running the code in the lab (about 600-800 coding and 300 log-review).
- bigcode/self-oss-instruct-sc2-exec-filter-50k (about 1,000; Apache-2.0 / ODC-By, see card).
On-device knowledge base (runtime tool, also seen in tool results)
The knowledge tool searches a local database built by scripts/build_knowledge.py. It isn't
training data itself, but its passages appear as tool results in generated conversations.
scripts/update_knowledge.sh keeps it current. Every day it pulls each source from upstream (tldr,
Flipper One docs, Flipper Zero firmware, Flipper's repositories, the current and previous year's NVD
feeds) and rebuilds. Every hour it checks whether any source on disk changed and rebuilds only then.
Each build runs on a copy and is swapped in only if no source lost passages, so a running generator
never reads a half-built database.
| Source | License | Shipped with the release? |
|---|---|---|
| tldr-pages | CC BY 4.0 | yes |
| Man pages (sections 1 and 8) of the Kali lab image | each package's license | yes |
| Flipper Zero CLI reference, extracted from the open firmware source | GPL-3.0 (firmware) | yes |
| NVD CVE records | Public domain (US Government) | yes |
| NCVEC ham pools and 47 CFR Part 97 | Public domain | yes |
| Flipper Devices' open-source repositories | each repo's license, recorded in a manifest | open-licensed repos only |
| Flipper One docs, docs.flipper.net | no license stated | no (local only) |
Passages from the unlicensed docs could appear in tool results during generation, where the teacher looked them up. That is a short quote in context, and such passages are never shipped as a database.
Excluded on purpose
| Source | Why |
|---|---|
| KaliBench train split | Generated and verified with Qwen3-Max. Excluded under the project's data-provenance policy; its test split is used only for evaluation |
| nvidia/Nemotron-RL-Agentic-Conversational-Tool-Use-Pivot-v1 | Generated with Qwen3 and DeepSeek models (same policy) |
| xLAM rows 0-33,658 | Generated by DeepSeek-V2-Chat (same policy) |
OffsecCyber qwen_cve subset |
Qwen-generated (same policy) |
smoltalk subsets smol-contraints (sic), smollm-rewrite-30k, smol-summarize-* |
Generated by Qwen2.5-72B per the SmolLM2 paper (same policy) |
| Team-ACE/ToolACE | Not used |
| Any output of Anthropic's Claude | Anthropic's terms forbid training models on Claude outputs |
| Raw Flipper Zero transcripts | Personal file names; only the scrubbed format reference is used |
Reproducing
Every step is in this repo. See CUSTOM_MODELS.md for the commands. The generated conversations themselves are not published yet.