Find answers from the community

Updated 2 years ago

whats the possible kwargs for `as_retriever`

@kapa.ai whats the possible kwargs for as_retriever
k
m
5 comments
Please stand by @maximilian as I search the knowledge base. We are experiencing especially high traffic right now and might take longer than usual. :wave:
----------------------
Hmm, I don't know enough to give you a confident answer yet. However, you can refer to the LlamaIndex documentation for more information: https://gpt-index.readthedocs.io/en/latest
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
@kapa.ai what are the possible MetadataFilters
Let me check the knowledge base for you. One moment! :books:
----------------------
MetadataFilters is a class in LlamaIndex that is used for filtering metadata in vector stores. Currently, it only supports exact match filters. You can create a MetadataFilters object by providing a list of ExactMatchFilter objects.

Here's an example of how to create a MetadataFilters object:

Plain Text
from llama_index.vector_stores.types import ExactMatchFilter, MetadataFilters

filters = MetadataFilters(filters=[
    ExactMatchFilter(key='name', value='paul graham'),
])


In this example, the filter is set to match nodes with the metadata key 'name' and the value 'paul graham'. You can add more filters to the list if needed.

Source: Vector Store Retrievers - Part 5 (https://gpt-index.readthedocs.io/en/latest/reference/query/retrievers/vector_store.html)
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Add a reply
Sign up and join the conversation on Discord