Example

Example of an Enhanced Role-Playing Prompt for Mathematical Reasoning

To improve a Large Language Model's performance on mathematical tasks, a role-playing prompt can be enhanced by explicitly instructing the model to follow a structured reasoning process. For example, a prompt can assign an expert persona and also command it to adhere to specific steps: 'You are a mathematician. You will follow these detailed reasoning steps when solving math problems.' This dual approach not only sets an expert context but also guides the model through a methodical problem-solving framework.

0

1

Updated 2025-10-09

Contributors are:

Who are from:

Tags

Ch.3 Prompting - Foundations of Large Language Models

Foundations of Large Language Models

Foundations of Large Language Models Course

Computing Sciences