Find answers from the community

Updated 6 months ago

Debug

I am creating my own Document nodes to put into a VectorStoreIndex, and I am setting page_label as metadata via doc.metadata["page_label"]=pgno.

But when I then try to query a QueryEngine derived from this vector index using metadatafilters fromDIcts {"key": "page_label", "value": p} I never get any results.

It's completely opaque to me how to tell how the filters are working, or what metadata they may need. How can I debug this? I'd like the issue fixed, but I'm also looking for general techniques to debug these classes.
L
4 comments
Generally for debug, I use

Plain Text
retriever = index.as_retriever(filters=filters)
nodes = retriever.retrieve("query")
Not really sure how you are setting up filters. It's always worked for me
Oh I see you figured this our further down
Tbh stepping through code is always my go to
Add a reply
Sign up and join the conversation on Discord