Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request]: Delete not yet implemented for Faiss index. #6250

Open
LF112 opened this issue Jun 9, 2023 · 7 comments
Open

[Feature Request]: Delete not yet implemented for Faiss index. #6250

LF112 opened this issue Jun 9, 2023 · 7 comments
Labels
enhancement New feature or request triage Issue needs to be triaged/prioritized

Comments

@LF112
Copy link

LF112 commented Jun 9, 2023

Feature Description

When I use the delete_ref_doc index node deletion method provided by GPTVectorStoreIndex, I get an error: "Delete not yet implemented for Faiss index."

When will the function to delete a node from FAISS be implemented?
Is there an alternative way to delete FAISS nodes?

https://github.com/jerryjliu/llama_index/blob/main/llama_index/vector_stores/faiss.py#L142

Reason

Llama Index does not currently have a function to delete nodes from FAISS.

Value of Feature

The delete function is a key part of the process.

@LF112 LF112 added enhancement New feature or request triage Issue needs to be triaged/prioritized labels Jun 9, 2023
@jon-chuang
Copy link
Contributor

Actually, faiss index is currently broken with the latest faiss-cpu==1.7.4.

  File "/home/jonch/Desktop/Programming/mlsys/llama_index/llama_index/vector_stores/faiss.py", line 105, in add
    self._faiss_index.add_with_ids(text_embedding_np)
TypeError: handle_Index.<locals>.replacement_add_with_ids() missing 1 required positional argument: 'ids'

It is currently not a dep of llama_index. I believe we should support the latest and also add a working version as an optional dep of llama_index in setup.py at least.

@nandhakumarsoliton
Copy link
Contributor

nandhakumarsoliton commented Aug 22, 2023

Facing the same issue. - Requesting for Delete feature in FAISS.
I wish to do some modifications in my Embeddings, I am able to get the node_is that needs to be modified with the help of mrtadata from index.ref_doc_info.
But loaded_index.delete_ref_doc(node_id) does throw an error stating -
image

How to delete the nodes from the index?

Copy link

dosubot bot commented Nov 21, 2023

Hi, @LF112! I'm Dosu, and I'm here to help the LlamaIndex team manage their backlog. I wanted to let you know that we are marking this issue as stale.

From what I understand, you requested a delete function for nodes in the FAISS index used by Llama Index. You were wondering when this function would be implemented and if there is an alternative way to delete nodes in FAISS. There is also a comment from user "jon-chuang" mentioning that the FAISS index is currently broken with the latest version and suggesting to add a working version as an optional dependency. Another user "nandhakumarsoliton" is facing the same issue and requesting a delete feature in FAISS. They also mention an error they encountered when trying to delete nodes.

Before we proceed, could you please confirm if this issue is still relevant to the latest version of the LlamaIndex repository? If it is, please let us know by commenting on this issue. Otherwise, feel free to close the issue yourself or it will be automatically closed in 7 days.

Thank you for your understanding and cooperation. We appreciate your contribution to LlamaIndex!

Best regards,
Dosu

@dosubot dosubot bot added the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Nov 21, 2023
@dosubot dosubot bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 28, 2023
@dosubot dosubot bot removed the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Nov 28, 2023
@mdhuzaifapatel
Copy link

Feature Description

When I use the delete_ref_doc index node deletion method provided by GPTVectorStoreIndex, I get an error: "Delete not yet implemented for Faiss index."

When will the function to delete a node from FAISS be implemented? Is there an alternative way to delete FAISS nodes?

https://github.com/jerryjliu/llama_index/blob/main/llama_index/vector_stores/faiss.py#L142

Reason

Llama Index does not currently have a function to delete nodes from FAISS.

Value of Feature

The delete function is a key part of the process.

Hey, how did you resolve this issue? I'm facing the same.

@LF112
Copy link
Author

LF112 commented Jan 3, 2025

Feature Description

When I use the delete_ref_doc index node deletion method provided by GPTVectorStoreIndex, I get an error: "Delete not yet implemented for Faiss index."
When will the function to delete a node from FAISS be implemented? Is there an alternative way to delete FAISS nodes?
https://github.com/jerryjliu/llama_index/blob/main/llama_index/vector_stores/faiss.py#L142

Reason

Llama Index does not currently have a function to delete nodes from FAISS.

Value of Feature

The delete function is a key part of the process.

Hey, how did you resolve this issue? I'm facing the same.

I did not solve this issue...it was automatically closed by the @dosubot

Copy link

dosubot bot commented Jan 3, 2025

The delete functionality for FAISS in the LlamaIndex codebase is not yet implemented. The delete method in the FaissVectorStore class raises a NotImplementedError with the message "Delete not yet implemented for Faiss index" [1]. Currently, there are no documented workarounds or alternative methods for deleting nodes from a FAISS index in LlamaIndex.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@dosubot dosubot bot reopened this Jan 3, 2025
Copy link

dosubot bot commented Jan 3, 2025

@logan-markewich, the user LF112 has indicated that the issue regarding the deletion of nodes from FAISS is still relevant and needs attention. They mentioned encountering an error with the delete_ref_doc method and are looking for a resolution or alternative. Could you please assist them with this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triage Issue needs to be triaged/prioritized
Projects
Status: Done
Development

No branches or pull requests

4 participants