You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a page is indexed and we search an exact match of a portion of it's content, we should expect to receive the page in the results. But we observe that it's not always the case.
Built a new keyword index. And a custom retriever for hybrid search. Hybrid search was not able to solve issue26 as it also failed to retrieve a query with exact title. Going to look a little more into this but issue26 may require cs solution to match title with query . Will discuss further with Guy once he is back.
Found a solution: MetadataFilters is a filter function from llamaindex in which you can match any metadata given to doc (before index is built)
Code pushed here in 17-include-metadata-in-embedding branch, llamaindex-hybrid-search.ipynb.
Key line of code is the following
from llama_index.core.vector_stores import MetadataFilters from llama_index.core.vector_stores import ExactMatchFilter filters = MetadataFilters(filters=[ ExactMatchFilter( key="title", value='Audit of the Project Management of the Food Safety Action Plan - Canadian Food Inspection Agency' ), ])
and node = Document(text=curr['content'], metadata={'id_':curr['id'],'title':curr['title'], 'subtitle':curr['subtitle']})
Description
If a page is indexed and we search an exact match of a portion of it's content, we should expect to receive the page in the results. But we observe that it's not always the case.
Notebook: link
This is worth investigating.
The text was updated successfully, but these errors were encountered: