The key problem is your querying text will not always be the keyword in kwx package which is auto-generate keywords with BERT,LDA, etc. algorithm( ref Fig 1.) . I think the best solution is convert your text db to vector db. And use cosine simularity to find your keyword simularity chunk. ( ref: https://spencerporter2.medium.com/understanding-cosine-similarity-and-word-embeddings-dbf19362a3c )
Fig 1.