Papers › Retrieval-augmented Generation to Improve Math Question-Answering: Trade-offs Between...

Retrieval-augmented Generation to Improve Math Question-Answering: Trade-offs Between Groundedness and Human Preference

4 Oct 2023arXiv:2310.03184archive 2025-07-28

Zachary Levonian, Chenglu Li, Wangda Zhu, Anoushka Gade, Owen Henkel, Millie-Ellen Postle, Wanli Xing

For middle-school math students, interactive question-answering (QA) with tutors is an effective way to learn. The flexibility and emergent capabilities of generative large language models (LLMs) has led to a surge of interest in automating portions of the tutoring process - including interactive QA to support conceptual discussion of mathematical concepts. However, LLM responses to math questions can be incorrect or mismatched to the educational context - such as being misaligned with a school's curriculum. One potential solution is retrieval-augmented generation (RAG), which involves incorporating a vetted external knowledge source in the LLM prompt to increase response quality. In this paper, we designed prompts that retrieve and use content from a high-quality open-source math textbook to generate responses to real student questions. We evaluate the efficacy of this RAG system for middle-school algebra and geometry QA by administering a multi-condition survey, finding that humans prefer responses generated using RAG, but not when responses are too grounded in the textbook content. We argue that while RAG is able to improve response quality, designers of math QA systems must consider trade-offs between generating responses preferred by students and responses closely matched to specific educational resources.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2310.03184")

Code

Syntology Ran 7 of 20 code samples harvested from 2 repositories linked to this paper; 13 have no recorded run. Of those that ran: 7 ran with no contract checked.

By repository: official repository: 15 samples from 1 repository, 7 ran; community (archive-listed): 5 samples from 1 repository, 0 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

digitalharborfoundation/rag-for-math-qa officialmentioned in papermentioned on GitHubMIT report
levon003/wiki-ores-feedback mentioned on GitHubMIT report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

20 samples harvested; 7 ran; 0 honoured the contract we drafted; 13 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

7ran
13unverified

Licence: 0 of the 20 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 2 repositories linked to this paper, official or community; each sample names its own and says which. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

cast_unicode digitalharborfoundation/rag-for-math-qa/src/experiment/auth.py official repository ran MIT (permissive) · adbb8e277c65f872 · report
get_completion_with_wait digitalharborfoundation/rag-for-math-qa/src/experiment/completion_utils.py official repository ran MIT (permissive) · bd9fa112de9cd9ef · report
get_distance_sort_indices digitalharborfoundation/rag-for-math-qa/src/rag/retrieval.py official repository ran fingerprinted MIT (permissive) · 46cb5857633642b6 · report
get_gpd_codes digitalharborfoundation/rag-for-math-qa/src/rag/gpf_utils.py official repository ran MIT (permissive) · 82c54c9e968c5109 · report
get_openai_embeddings_cached digitalharborfoundation/rag-for-math-qa/src/rag/embedding_utils.py official repository ran MIT (permissive) · 98a37e5d6771556e · report
is_valid_generation digitalharborfoundation/rag-for-math-qa/src/experiment/generate.py official repository ran MIT (permissive) · da2b82577b524fe9 · report
normalize_text digitalharborfoundation/rag-for-math-qa/src/rag/retrieval.py official repository ran fingerprinted MIT (permissive) · 94af878e3d7b1853 · report
create_stopword_token_set_from_word_list digitalharborfoundation/rag-for-math-qa/src/rag/logit_bias.py official repository unverified MIT (permissive) · 1c67a076bad0e201 · report
get_completion_noraise digitalharborfoundation/rag-for-math-qa/src/experiment/completion_utils.py official repository unverified MIT (permissive) · 8fda8a976b120b21 · report
get_completion_with_retries digitalharborfoundation/rag-for-math-qa/src/experiment/completion_utils.py official repository unverified MIT (permissive) · 37b5fee433b8ce88 · report
get_openai_embeddings digitalharborfoundation/rag-for-math-qa/src/rag/embedding_utils.py official repository unverified MIT (permissive) · 550fc2b428948b52 · report
get_token_counts digitalharborfoundation/rag-for-math-qa/src/rag/embedding_utils.py official repository unverified MIT (permissive) · c00df0e3ac6429e8 · report
get_tokenizer digitalharborfoundation/rag-for-math-qa/src/rag/logit_bias.py official repository unverified MIT (permissive) · aded11c82372d198 · report
passwd_check digitalharborfoundation/rag-for-math-qa/src/experiment/auth.py official repository unverified MIT (permissive) · 28d7d8b230a26677 · report
passwd_hash digitalharborfoundation/rag-for-math-qa/src/experiment/auth.py official repository unverified MIT (permissive) · e0bc8c8de21785b1 · report
KLdivergence levon003/wiki-ores-feedback/src/data_shift/computeMonthSampleAdjacentInverseKld.py community (archive-listed) unverified MIT (permissive) · 0d2530ff40d0ad16 · report
compute_kld levon003/wiki-ores-feedback/src/data_shift/computeMonthSampleAdjacentInverseKld.py community (archive-listed) unverified MIT (permissive) · 96886c0813d3e0d0 · report
generate_user_text_dict levon003/wiki-ores-feedback/src/data_extraction/joinOresScores.py community (archive-listed) unverified MIT (permissive) · 4131bc1dcba26fa6 · report
get_engine levon003/wiki-ores-feedback/src/data_extraction/extractStubRevData.py community (archive-listed) unverified MIT (permissive) · 41b9d76b39f4c2d7 · report
get_stub_history_paths levon003/wiki-ores-feedback/src/data_extraction/extractRevertsFromStubHistory.py community (archive-listed) unverified MIT (permissive) · 22d379b9c5b9e756 · report

Tasks

MathQuestion AnsweringRAGRetrievalRetrieval-augmented Generation

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

AdamAttentionAttention DropoutBARTBERTBPEDense ConnectionsDropoutLayer NormalizationLinear LayerLinear Warmup With Linear DecayMulti-Head AttentionRAGResidual ConnectionSoftmaxWeight DecayWordPiece

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections