Skip to content

Is that possible to import FAISS Vectors in to RecursiveRetriever for further process? #15128

Answered by dosubot bot
mraguth asked this question in Q&A
Discussion options

You must be logged in to vote

Given the structure of your index_store.json file, you can extract the node_dict as follows:

  1. Load your FAISS index:

    index = load_index_from_storage(storage_context=storage_context)
  2. Extract the node_dict from the index_store.json file:

    import json
    
    # Load the index structure from the index_store.json file
    with open('index_store.json', 'r') as file:
        index_store_data = json.load(file)
    
    # Extract the node_dict
    node_dict = index_store_data['index_store']['data']['nodes_dict']
  3. Create the RecursiveRetriever with the node_dict:

    from llama_index.core.retrievers import RecursiveRetriever
    
    retriever_metadata = RecursiveRetriever(
        "vector",
        retriever_dict={"vector": vector_retrieve…

Replies: 2 comments 9 replies

Comment options

You must be logged in to vote
8 replies
@mraguth
Comment options

@dosubot
Comment options

@mraguth
Comment options

@dosubot
Comment options

Answer selected by mraguth
Comment options

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant