Closed ZenMoore closed 2 years ago
Hey, sorry for the late response! if all that you care about is "make sure that the answer text generated by the model is a span in the context" you can do it by adding lexical constraints to your decoding (allow it to decode using only the tokens used in your context paragraph). You can also do post hoc filtering: random sample many responses and filter out the ones that do not appear in your paragraph.
Hi 🤗 It's a little bit contraversal about extractive QA. Because T5/BART-style model is not extractive but generative, how can we make sure that the answer text generated by the model is a span in the context (for SQuAD, etc.) ? 🤔 Thanks. 🌹