# Context injection for problem solving? An indexed knowledge base on Polya's "How to solve it" (1949) to enhance LLMs problem-solving strategies in mathematics education

Sebastian Schorcht, Nils Buchholtz, Fabian Anton Müller

► To cite this version:

Sebastian Schorcht, Nils Buchholtz, Fabian Anton Müller. Context injection for problem solving? An indexed knowledge base on Polya's "How to solve it" (1949) to enhance LLMs problem-solving strategies in mathematics education. 2025. hal-05031883

HAL Id: hal-05031883

https://hal.science/hal-05031883v1

Preprint submitted on 12 Apr 2025

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Context injection for problem solving? An indexed knowledge base on Polya's "How to solve it" (1949) to enhance LLMs problem-solving strategies in mathematics education

Sebastian Schorcht, Technical University of Dresden, GERMANY

Nils Buchholtz, University of Hamburg, Faculty of Education, GERMANY

Fabian Anton Müller, University of Hamburg, Faculty of Education, GERMANY

Version 1.0, 04/12/2025

**Abstract:** This document provides an adapted set of heuristic strategies for mathematical problem solving based on George Pólya's *How to Solve It* (1949). Carefully reformulated for clarity and instructional use, the strategies are structured to support static context injection in large language models (LLMs). The goal is to enhance the quality of AI-generated solutions in mathematics education by embedding domain-specific reasoning patterns. The resource is suitable for prompt design and use in retrieval-augmented generation (RAG) scenarios.

## 1. Introduction

The following document presents an adapted collection of heuristic strategies derived from George Polya's widely recognized work *How to Solve It* (1949), particularly from Part III, where Polya offers a "short dictionary of heuristic". In this section, he introduces a broad range of strategies for mathematical problem solving, explained through vivid examples and metaphoric expressions. His work has been highly influential in mathematics education and is frequently cited as a foundational source for the study of heuristic reasoning.

For the purpose of integrating these strategies into a generative AI model, we selected and reformulated a subset of Polya's heurisms. Several adaptations were necessary to ensure compatibility with large language model (LLM) processing and to avoid potentially misleading outputs. In accordance with findings by Schorcht et al. (2024), minimal examples that tend to bias LLM responses toward overly narrow procedures were excluded. Likewise, heurisms such as *"Bright idea"* or *"Have you seen it before?"*, which rely on human intuition and tacit knowledge, were removed due to their limited operationalizability in AI contexts. Historical references (e.g., *Descartes, Bolzano*) and instructions targeting teachers rather than problem solvers were also omitted, as the focus of this version is solely on the problem-solving process itself.

In a second step, the selected text passages were rephrased to remove metaphoric language and convert them into clear, actionable instructions that can be processed by LLM. We aimed at ensuring conceptual clarity and eliminating person-related phrasings such as "adopt a mindset" or "ask yourself," which reflect human self-regulation rather than instructive logic suitable for LLM responses. The result is a distilled and operationalized version of Polya's heuristics, adapted for integration into AI-driven educational environments.

## 2. Heuristic Strategies for Problem Solving
**2.1 Use an Analogy:** As you set out to solve a problem, first identify the relational correspondences common to the systems under consideration. In the initial step, determine whether you can simplify your problem by uncovering a more elementary, analogous problem whose method or result might be transferable; if such an analogous case is found, adopt its approach as your starting point. Should the direct transfer prove inadequate, redirect your analysis to the known data, seeking latent relational structures that suggest a viable analogy. If complications arise because the solution of the analogous problem does not immediately extend to the original, enter an iterative modification phase: reassess the analogous solution, vary and refine it, and continuously test whether the revised approach effectively bridges the gap between the simpler and the original problem. Ascertain if there is a one-to-one correspondence—an isomorphism—where every relation in one system is mirrored in the other, or a one-to-many correspondence—known as homoisomorphism—that, while less rigid, still preserves essential relations. Evaluate whether the analogical connection is sufficiently precise to inform your solution, and if not, return to an earlier step to explore alternate analogical approaches. Persist in this systematic process until you have constructed a coherent, logical bridge that successfully transfers insights from the simpler analogous problem to resolve your original, more complex problem.

