XLM Roberta train for questions answering

Hello. I’m new and I need your help. I want to create a chatbot that will answer questions on a specific topic (law) (none English)
Almost all the manuals that I found describe the process of Roberta additional training using a question and answer database (SQuAD)
After training for the model to work, it needs to be given a context and a question that will be given referring to this context. But I’m trying to make the model respond by referring to pre-prepared documents (texts of laws) That is, we only need to send the question, and the context will always be static data - texts of laws. How can this be implemented?

https://www.sbert.net/examples/applications/semantic-search/README.html You can use e.g. Semantic search of the text to fetch passages and use them as context for the chatbot.

1 Like

Thanks your very much