Skip to content

Combine FAQ QA with Extractive/Generative QA #4530

Discussion options

You must be logged in to vote

Hi @CDCapobianco if you already have an FAQPipeline, the next step could be to experiment with an ExtractiveQAPipeline. Both of them return Answer objects, which allows combining their results with a JoinAnswers node.

So you can build a single larger pipeline running both in parallel:

p_ensemble = Pipeline()
p_ensemble.add_node(component=retriever1, name="Retriever1", inputs=["Query"])
p_ensemble.add_node(component=retriever2, name="Retriever2", inputs=["Query"])
p_ensemble.add_node(component=Docs2Answers(), name="docs2answers", inputs=["Retriever1"])
p_ensemble.add_node(component=reader, name="Reader", inputs=["Retriever2"])
p_ensemble.add_node(
    component=JoinAnswers(join_mode="conca…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@CDCapobianco
Comment options

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