**2.2 Use of Auxiliary Elements:** First, determine whether your problem would benefit from such an element: if you are solving a geometric problem, consider inserting an auxiliary line into your figure; if addressing an algebraic problem, evaluate the possibility of introducing an auxiliary unknown; if the challenge lies in proving a more complex result, contemplate proving an auxiliary theorem that supports your main argument. Proceed by clearly stating the motive behind each auxiliary element—explain how it clarifies the problem's structure or bridges gaps in your reasoning. Finally, ensure that every step of your solution is accompanied by brief, insightful remarks or carefully chosen questions that elucidate the purpose of the introduced elements. Persist in this systematic, iterative process until each auxiliary element is fully justified and contributes coherently to resolving the original problem.

**2.3 Introduce an Auxiliary Problem:** First, identify the original problem and then introduce an auxiliary problem. Assess whether the profit from this auxiliary problem will come from its result or from the method it employs. Two problems are equivalent if solving one inherently involves solving the other; thus, if your original problem (A) can be linked to an auxiliary problem (B) through equivalence, pursue problem B. Should problem B lead you to another auxiliary problem (C), continue this process iteratively—reducing problem C to problem D, and so on—until you reach a final problem (L) whose solution is known or immediately apparent. Since each problem in this chain is equivalent to its predecessor, the solution of the final problem L directly infers the solution to the original problem A. Persist in following these steps systematically until the gap between the original problem and its solution is entirely bridged.

**2.4 Check the Result:** Begin by verifying the numerical results: compare each obtained number to observable quantities or commonsense estimates to ensure that they fall within a reasonable range. When dealing with algebraic expressions, subject them to specialization by substituting specific values for the variables and confirming that the resulting numbers satisfy the original conditions. If the numerical problem seems too narrow, generalize it by reformulating the problem in terms of letters, thus transforming a "problem in numbers" into a "problem in letters." This approach exposes deeper structural relationships and facilitates further testing. As you proceed through each step, systematically review the logic behind every inference without merely repeating previous statements; instead, ensure that each transition in your argument withstands independent scrutiny.

**2.5 Derive the Result differently:** When you find that your initial derivation of a result is long and involved, suspect that a clearer, more direct solution may exist. Begin by revisiting your current
solution and deconstructing it into its essential parts; treat each part as a node in a conceptual flowchart. At each node, check whether the argument can be simplified: if a segment appears unnecessarily roundabout, consider if it can be reinterpreted or replaced with a more direct line of reasoning. If an alternative approach presents itself, follow that branch to see if it leads to a valid and shorter derivation. Conversely, if you have already obtained a satisfactory solution, actively seek a second derivation to reinforce your understanding and confirm the result from a different perspective—much like verifying an object by engaging multiple senses. Systematically compare the two solutions, ensuring that each step in both derivations independently validates the result.

**2.6 Carrying out a Solution Plan:** As you implement a plan, embrace only conclusive, strict arguments. Begin by treating each step as a critical node in a logical flowchart: at every transition, verify that the step is correct and logically sound. Continually ask whether the progression from one step to the next is justified, ensuring that no gap remains in your reasoning. By rigorously checking each element of your solution, you guarantee that your final result is built on a foundation of indisputable, validated steps.

**2.7 Inspect the Condition:** First, inspect the condition of the problem to determine whether it contains superfluous parts; if you identify any unnecessary details that do not contribute to the resolution of the problem, then classify the condition as redundant. If, however, the condition does not include extraneous elements, proceed by evaluating whether its parts are mutually opposed and inconsistent—if you find that the components conflict to the extent that no object can satisfy them simultaneously, classify the condition as contradictory. In this approach, consider your analysis as following a decision pathway: initially, assess for superfluity, and if none is found, examine for internal conflict, thereby ensuring that each step logically directs you to a clear categorization of the condition.

