In recent years, the emergence of Small Language Models (SLMs) has opened new possibilities for deploying lightweight, efficient AI systems across various applications. However, SLMs produce limited outputs for tasks requiring complex reasoning and self-evaluation. Their limited capacity often results in suboptimal effectiveness, particularly in user-aligned generation tasks. This study introduces a novel framework that leverages Large Language Models (LLMs) to provide reflective feedback on the outputs generated by SLM-based autonomous agents. Given a user prompt, the SLM agent produces an initial response, which the LLM then evaluates in the context of user feedback to produce a reflection. This reflection is stored in a dynamic memory module for reflection. This provides a growing repository of corrective insights tailored to the SLM’s historical operation. These reflections are used to guide the SLM agent in outputting improved upcoming responses to user prompts. Our experimental evaluations, conducted on the SLMs Deepseek-8B and Phi-2 with 8 billion and 2.7 billion parameters, respectively, on the ARC challenge dataset, demonstrate improvements in output quality compared to the baseline approach, where the SLM agents self-reflect on their outputs. When prompted with external reflections, Deepseek-8B increases its accuracy score from \(62.78\%\) to \(81.38\%\) versus \(77.70\%\) with its self-reflections. Our findings highlight the effectiveness of externalized reflection memory as an augmentation strategy to enhance SLM agents’ outcomes without increasing inference-time cost.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Leveraging LLM Reflection to Improve Small Language Model Agents’ Capabilities

  • Aissa Hadj Mohamed,
  • Leandro A. Villas,
  • Julio Cesar dos Reis

摘要

In recent years, the emergence of Small Language Models (SLMs) has opened new possibilities for deploying lightweight, efficient AI systems across various applications. However, SLMs produce limited outputs for tasks requiring complex reasoning and self-evaluation. Their limited capacity often results in suboptimal effectiveness, particularly in user-aligned generation tasks. This study introduces a novel framework that leverages Large Language Models (LLMs) to provide reflective feedback on the outputs generated by SLM-based autonomous agents. Given a user prompt, the SLM agent produces an initial response, which the LLM then evaluates in the context of user feedback to produce a reflection. This reflection is stored in a dynamic memory module for reflection. This provides a growing repository of corrective insights tailored to the SLM’s historical operation. These reflections are used to guide the SLM agent in outputting improved upcoming responses to user prompts. Our experimental evaluations, conducted on the SLMs Deepseek-8B and Phi-2 with 8 billion and 2.7 billion parameters, respectively, on the ARC challenge dataset, demonstrate improvements in output quality compared to the baseline approach, where the SLM agents self-reflect on their outputs. When prompted with external reflections, Deepseek-8B increases its accuracy score from \(62.78\%\) to \(81.38\%\) versus \(77.70\%\) with its self-reflections. Our findings highlight the effectiveness of externalized reflection memory as an augmentation strategy to enhance SLM agents’ outcomes without increasing inference-time cost.