# How to handle impossible Q&A model question when using the Inference API?

**URL:** <https://discuss.huggingface.co/t/how-to-handle-impossible-q-a-model-question-when-using-the-inference-api/14321>\
**Category:** 🤗Hub\
**Created:** [February 2, 2022, 4:41am UTC](https://discuss.huggingface.co/t/how-to-handle-impossible-q-a-model-question-when-using-the-inference-api/14321 "2022-02-02T04:41:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pierrerappolt](https://avatars.discourse-cdn.com/v4/letter/p/3ab097/32.png) [@pierrerappolt](https://discuss.huggingface.co/u/pierrerappolt)\
**Post date:** [February 2, 2022, 4:41am UTC](https://discuss.huggingface.co/t/how-to-handle-impossible-q-a-model-question-when-using-the-inference-api/14321/1 "2022-02-02T04:41:05Z")

</div>

When using the transformers `question-answer` pipeline, there is a way to allow the model to indicate the answer is not found in the context. This is done by passing the parameter `handle_impossible_answer=True` to the pipeline.

The issue is that the hosted Inference API defaults handle\_impossible\_answer to False and there is no way that I’m aware of to change this to True. This makes it impossible to deploy Q&A models trained to handle impossible answers.

---

<div class="post-metadata">

**Author:** ![pierrerappolt](https://avatars.discourse-cdn.com/v4/letter/p/3ab097/32.png) [@pierrerappolt](https://discuss.huggingface.co/u/pierrerappolt)\
**Post date:** [February 2, 2022, 5:12am UTC](https://discuss.huggingface.co/t/how-to-handle-impossible-q-a-model-question-when-using-the-inference-api/14321/2 "2022-02-02T05:12:23Z")

</div>

Found answer: you can pass these settings in your Model card. I didn’t realize I need to add text below my model card metadata for it to actually activate those settings.