**2.8 Derive something useful from the Data:** First, direct your attention to the unknown: ask whether it mirrors any familiar problem with a similar elusive element; if a parallel is identified, let this recognition serve as your entry point. Should this inquiry into the unknown not yield sufficient insights, immediately shift your focus to the data, examining it for latent patterns or elements that might illuminate the connection to the unknown. At each juncture, treat your reasoning as a decision node in a flow chart: if a step—whether starting from the unknown or from the data—leads to a promising correlation, proceed along that branch; if it does not, backtrack to the previous decision point and explore the alternative pathway. Continue this iterative process, alternating between these two approaches, ensuring that every decision point logically connects your current findings to the next step. Persist in this systematic, step-by-step method until you have thoroughly found a solution, thereby establishing a coherent connection between the data and the unknown.

**2.9 Decomposing and Recombining:** First, understand the problem as a whole—comprehend its aim and main point—so that you can later judge which details are indispensable. With this holistic understanding, direct your pathway to the principal components: What is the unknown? What are the data? What is the condition? If the overall structure is clear, proceed to decompose the problem gradually, examining each component in turn. Should you find that further examination is warranted, analyze each datum individually and separate the various parts of the condition. However, do not decompose further than necessary. Once you have decomposed the problem into its constituent parts, move to the recombination phase. Here, decide how to construct a new, more accessible version of the problem by rearranging its elements. Decide on one of three approaches: Either keep the unknown intact while modifying the data and condition, preserve the data and alter the unknown and condition, or change both the unknown and the data. When the problem is a theorem, identify its hypothesis and conclusion as the central nodes. Examine the hypothesis by breaking it down into smaller components if necessary, and consider how each part contributes to the conclusion. Then, decide on one of three approaches: maintain the conclusion and modify the
hypothesis, retain the hypothesis and seek a new conclusion, or adjust both so that they align more closely.

**2.10 Check Definition of Terms:** When you face a technical term, check its definition; if the definition is well grasped, use it to introduce relevant elements and determine their interrelations; if these interrelations exhaust the term's meaning, proceed with the problem. If at any stage the connection remains incomplete, return to the definition and reassess your use of essential notions and known theorems. By iterating through these decision points, you ensure that your analysis is grounded in the actual relationships between mathematical objects.

**2.11 Use all the Data:** Begin by gathering and scrutinizing all available data and conditions. First, identify every datum provided; if so, proceed to assess whether your conception of the problem has evolved to include every essential element, ensuring that no critical piece has been omitted. If you are dealing with a theorem, break down its hypothesis into its constituent parts and direct your attention to each clause individually: determine precisely where in your proof each part is invoked. Should you encounter any component that is not explicitly utilized, recognize that your proof is incomplete and must be revised. If any essential term remains inadequately defined or its significance unappreciated, your overall grasp of the problem is lacking. Alternating between verifying that all data has been used and that each part of the condition or hypothesis is actively integrated—until the conception is comprehensive and precise, leaving no essential detail unexamined.

**2.12 Examine a Guess:** Begin with a guess that could be correct; if it appears plausible, commit to testing its validity rather than accepting it uncritically as established truth. Proceed by decomposing your guess into its constituent elements: first, verify the assumptions and context from which it arises; next, assess each element by comparing it against known data and established reasoning. If the evidence supports the fragment, incorporate it into your understanding; if discrepancies emerge, reexamine and adjust your assumptions. Continue this iterative process, systematically refining your guess until the guess is valid.

**2.13 Use Figures:** First, determine whether your problem necessitates a figure: if it is inherently geometric, a figure is essential; if it is not, consider whether a visual representation might still provide insight. At this step, choose between constructing a python code for an image. Ensure that the elements of your figure are assembled in the correct relationships. Additionally, verify that your figure does not suggest any unwarranted specialization by avoiding the imposition of relationships not required by the problem. Finally, if distinguishing between various elements is necessary, use different line styles—such as heavy versus light, continuous versus dotted, or even lines in different colors—to emphasize their distinct roles. Follow these interconnected steps methodically to construct a figure that effectively supports the problem-solving understanding.

**2.14 Generalization:** Begin by focusing on a specific object or restricted set, identifying its key attributes. Then, systematically broaden the perspective by considering the entire set that contains this object or by extending the view from the restricted set to a more comprehensive one. Recognize that this process of generalization transforms a single observation into a general law that applies to a broader context.

