Hello, I am currently trying to modify the output you get through the FAQ model presented by the DeepPavlov framework. I have built it based on the given MIPT FAQ pipeline configuration and have successful results. One problem is that I hope to alter how the final answer is given.
Currently if a question is asked, the best-chosen answer is given, along with a list of probabilities(similarities) with all the questions in the data as well. I am assuming this is the result of the “out” value in the pipeline_config: “out”: [“y_pred_answers”, “y_pred_proba”]. I have confirmed this is true by altering it to see if the outcome is affected. What I want to do is customize this output by adding customized components into the chainer where the final output is formatted to my preference. Currently I am using the riseapi to make http requests and it is giving return values as stated above. I am hoping to change this return value (ex. answer and only one probability only).
However, this suddenly made me wonder if this is the right way to do it. Because as far as I understand, the pipeline chainer is there for the deeppavlov framework to train the model, in other words, the framework follows the chainer with the data to create a model and train it on the real data (ex. change data to token/lemma etc.) So the chainer really is an outline of steps the data must follow to create a trained model, not a outline for how we reach an answer once a question is given.
To summarize, Is it correct to put a final-output-formatting component into the chainer which is specifically for training the model? I am afraid this will cause issues that I am yet unaware of because this can directly affect how the model is being trained, instead of only formatting the final answer. Or is there a simpler way to format the return value? Is it safe to assume that when we pose a question to a chatbot model to process, it would follow the same process as listed in the pipeline, even if it is not for training a model but using it to answer queries?
Thank you so much for your help!