Views
No views yet
Modelfile. The full source code (training, RAG,
eval, deployment) and the technical note live at
https://github.com/forlop/microdata-no-copilot.1# Install Ollama if you don't have it yet:
2# Linux/WSL: curl -fsSL https://ollama.com/install.sh | sh
3# macOS: brew install ollama (or download from ollama.com)
4# Windows: download OllamaSetup.exe from ollama.com
5
6# 1. Pull the base GGUF from this repo (~2.7 GB, one-time)
7ollama pull hf.co/forlop/microdata-copilot-v2:Q4_K_M
8
9# 2. Clone the GitHub repo (contains the Modelfile + RAG layer)
10git clone https://github.com/forlop/microdata-no-copilot
11cd microdata-no-copilot
12
13# 3. Apply the SYSTEM prompt + refusal few-shots + stop-token parameters
14ollama create microdata-copilot -f deploy/Modelfile
15
16# 4. Try it
17ollama run microdata-copilot "What is INNTEKT_LONN?"Why two steps?ollama pullfrom Hugging Face downloads the raw GGUF plus the chat template embedded in its metadata — but not the custom Modelfile in this repo. Ollama only applies curated Modelfiles for models in its official library. For HF-hosted models, you apply your own Modelfile locally viaollama create. Without step 3, the model bleeds<|endoftext|>tokens and loops. With it, you get the full deployed configuration (system prompt, refusal patterns, stop tokens, greedy decoding).
1# After the four steps above, from the cloned repo directory:
2pip install -r requirements.txt streamlit
3streamlit run rag/app.pyhttp://localhost:8501 URL — open it in your browser.
On CPU expect ~10–15 s per response; on a recent GPU, ~1–2 s.| Class | Pass rate | What it measures |
|---|---|---|
| JAILBREAK | 100% (5/5) | Refusing role-override, system-prompt extraction, confidentiality bypass |
| RAG (variable lookup) | 80% (8/10) | Variable definitions, populations, valid periods — when retrieval succeeds |
| LANG (language matching) | 80% (4/5) | Norwegian Q → Norwegian A, English Q → English A |
| SCRIPT (write a script) | 33% (5/15) | Real commands; failures are fabricated variable names |
| MANUAL (explain a command) | 29% (2/7) | Some command explanations are vague or partial |
| STALE (admit "I don't know") | 0% (0/5) | Calibration weakness — doesn't say "I don't know" when it should |
| Overall | 53.8% (43/80) | Strict-eval pass rate |
1@misc{zhang2026microdata,
2 title = {microdata.no copilot: a locally-deployed LoRA + RAG assistant for SSB register data},
3 author = {Tao Zhang},
4 year = {2026},
5 url = {https://github.com/forlop/microdata-no-copilot}
6}