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

Remove embedding from Document #1781

Open
markpollack opened this issue Nov 20, 2024 · 6 comments
Open

Remove embedding from Document #1781

markpollack opened this issue Nov 20, 2024 · 6 comments
Labels
Milestone

Comments

@markpollack
Copy link
Member

This was a design decision way back taken from how langchain (python) was designed. In practice, this doesn't seem useful. It acts like a sort of cache, if you are writing the same document to the vector store multiple times, which doesn't seem realistic. If you have a use case for keeping the embedding in the Document, please comment.

@ThomasVitale
Copy link
Contributor

The SimpleVectorStore relies on the presence of the "embedding" field in Document.

@iAMSagar44
Copy link
Contributor

The AzureVectorStore also relies on the presence of the "embedding" field in Document. The doAdd method has the following line of code in the 1.0.0-M4 version of Spring AI.
searchDocument.put(EMBEDDING_FIELD_NAME, document.getEmbedding());

@ilayaperumalg
Copy link
Member

ilayaperumalg commented Nov 25, 2024

The SimpleVectorStore relies on the presence of the "embedding" field in Document.

This PR #1822 addresses this.

@markpollack
Copy link
Member Author

We need to review all the vector store impls and make appropriate modifications. I noticed the Neo4jVectorStore also uses the 'getEmbeddings' method as sort of simple data structure to pass things along while adding. It can be refactored.

@ThomasVitale
Copy link
Contributor

If possible, it would be great to get #1794 merged before start removing the "embedding" field, mostly to avoid many many merge conflicts since they touch the same code area 😅

@ilayaperumalg
Copy link
Member

We need to review all the vector store impls and make appropriate modifications. I noticed the Neo4jVectorStore also uses the 'getEmbeddings' method as sort of simple data structure to pass things along while adding. It can be refactored.

Created #1826 to track this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants