Skip to content

Search every document in doc store for the ques vs the top semantic matches #1187

Answered by brandenchan
hepbc asked this question in Questions
Discussion options

You must be logged in to vote

Hi @hepbc, cool to hear you are using Haystack this way! This Information extraction style of QA is something we see a lot of potential in!

So in this style of QA, you obviously want to iterate over each Q in your set of Qs. In terms of Docs, you also want to iterate over each Doc but make sure you're performing the query on just that single document and not your full set of Docs!

To do this, you need to perform some metadata filtering (see this for a basic intro) . The idea is that you attach a unique piece of meta data to Document, and at query time, you isolate a single document to perform the query on by setting a filter.

In a very rough sketch, you will want something like this

# Doc…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@hepbc
Comment options

@hepbc
Comment options

@brandenchan
Comment options

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