Question Answering
Question answering models find the answer to a question inside a given context passage.
Inputs
Input
Where do sea otters sleep? — Sea otters sleep floating on their backs.
Question Answering Model
Output
Output
- floating on their backs0.89
About Question Answering
Question answering models find the answer to a question inside a given context passage. Browse question answering models on HubClone to compare checkpoints, or open a Space to try one in the browser.
Use Cases
Support bots
Answer customer questions from product documentation.
Search snippets
Highlight the exact sentence that answers a query.
Inference
The Transformers pipeline API runs question answering models in a few lines. Replace <model-id> with any model listed on this page.
from transformers import pipeline
pipe = pipeline("question-answering", model="<model-id>")
pipe("Where do sea otters sleep? — Sea otters sleep floating on their backs.")Useful Resources
Want to dig deeper into the topic? Great! Here is a hand-picked list of resources we found helpful.
Documentation
- Question Answering task guide
- Pipelines reference
Notebooks
- Fine-tuning a question answering model