Download README.md from maxhugger/nushell-tool-calls: direct link, hf CLI and curl.
- Browser
- Download file 4.27 kB
-
https://huggingface.co/datasets/maxhugger/nushell-tool-calls/resolve/main/README.md
- Command line
-
hf download hf://datasets/maxhugger/nushell-tool-calls/README.md
-
curl -L -o README.md https://huggingface.co/datasets/maxhugger/nushell-tool-calls/resolve/main/README.md
license: apache-2.0
language:
- en
task_categories:
- text-generation
tags:
- nushell
- tool-calling
- synthetic
- shell
size_categories:
- 1K<n<10K
configs:
- config_name: default
data_files:
- split: train
path: train.jsonl
- split: test
path: held_out.jsonl
Nushell tool calls
1,203 requests, each with the one run_nushell call that answers it and the value that call returns, over 20 small generated projects. Everything is generated: the projects from seeds, the commands by sampling Nushell's own command signatures and keeping only chains that run, the requests by a small language model (LFM3 1.7B) in six styles. Nothing was written by hand.
It was made to fine-tune LFM3 1.7B, which goes from 8% to 92.6% correct on the held-out split, scored by executing its calls.
Files
| File | Rows | What it is |
|---|---|---|
train.jsonl |
972 | Requests over 16 projects |
held_out.jsonl |
231 | Requests over 4 projects that are held out whole |
environments.jsonl |
20 | Each generated project: its seed, layout and every file's content |
chains.jsonl |
401 | Each verified command chain with its value and the plain description of its steps |
eval_set.jsonl |
231 | The held-out requests as chat messages with the tool definition, ready to send to any chat endpoint |
manifest.json |
Seeds, generator settings and where the sampling weights came from: enough to regenerate the rest | |
experiments/grader_*.jsonl |
6,552 | Request × call rows with broken and equivalent variants of each call (ten failure types), from an experiment that is not part of the main pipeline |
A row
| Field | Meaning |
|---|---|
id, chain_id, env, category |
Which chain and project it comes from |
speech |
The request, as a person might type it |
style |
The style it was written in (hurried formatting, abbreviations, plain language, part for the whole, analogy), or the composed fallback |
context, workspace_files |
What the model is told about the project |
references |
Syntax notes for the commands involved; present on every other request |
completion |
The reference call, as the model writes it after <tool_call> |
expected |
What the reference call prints when run in that project |
Scoring
A generated call is correct only if running it in the project returns expected (JSON compared by content, text compared exactly). The repository has the runner and scripts/eval_endpoint.py, which scores any OpenAI-compatible endpoint the same way.
Known flaws
- 268 of the 1,203 requests are the composed fallback, which lists the steps stiffly.
- About 4% of requests repeat part of the instruction the request-writing model was given.
- 6 of the held-out requests do not contain what their reference call needs.
- Some values depend on the machine they were generated on: the order
globreturns entries, the sizelsreports for a directory, and the time zone of modified times. - One reference value per request: another reasonable answer counts as wrong.
Links
- Code, notebook and how everything was made: maxtheman/nushell-lfm
- LoRA adapter (MLX): maxhugger/nushell-lfm3-1.7b-lora
- ONNX build for the browser: maxhugger/nushell-lfm3-1.7b-onnx
- Dataset: maxhugger/nushell-tool-calls
- Demo in the browser: nushell-lfm-demo
- Nushell in WebAssembly on its own: nu-wasm
Sources
Base model: LiquidAI/LFM3-1.7B. Method: Hu et al., LoRA: Low-Rank Adaptation of Large Language Models, ICLR 2022 (arXiv:2106.09685). Commands and their signatures: Nushell 0.117.0. Sampling weights: the Nushell book and cookbook; NL2Bash (Lin et al., LREC 2018); spignelon/bash_history; Shell Aliases on GitHub (Schröder & Cito, 2022). The full list is in the repository's CITATIONS.md.