A formula-based numerical reasoning question and answer implementation method, device and medium, the question and answer in the numerical reasoning question and answer application scene are obtained through formula knowledge
annotation to obtain formula
data set and parameter
data set, which are respectively used for training of formula generation model and parameter identification model, for new questions in the question and answer application scene, formula information is generated by the formula generation model, the parameter name in the formula information is input into the parameter identification model, the parameter information of the formula is obtained, the formula information and the parameter information are input into the formula
calculator, and the answer of the question is output. The construction of the training data can be automatically carried out, the
data migration generalization and
data expansion are facilitated; the formula
calculator of the calculable unit is introduced in the calculation, the problem that the generative
language model is not sensitive to the numerical value is avoided; the numerical reasoning is divided into several subtasks, the requirement for the model is reduced, the obtained answer has good explainability, and the modularization decoupling is favorable for model optimization.