Skip to content

The VectorStore has poor scalability as it is limited by the Document class. It is desired to be able to customize the extension of the Document class to complete custom retrieval logic #4770

@WangJincheng4869

Description

@WangJincheng4869

Please do a quick search on GitHub issues first, the feature you are about to request might have already been requested.

Expected Behavior

I hope the VectorStore.add method can support subclasses of Document because the Document class does not meet my requirements.

Now even if I implement the VectorStore interface, I'm still completely restricted by the Document class and cannot achieve custom fields. Vector databases support multi-field mode, but the Document class completely limits its flexibility. Can this issue be resolved?

Current Behavior

Due to the interface being defined as void add(List<Document> documents);, it is not possible to use subclasses of Document.

Context

I want to extend it with a text field, and the use case is for Q&A. I need to convert Q into the vector store for retrieval, while A is only stored as data, which can be returned separately after a hit.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions