The application discloses a dangerous
chemical substance intelligent question and answer method and
system based on CAS structured retrieval, which comprises the following steps: obtaining question data; performing semantic analysis on the question data to generate a structured
SQL query instruction; constructing a hierarchical
database, performing CAS hierarchical retrieval by using the structured
SQL query instruction, and recalling authoritative information of dangerous chemical substances; constructing a constraint prompt word, jointly coding the user question, the authoritative information and the scene by using a large
language model, and generating a constrained dangerous
chemical substance management and emergency suggestion; and through a semantic analysis mechanism of "
keyword extraction, question classification and
SQL classification construction", combining a hierarchical retrieval strategy taking CAS number as an
anchor point and a large
language model assisted normalization CAS query mechanism, stable mapping of diversified names of dangerous chemical substances to unique CAS numbers is realized, retrieval difficulties and generation inaccuracies caused by diversified names of dangerous chemical substances and fuzzy questions are effectively relieved, and the accuracy, stability and
traceability of
information retrieval and
scenario-based suggestion generation of dangerous chemical substances are improved.