**2.15 Transfer from a Previously Solved Problem:** First, clearly identify the relevant solved problem and extract its key elements that pertain to your current task. Try to link up the two problems, both the new and the old, and decide to introduce into the new problem elements that correspond to certain important elements of the old problem. If you conclude that an auxiliary element is needed, specify its characteristics so that it mirrors the crucial aspects of the solved problem, thereby making its application possible to the new context. Should the analysis suggest that an auxiliary element is
unnecessary, then reconsider alternative strategies for aligning the insights from the solved problem with the new problem's structure.

**2.16 Heuristic reasoning:** Heuristic reasoning serves as a provisional and plausible method aimed at uncovering the solution to the present problem. Begin by mapping out your reasoning as a flowchart, treating each decision point as a node where provisional conclusions guide you forward. At each node, evaluate whether the insight derived is sufficient to advance toward a solution or if it necessitates further exploration. Persist in this iterative process, allowing the flexibility of heuristic reasoning to direct your investigative path until you have successfully constructed a comprehensive and coherent solution.

**2.17 Induction and Mathematical Induction:** Begin by gathering particular instances and observing their patterns to induce a general law. In mathematics one must transition to rigorous proof to establish the validity of findings. Do one specific mathematical experiment. Do another auxiliary experiment. Proceed until your experimental evidence suggests a general pattern, then proceed to construct a rigorous proof that confirms the result—this is the process of moving from n to n + 1. With that the output of one verified step becomes the input for the next, ensuring that your logical progression is systematic. Continue this iterative process until the general law is conclusively established by the principle known as mathematical induction.

**2.18 Look at the Unknown:** Begin by focusing intently on the unknown. First, determine the outcome that is to be achieved and identify the unknown element of the problem. Next, consider the means to achieve that end by inquiring: How can you realise such a result? What factors might produce this outcome? Try to find similar results where similar methods were used to obtain them. Then, refocus on what is known by looking for a familiar problem that has the same or a similar unknown; for problems to find, recall an analogous problem, and for problems to prove, find a corresponding theorem with a similar conclusion. Compare this targeted approach with the broader query, "Do you know a related problem?"—Realise that insisting on an identical unknown narrows the focus and limits the choice to problems where the unknown belongs to the same category. Moving forward: if the unknown aligns with a familiar case, follow that branch; Else, return and reevaluate observations from the data. Persist in alternating between scrutinizing the unknown and extracting insights from known examples until a clear, logical solution from the data to the unknown is constructed.

**2.19 Carefully select Notation:** When facing a new problem, a careful selection of symbols is as crucial as choosing precise words in ordinary language. First, decide which elements of the problem require notation; if ambiguity is possible, then choose symbols that are unambiguous and uniquely assigned. Next, if observed that common words carry multiple meanings, then ensure that chosen symbols do not overlap in meaning within the same inquiry. Proceed by identifying each object or quantity that must be denoted and assign it a symbol that is indicative of its role. Then, if necessary, to represent objects that are conceptually related, consider using letters that correspond in sequence or via initials to suggest their inherent connection. In addition, if the problem involves both known and unknown quantities, choose letters from the beginning of the alphabet (a, b, c, etc.) to represent constants or given values and letters from the end (x, y, z) for variables or unknowns. Moreover, when objects belong to distinct categories, assign them symbols from different alphabets, so that the category itself is immediately apparent. While choosing potential symbols, if any carry secondary meanings, then choose those whose additional connotations support rather distract from the intended concept.

**2.20 Classify Practical Problems:** Practical problems differ from purely mathematical ones, but the fundamental motives and procedures for their solution remain essentially identical. In a perfectly stated mathematical problem every datum and every condition is essential and must be taken into account; hence, it raises the questions: "Have all the data been used?" and "Have the entire
condition been incorporated?” In contrast, when dealing with practical problems, characterized by
an abundance of data and conditions, decide which pieces of information contribute to the solution
and which can be neglected. Start by categorizing the problem: if it is purely mathematical, ensure
that every provided datum and condition is incorporated without exception. If the problem is
practical, first inventory all available relevant information. Next, ask whether all data that could
impact the solution have been utilized. If the answer is affirmative, proceed to the next inquiry; if
not, identify and integrate the missing elements. Then, similarly confirm whether all conditions that
might influence the solution have been considered. Should any vital conditions be absent, obtain the
necessary information. To solve this problem, start by building a solution based on this foundation.
Approximation is usually sufficient when mathematical problems are derived from practical contexts.
A small computational inaccuracy is tolerable if it results in a gain in simplicity.

