The TF-IDF algorithm utilises term frequency (TF) and inverse document frequency (IDF) to represent relevance, which has the advantages of simplicity and speed, and even if the corpus is unchanged, the TF-IDF value for each word can be computed in advance. In RALM, Lazaridou et al. (2022) utilise the TF-IDF algorithm to match information obtained from user queries and calls to the Google search API. Hua and Wang (2018) also employ the algorithm to score the generated results. The BM25 represents an enhancement over the TF-IDF. It considers the user's query and calculates the relevance score as the weighted sum of the relevance of each query word to the document. The IDF algorithm is used to derive the weight of each word, but it is improved by two moderating factors to prevent the strength of the influence of a certain factor from being infinite.