Skip to content

Question Answering when context is provided #5761

Discussion options

You must be logged in to vote

For question answering on a provided context, without retrieval, all you need is a Reader component.

from haystack.nodes import FARMReader
reader = FARMReader(
            model_name_or_path="deepset/bert-medium-squad2-distilled",
            return_no_answer=True,
        )
prediction = reader.predict(query="Who lives in Berlin?", documents=docs, top_k=5)

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@julian-risch
Comment options

@julian-risch
Comment options

@NeuroinformaticaFBF
Comment options

Answer selected by NeuroinformaticaFBF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants