Large Language Models (LLMs) excel in diverse areas, yet struggle with complex scientific reasoning, especially in the field of chemistry. Different from the simple chemistry tasks (e.g., molecule classification) addressed in previous studies, complex chemistry problems require not only vast knowledge and precise calculation, but also compositional reasoning about rich dynamic interactions of different concepts (e.g., temperature changes). Our study shows that even advanced LLMs, like GPT-4, can fail easily in different ways. Interestingly, the errors often stem not from a lack of domain knowledge within the LLMs, but rather from the absence of an effective reasoning structure that guides the LLMs to elicit the right knowledge, incorporate the knowledge in step-by-step reasoning, and iteratively refine results for further improved quality. On this basis, we introduce StructChem, a simple yet effective prompting strategy that offers the desired guidance and substantially boosts the LLMs' chemical reasoning capability. Testing across four chemistry areas -- quantum chemistry, mechanics, physical chemistry, and kinetics -- StructChem substantially enhances GPT-4's performance, with up to 30\% peak improvement. Our analysis also underscores the unique difficulties of precise grounded reasoning in science with LLMs, highlighting a need for more research in this area. Code is available at \url{https://github.com/ozyyshr/StructChem}.
翻译:大语言模型(LLMs)在多个领域表现出色,但在复杂科学推理(尤其是化学领域)中仍面临挑战。与先前研究中处理的简单化学任务(如分子分类)不同,复杂化学问题不仅需要广博的知识和精确的计算,还需要对不同概念(如温度变化)之间丰富的动态交互进行组合推理。我们的研究表明,即使是GPT-4等先进LLMs,也可能以不同方式轻易失败。有趣的是,这些错误往往并非源于LLMs缺乏领域知识,而是缺乏有效的推理结构来引导LLMs提取正确知识、在逐步推理中融入知识、并通过迭代优化结果以进一步提升质量。基于此,我们提出了StructChem——一种简单而有效的提示策略,为LLMs提供所需的引导,显著提升其化学推理能力。在量子化学、力学、物理化学和动力学四个化学领域的测试中,StructChem大幅提升了GPT-4的性能,峰值改进幅度达30%。我们的分析还揭示了LLMs在科学领域中进行精确落地推理的独特困难,强调该领域需要更多研究。代码见\url{https://github.com/ozyyshr/StructChem}。