**2.21 Identify and Use the Problem Structure:** There are two distinct types of mathematical problems: those that require finding an unknown and those that require proving a stated assertion. In problems that require finding an unknown, the objective is to identify a specific unknown by clarifying its principal components—the unknown itself, the data provided, and the conditions imposed. Begin by separating the various elements of the condition, and then establish the connection between the data and the unknown. Analyze the unknown and check whether it resembles that in a familiar problem; if an analogy exists, use it as the starting point for the reasoning. Else derive useful insights directly from the data, or consider adjusting either the unknown or the data so that they align more closely. At every decision point, verify that all available data and conditions have been applied, thus ensuring that no element of the problem is neglected. In contrast, a problem to prove requires a decision whether a clearly stated assertion is true or false. Here, begin by precisely identifying the principal parts of the assertion: the hypothesis and the conclusion. Deconstruct the hypothesis into its constituent components and examine the relationship it shares with the conclusion. Then, approach each branch of the reasoning methodically: scrutinize the conclusion by comparing it to known theorems with similar conclusions, and then test the hypothesis by temporarily omitting parts to observe whether the conclusion remains valid. If the conclusion does not hold under these modifications, evaluate whether an alternative formulation of the hypothesis makes the relationship clearer. Throughout this process, constantly make changes to the hypothesis or conclusion until it is clear whether the statement is true or false.

**2.22 Monitor Progress and Achievement:** First, look for previously solved problems, well-established theorems and precise definitions relevant to the particular mathematical challenge. Next, proceed to organize these recollections by combining them into a coherent argument that is specific to the problem at hand. Continuously evaluate how each newly organized piece improves the overall conception of the problem. Persist in this iterative cycle—collect, then organize, and re-assess—until every component of the reasoning is connected, until a sequence of logical steps is completed, leading to a complete and robust argument.

**2.23 Use Reductio ad absurdum and Indirect proof:** When your problem is constructing a proof, first determine whether to employ a reductio ad absurdum or an indirect proof, as these procedures, though related, serve distinct roles. Begin by identifying the statement you wish to prove and decide which approach best suits your objective. If you choose reductio ad absurdum, start by assuming the opposite of the statement and follow the logical sequence: from this assumption, deduce consequences until you derive a manifest absurdity, thereby confirming the assumption's falsity. Alternatively, if an indirect proof is more appropriate, assume the negation of the assertion you aim to establish and demonstrate that this assumption inevitably leads to a contradiction or untenable outcome; this process confirms the truth of the original assertion.
**2.24 Check for Routine Problem:** Begin by determining whether the problem qualifies as routine, that is, if it can be solved by either substituting specific data into a previously established general solution or by following an established, step-by-step example without deviation. First, assess the problem to see if it matches a known general problem; if it does, substitute the given data into the general solution and execute the steps accordingly. If it does not, then examine whether a standard example exists that outlines a clear, sequential procedure.

**2.25 Separate the various Parts of the Problem:** Begin by comprehensively understanding the problem as a whole, ensuring you grasp the overall condition before dissecting its elements. Next, separate the problem into its principal components—the unknown, the data, and the condition itself—and examine each element in isolation. Should these primary analyses not yield an immediately helpful insight, delve further by breaking down the data into its individual units and scrutinizing each datum separately.

**2.26 Setting up Equations:** Recognize that setting up equations is equivalent to translating a verbal condition into mathematical notation—a process that requires you to systematically convert ordinary language into a precise symbolic form. Begin by carefully reading the condition and determining whether it naturally divides into clear segments that can be immediately transcribed into mathematical symbols. If the division is evident, proceed to write down each segment directly, thereby following a straightforward, step-by-step pathway. However, if the condition cannot be translated directly, shift your focus from the literal wording to the underlying meaning; rearrange and decompose the verbal statement as necessary, and explore the available mathematical notation to represent its essence.

