wenmin-wu/ds-skills/assistant-prefill-response-steering
Claude Code and agent skill by wenmin-wu/ds-skills
- community
Checking that the SKILL.md file is still in the repository.
Steers LLM output format by injecting a partial assistant response into the chat template before generation, forcing structured output without fine-tuning.
Install
npx vskill@latest install wenmin-wu/ds-skills/assistant-prefill-response-steeringSKILL.md
Assistant Prefill Response Steering
Overview
LLMs often ignore output format instructions, producing preambles, explanations, or inconsistent delimiters. Prefilling the assistant turn with the desired format start (e.g., "Here are the keywords comma separated: ") forces the model to continue in that format. This works with any chat-templated model — inject the partial response, trim the template's trailing EOS tokens so generation continues, then strip the prefill from the decoded output.
Quick Start
Workflow
- Construct chat messages with user prompt and partial assistant response
- Apply chat template to get input token IDs
- Trim trailing EOS tokens so the model continues generating
- Generate with
do_sample=Falsefor deterministic output - Strip the prefill string from decoded output to get clean result
Key Decisions
- Prefill content: Match the exact format you want — "JSON: {" for JSON, "1." for numbered lists
- EOS trimming: Essential — without it the model sees a completed turn and generates a new user turn
- Suppress tokens: Use
begin_suppress_tokensto block newlines or special chars in the continuation - Fallback: If output is malformed, retry with a simpler prefill or longer max_new_tokens
References
- [USPTO LLM Solution [Prompt Eng]](https://www.kaggle.com/code/aerdem4/uspto-llm-solution-prompt-eng)
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/llm/assistant-prefill-response-steering/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/wenmin-wu/ds-skills/assistant-prefill-response-steering)