Skip to content
RAG Repo

StackMathQA

StackMathQA pulls together 2 million mathematical questions and their answers from across the Stack Exchange network, covering everything from basic arithmetic to research-level topics depending on the source community.

Because each item is already a self-contained question paired with one or more answers, the data maps cleanly onto retrieval: each entry is effectively a ready-made passage. That makes it a strong fit for Q&A-style RAG, where you want to surface a relevant worked answer rather than a page of reference text.

The dataset is hosted on Hugging Face under CC BY-SA 4.0, matching the licence of the underlying Stack Exchange content, so derivative databases must carry the same terms.

mathematicsquestion-answerstack-exchangeqa

Related sources