license: apache-2.0
language: [en]
size_categories: [1K<n<10K]
tags: [sme, business-operations, document-management, data-management,
instruction-tuning, sft, qwen3.8, reasoning, thinking-model, agentic, tool-calling]
pretty_name: SME-SFT-DocData (Qwen3.8-27B)
SME-SFT-DocData (Qwen3.8-27B Native) — v2.0 production (9,342)
Agentic document + data management SFT dataset for Qwen3.8-27B
(abliterated or base). Teaches the model to manage business documents and data
for small and medium enterprises: search a document corpus, read and summarize
docs, browse folders, and run real aggregations / filters / stats over CSV tables —
then ground every answer in what the tool actually returned. Companion tohotdogs/cyber-sft-agent-qwen38 (the security tool layer); this v2.0 adds
RAG rows (passive retrieval) and advanced rows (error recovery, multi-doc
synthesis, temporal reasoning, conflict resolution) for production-grade robustness.
v2.0 composition
- 9,342 rows — train 7,799 / valid 1,028 / test 515 (stratified)
- 2,520 tool rows — 11 tools, 16 chain archetypes, every tool output computed from a deterministic per-seed world (a fictional SME's real folder tree + CSVs) so the evidence is consistent, not hallucinated
- 5,880 QA rows — pure document/data-management QA across 5 families (define / process / why / compare / situation), parameterized over 6 SME industries
- 192 RAG rows — passive retrieval: context provided inline (no tool calls), teaches model to reason from retrieved context directly
- 750 advanced rows — error recovery (200), multi-doc synthesis (300), temporal reasoning (150), conflict resolution (100)
11 tools
doc_search · doc_read · doc_sections · doc_summarize · doc_metadata · folder_list · csv_head · csv_aggregate · csv_filter · csv_stats · doc_compare
Document tools: doc_search, doc_read, doc_sections, doc_summarize, doc_metadata, folder_list.
Data tools: csv_head, csv_aggregate, csv_filter, csv_stats. Cross-doc: doc_compare.
Chain archetypes (2,520 tool rows)
| chain | rows |
|---|---|
single-search |
173 |
single-read |
170 |
single-aggregate |
189 |
single-filter |
186 |
D1-search-read |
184 |
D2-search-summarize |
121 |
D3-head-aggregate |
172 |
D4-filter-stats |
189 |
D5-folder-metadata |
156 |
D6-sections-read |
197 |
D7-aggregate-compare |
195 |
D8-compare |
178 |
D9-cross-check |
109 |
N1-search-empty |
9 |
N2-filter-empty |
114 |
N3-read-gap |
178 |
- Single-tool — one well-chosen call for a focused ask (find a doc, read it, roll up a column, filter a table).
- D1-D9 multi-tool — the real SME workflows: search→read, search→summarize, head→aggregate, filter→stats, folder→metadata, sections→read, two-aggregate compare, doc compare, and D9 cross-check (a report makes a claim; the model verifies it against the raw CSV and says whether they agree).
- N1-N3 negative evidence — anti-hallucination: an honest "not found" (N1), an empty filter that is correct because the threshold is above the max (N2), and a doc that exists but doesn't answer the question (N3).
Quality gates (all passing)
| gate | value | target | status |
|---|---|---|---|
| rows | 9,342 | — | — |
| tool-calling rows | 2,520 (27.0%) | — | ✅ |
| RAG rows (passive retrieval) | 192 (2.0%) | >0 | ✅ |
| advanced rows (err/multi/temporal/conflict) | 750 (8.0%) | >0 | ✅ |
| QA rows | 5,880 (62.9%) | — | ✅ |
| multi-turn chains (≥2 calls) | 52.5% | ≥10% | ✅ |
| think-tag coverage | 100.0% | 100% | ✅ |
| tool coverage | 100.0% (11/11 tools) | 100% | ✅ |
| evidence chain (anti-boilerplate) | 82.7% | ≥60% | ✅ |
| duplicate rows | 0.0% | <1% | ✅ |
literal-\n in text |
0.0% | <5% | ✅ |
| negative-evidence rows | 11.9% of tool (301) | >0 | ✅ |
| distractor-palette rows | 41.7% of tool (1051) | ~38% | ✅ |
| token length p50 / p95 / max | 273 / 1,343 / 3,729 | <4,096 | ✅ |
Byte-exact: all 9,342 rows re-render through the real Qwen3.8-27B chat
template and verified 9,342/9,342 = 100.0%, 0 render errors.
Token length measured with the real tokenizer (Qwen/Qwen3.5-0.8B (vocab 248044)).
Format (the important part)
Rendered through the real Qwen3.8-27B template and verified byte-exact.
Format facts (verified via byte ordinals):
| fact | value |
|---|---|
| Role tokens | ASCII: |im_start| / |im_end| wrapped in <> |
| think OPEN | think — 7 chars, NO slash |
| think CLOSE | think/ — 8 chars, HAS slash (asymmetric, don't normalize) |
| tool call | XML: tool_call + function=NAME + parameter=KEY (value on its own line) |
| tool result | role tool → rendered under a user wrapper + tool_response |
| arguments | a dict (template iterates .items()), non-null params in a fixed per-tool order |
Row schema
id— stable row idkind—tool(agentic chain),qa(pure QA),rag(passive retrieval),error_recovery,multi_doc,temporal,conflicttags— e.g.search,data,aggregate,multi,negative,qa,rag,error,temporaltools— function schemas exposed to the model (used tools + optional distractors; empty for RAG/advanced rows)messages— template-native list, rolessystem/user/assistant/tool; thinking inreasoning_content, calls intool_calls: [{name, arguments:{dict}}]meta—n_tool_calls,n_turns,chain,world,industrytext— the full pre-rendered template string (use for packing / single-text SFT)
Splits (stratified)
| split | rows | tool | RAG | advanced | QA |
|---|---|---|---|---|---|
| train | 7,799 | 2,142 | 134 | 525 | 4,998 |
| valid | 1,028 | 252 | 38 | 150 | 588 |
| test | 515 | 126 | 20 | 75 | 294 |
Usage
A. messages[] (trainer calls apply_chat_template)
from datasets import load_dataset
ds = load_dataset("hotdogs/sme-sft-docdata-qwen38", split="train")
row = ds[0]
messages, tools = row["messages"], row["tools"]
B. text (packing / single-text SFT, no template needed — recommended)
text = row["text"] # already byte-exact through the Qwen3.8-27B template
Recommended training config (Qwen3.8-27B, 4× RTX 3060 12GB)
lora:
r: 64
alpha: 128
target_modules: [q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj]
training:
seqlen: 4096 # covers 100% (real max 3,729 tok)
batch_size: 4
gradient_accumulation: 2
learning_rate: 2e-4
epochs: 3
Provenance
Generated by the sme-sft pipeline (Hermes Agent). Tool rows are produced from
deterministic per-seed worlds — each world is a fictional SME with a real folder
tree of documents (contracts, invoices, reports, HR policies, meeting minutes, product
sheets) plus CSV tables (sales, invoices, employees, expenses, customers); every tool
output is computed from that world, so a summary matches the doc and an aggregate
matches the CSV. QA rows are drawn from a combinatorial generator over 6 SME
industries and 5 question families. Date anchor: 2026-08-20. Format ground truth:
byte-ordinal analysis of the real template, validated 100% againsthotdogs/cyber-sft-agent-qwen38.