Enhancing Reasoning Capabilities of Small Language Models with Blueprints and Prompt Template Search

Dongge Han, Menglin Xia, Daniel Madrigal Diaz, Samuel Kessler, Ankur Mallick, Xuchao Zhang, Mirian Del Carmen Hipolito Garcia, Jin Xu, Victor Rühle, Saravan Rajmohan · 2025

Read Enhancing Reasoning Capabilities of Small Language Models with Blueprints and Prompt Template Search by Dongge Han, Menglin Xia, Daniel Madrigal Diaz, Samuel Kessler, Ankur Mallick, Xuchao Zhang, Mirian Del Carmen Hipolito Garcia, Jin Xu, Victor Rühle, Saravan Rajmohan (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2506-08669.txt.

Introduction

Dongge Han and co-authors published this language model study in 2025. Small language models are cheap to run but reason weakly, and their answers swing with small changes in wording. The team proposes giving them blueprints: structured, high-level reasoning guides produced by a large model. A blueprint lays out the steps for a class of problems, so the small model can follow a plan instead of improvising. A second mechanism searches prompt templates to find phrasings the small model handles best.

The framework was tested on math problems, coding tasks, and logic puzzles from benchmarks. Performance improved across all three areas. Crucially, the gains came without growing the model or retraining it. The large model is consulted only to write reusable guides, not to answer each query. The authors present blueprints plus template search as a lightweight upgrade path for capable reasoning on phones and constrained devices.

Catalog record

CREATORDongge Han, Menglin Xia, Daniel Madrigal Diaz, Samuel Kessler, Ankur Mallick, Xuchao Zhang, Mirian Del Carmen Hipolito Garcia, Jin Xu, Victor Rühle, Saravan Rajmohan
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE34 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2506-08669

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

Enhancing Reasoning Capabilities of Small Language Models with Blueprints and Prompt Template Search Dongge Han, Menglin Xia, Daniel Madrigal Diaz, Samuel Kessler, Ankur Mallick, Xuchao Zhang, Mirian Del Carmen Hipolito Garcia, Jin Xu, Victor Rühle, Saravan Rajmohan Abstract Small language models (SLMs) offer promising and efficient alternatives to large language models (LLMs). However, SLMs’ limited capacity restricts their reasoning capabilities and makes them sensitive to prompt variations. To address these challenges, we propose a novel framework that enhances SLM reasoning capabilities through LLM generated blueprints. The blueprints provide structured, high-level reasoning guides that help SLMs systematically tackle related problems. Furthermore, our framework integrates a prompt template search mechanism to mitigate the SLMs’ sensitivity to prompt variations. Our framework demonstrates improved SLM performance across various tasks, including math (GSM8K), coding (MBPP), and logic reasoning (BBH). Our approach improves the reasoning capabilities of SLMs without increasing model size or requiring additional training, offering a lightweight and deployment-friendly solution for on-device or resource-constrained environments. Figure 1 : Illustration of our framework. During training, for each SLM and task category, an LLM is used to generate blueprints using various input styles, from which the best blueprint is picked, and refined via APO. Then we perform template search to find the best prompt template. During inference, the chosen blueprint and template are reused across problems within the task category to form the input prompt to the SLM. 1 Introduction Large language models (LLMs) have demonstrated remarkable capabilities across a wide range of real-world applications. However, deploying LLMs often requires substantial computational resources, posing challenges in efficiency and their general applicability ( Wan et al. 2023 ; Chowdhery et al. 2023 ; Du et al. 2022 ) . Small language models (SLMs) ( OpenAI 2024b ; Jiang et al. 2023 ) such as Phi3-mini with only 3.8B parameters ( Abdin et al. 2024 ) , offer promising alternatives by providing efficient solutions that are also more accessible in resource-constrained environments. Despite these advantages, SLMs still face challenges that hinder their broader adoption. Due to their limited capacity, SLMs exhibit less reasoning capabilities such as in chain-of-thought (CoT) and in-context learning, as reported by ( Magister et al. 2022 ; Wei et al. 2023 ; Brown 2020 ) . For example, unlike LLMs, which can effectively extract abstract chain-of-thought reasoning patterns from the in-context examples and apply to new problems, SLMs’ limited reasoning capacity sometimes make it challenging for them to effectively extract and transfer insights from the examples to new problems, limiting their generalization capabilities. To address these challenges, we propose a novel framework that enhances SLM problem-solving via blueprints . A blueprint is a reusable, step-by-step reasoning guide designed to help SLMs solve a class of related problems. The blueprint is generated with an LLM by extracting high-level, abstract reasoning instructions from concrete examples, facilitating SLMs with a clear and actionable plan for tackling complex problems. Unlike CoT or in-context learning, where SLMs may struggle to come up with, or extract from the examples correct reasoning steps and generalize to new problems, blueprints provide explicit reasoning guidance to bridge this gap. By outlining high-level reasoning steps and sometimes incorporating illustrative examples, blueprints facilitate SLMs with the abstract reasoning steps and how to apply them to solve new problems. Moreover, we tailor the blueprint to each problem class and SLM by selecting from diverse blueprint styles and refining it using Automatic Prompt Optimization (APO) ( Pryzant et al. 2023 ) . In addition to blueprint generation, our framework incorporates a prompt template search mechanism as a further contribution to enhance the consistency of SLM performance, addressing their sensitivity to prompt variations. We evaluate our approach on various SLMs - GPT4o-mini ( OpenAI 2024b ) , Mistral-7B ( Jiang et al. 2023 ) and Phi3-mini, across a diverse set of tasks, including math (GSM8K Cobbe et al. 2021 ), coding (MBPP Austin et al. 2021 ), and logic reasoning (BBH Suzgun et al. 2022 ). The experimental results demonstrate that our framework consistently improves SLM performance, outperforming state-of-the-art methods. These findings highlight the effectiveness of blueprint-guided reasoning and prompt template optimization in overcoming the inherent limitations in the reasoning capabilities and sensitivity of SLMs. Figure 2 : Example LLM generated blueprint. The blueprint includes high-level reasoning steps, and optionally an in-context example question and solution process as a guide for how to apply the reasoning steps. 2 Related Work Prompt engineering is an efficient way to enhance LLMs, including methods like CoT ( Wei et al. 2022 ) , ReAct ( Yao et al. 2022 ) , ToT ( Long 2023 ) , and few-shot prompting ( Brown 2020 ) , as well as automatic prompt engineering methods ( Lester et al. 2021 ; Deng et al. 2022 ; Ma et al. 2024 ; Yang et al. 2024 ) such as APO ( Pryzant et al. 2023 ) , APE ( Zhou et al. 2022 ) , PromptBreeder ( Fernando et al. 2023 ) , and PromptWizard ( Agarwal et al. 2024 ) . These methods primarily focus on refining a short, high-level task description for an LLM. In contrast, our framework specifically targets the unique challenges of SLMs, such as limited reasoning capacity and prompt sensitivity, by generating reusable and structured blueprints from example problems and prompt template optimization. These blueprints provide explicit multi-step guidance tailored to SLM needs, offering detailed clarification and actionable reasoning support. While we used APO for blueprint refinement in our experiments, our framework is also versatile to integrate other aforementioned prompt refinement methods. 3 Method In this section, we present our framework designed to enhance the reasoning capability of SLMs with blueprints and prompt template search. Figure 3 : Sensitivity of SLMs to prompt variations across tasks - Even simple changes in the template, like swapping the order of <task-description> and <in-context-example> , can significantly affect performance, with impacts varying per SLM and task, e.g., in Sports understanding (Snarks, Sports understanding and Temporal sequences are sub-categories from the BBH dataset), GPT4o-mini performed better with examples before the task description, while Mistral-7B and Phi3-mini preferred the opposite. There is no universal best prompt template for all tasks and SLMs, making task and model-specific prompt optimization necessary. 3.1 Problem Formulation Fig. 1 shows an overview of our framework. We refer to a task \mathcal{T} as a collection of related problems (e.g., a math question) within the same category (e.g., causal judgement, math reasoning). During training, for each task category \mathcal{T} and SLM model \mathcal{M}_{slm} (e.g., Phi3-mini), we use a small set of examples to generate a blueprint that is tailored to guide the SLM with problem-solving for problems within \mathcal{T} ; we also generate a prompt template (e.g., <task-description><2-in-context-examples> <blueprint><question> , which defines the prompt components and their ordering). During inference, the blueprint and prompt template can be efficiently reused to form prompts to \mathcal{M}_{slm} across incoming problems within task \mathcal{T} . 3.2 Blueprint Generation and Optimization To address the limited reasoning capabilities of SLMs, we leverage an LLM \mathcal{M}_{llm} (we use GPT4o ( OpenAI 2024a ) in this work) to generate a reusable blueprint tailored per SLM per task. The blueprint serves as a structured guide, outlining the general pattern of steps

Read the complete text