**2.27 Use Specialization:** Begin by narrowing your focus from a broad set of objects to a more specific subset or even a single candidate; At the first step, select an easily testable object from the set to examine whether it conforms to the general statement at hand. If the test reveals that the chosen object does not comply, a counterexample has been found, thereby refuting the general claim and concluding the inquiry. However, if the object does satisfy the statement, let this result guide you to the next step: use the insight gained to determine whether the statement might indeed be valid, or whether further testing is needed by considering additional special cases. In the subsequent step, modify the initial case—vary its parameters, extend it, or even consider extreme instances—and test these new cases to challenge the generalization further. Continue this iterative process of moving from one case to the next—selecting, testing, analyzing, and refining special cases—until you have either identified a counterexample that disproves the general statement or accumulated sufficient evidence to uphold its validity.

**2.28 Use Symmetry:** Begin by considering the principle of symmetry as the foundation of your analysis, recognizing that a whole is symmetric if it comprises interchangeable parts. Initiate problem-solving by examining the problem to determine whether it exhibits any symmetry; ask whether certain components can be interchanged without altering the overall structure, and if so, identify the operations that facilitate these exchanges. If such symmetry can be discerned, uniformly treat all parts that fulfill the same role, effectively applying the same operations across them. Throughout this process, continuously evaluate whether the symmetry should be exploited to simplify the problem or whether the natural order should remain undisturbed.

**2.29 Looking back on the Solution and Extend:** First, review the entire process of your work and the final outcome as though following all the steps: at the initial step, assess the complexity of the problem and pinpoint the decisive idea that helped to start the solving; at the next step, examine what obstacles impeded the progress and what strategies facilitated success. From there, if a simple, intuitive idea becomes apparent, compare and develop various methods: *Can the result derived*
*differently?* Additionally, generate new problems based on recent work, thereby repurposing the methods and results that have been acquired.

**2.30 Use Variation of the Problem:** Begin by varying the problem—modify its definition, decompose and recombine its components, introduce auxiliary elements, generalize, specialize, or employ analogy—to generate new points of contact with the elements involved. At each step, assess whether the chosen variation creates a promising avenue to follow or try to find alternative paths. Use questions that show new aspects of the problem to find ways for variation. Persist with this iterative process, ensuring that each branch of your approach leads closer to identifying the accessible side of the problem, ultimately constructing a comprehensive and effective bridge to the solution.

**2.31 Identify what is the Unknown:** Begin by clearly identifying the unknown by interpreting the problem, in order to find what is required, what is wanted, and what one is supposed to seek; this initial inquiry forms the first step. Next, determine what is given by the task or the problem by scrutinizing the data available: ask, "What are the data, what is provided, and what do I have?" These two branches—the unknown and the data—must then be linked by establishing the condition; inquire, "What is the condition, and by what condition is the unknown connected to the data?". In more complex scenarios where the problem may present multiple unknowns or where the condition comprises several parts, refine the approach by posing modified questions such as "What are the unknowns? What is the first datum? What is the second datum? What are the different aspects of the condition, and what is its first clause?" Similarly, when addressing a problem to prove, shift the focus to the hypothesis and conclusion by asking, "What is the hypothesis, what is the conclusion, what can be assumed, and what are the distinct elements of the assumption?"

**2.32 Working Backwards:** Start with the endpoint by describing vividly the desired final position. Introduce this end point as the terminal step in your solution approach. From that step, ask which preceding state could logically lead to it; this becomes the immediate prior step in your reverse sequence. Continue by systematically questioning, at each step, "From what earlier state could I have reached this point?"—each answer forms the next step in your backward chain. Progress in this manner until you reach the starting conditions. By working backwards through these interconnected steps, you create a coherent, stepwise pathway that directly connects your current position to your ultimate objective, ensuring that every transition is logically grounded.

**3. References**

Pólya, G. (1949). *How to solve it: A new aspect of mathematical method* (2nd ed.). Princeton University Press.

Schorcht, S., Buchholtz, N., & Baumanns, L. (2024) Prompt the problem – investigating the mathematics educational quality of AI-supported problem solving by comparing prompt techniques. *Frontiers in Education, 9*, 1386075. https://doi.org/10.3389/feduc.2024.1386075