explaingit

joshhu/skillopt-qa

Analysis updated 2026-05-18

43PythonAudience · researcherComplexity · 4/5LicenseSetup · moderate

TLDR

A research reimplementation of Microsoft SkillOpt that trains a reusable text skill file to improve a frozen AI agent's accuracy on multi-step question answering, without retraining the model.

Mindmap

mindmap
  root((repo))
    What it does
      Trains skill text
      No weight changes
      Validation gate
    Tech stack
      Python
      uv
      OpenAI compatible API
    Use cases
      Study text optimization
      Reproduce SkillOpt paper
      Improve QA agents
    Audience
      Researchers
      ML engineers
    Requirements
      Python 3 point 10 plus
      Chat API endpoint
      HotpotQA dataset

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Reproduce the SkillOpt text-space optimization approach on the HotpotQA benchmark.

USE CASE 2

Train a reusable natural-language skill file to improve a frozen model's question-answering accuracy.

USE CASE 3

Study how a validation gate can prevent overfitting when optimizing prompts instead of weights.

USE CASE 4

Deploy a trained skill file into your own QA agent's system prompt.

What is it built with?

PythonuvOpenAI APIvLLM

How does it compare?

joshhu/skillopt-qaalibaba/omnidoc-tokenbencharccalc/dwmfix
Stars434343
LanguagePythonPythonPython
Setup difficultymoderatemoderateeasy
Complexity4/53/52/5
Audienceresearcherresearchergeneral

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 1h+

Requires a running OpenAI-compatible chat endpoint, such as a local Qwen model served via vLLM.

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

In plain English

This repository is a small, faithful reimplementation of Microsoft's SkillOpt, a research technique for improving AI agents without touching the underlying model. Instead of retraining a language model's internal weights, which is expensive and slow, SkillOpt trains a reusable block of plain natural language text called a skill file, which gets pasted in front of the agent's instructions to make it perform better on a task. This version is built specifically for HotpotQA, a benchmark of multi-step reasoning questions where the answer requires connecting facts from more than one source. The training process borrows ideas from neural network training, using rounds called epochs and small batches, but the thing being updated each round is text, not numbers. After each batch, a second AI model proposes a small, targeted edit to the current skill text. That candidate skill is tested on a held out validation set, and the edit is only kept if it actually improves accuracy, otherwise it is rejected and the optimizer is told not to repeat that idea. This validation gate is meant to prevent the skill from just memorizing the training examples. The only thing produced at the end of training is a single file, best_skill.md, which can be deployed with any compatible chat model by attaching it to that model's system prompt. To run it, you need Python 3.10 or newer, the uv package manager, and access to an OpenAI-compatible chat API endpoint, no GPU-specific packages are required, since the actual model runs elsewhere and this project just talks to it over the network. The default configuration expects a local Qwen model served through a compatible API. The project includes command line tools for downloading the HotpotQA dataset and for running the full training loop, along with a test suite that runs entirely offline using a fake model. The README includes a results table showing that on one experimental run, the optimized skill improved both validation and held out test scores over the seed skill, without changing any model weights, though the authors note the improvement was modest since the base model was already strong on this task.

Copy-paste prompts

Prompt 1
Walk me through how the validation gate in this project decides whether to accept or reject a skill edit.
Prompt 2
Help me set up a local OpenAI-compatible endpoint so I can run skillopt-train against my own model.
Prompt 3
Explain the difference between fine-tuning a model's weights and training a skill file like best_skill.md.
Prompt 4
Adapt this project's trainer.py loop to work with a different question-answering dataset.

Frequently asked questions

What is skillopt-qa?

A research reimplementation of Microsoft SkillOpt that trains a reusable text skill file to improve a frozen AI agent's accuracy on multi-step question answering, without retraining the model.

What language is skillopt-qa written in?

Mainly Python. The stack also includes Python, uv, OpenAI API.

What license does skillopt-qa use?

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

How hard is skillopt-qa to set up?

Setup difficulty is rated moderate, with roughly 1h+ to a first successful run.

Who is skillopt-qa for?

Mainly researcher.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.