Large language models can benefit from learning from their previous mistakes to improve their reasoning capabilities.