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

Refactor Vector Retrieval into Feature View #4716

Open
franciscojavierarceo opened this issue Oct 29, 2024 · 0 comments
Open

Refactor Vector Retrieval into Feature View #4716

franciscojavierarceo opened this issue Oct 29, 2024 · 0 comments
Labels
kind/feature New feature or request

Comments

@franciscojavierarceo
Copy link
Member

franciscojavierarceo commented Oct 29, 2024

Is your feature request related to a problem? Please describe.

Currently we define vector search using existing FeatureViews and the Field(name="Embeddings", dtype=Array(Float32)), syntax defined in the FeatureView schema.

Then at online retrieval we make the client use:

store.retrieve_online_documents(
    feature="city_embeddings:Embeddings",
    query=query,
    top_k=5
).to_dict()

This is inefficient and requires the client to make two calls if the client wants both features and the most similar documents.

Describe the solution you'd like

We should specify the vector retrieval requirement declaratively in the FeatureView and use that to orchestrate the retrieval. This would enable us to move the existing retrieve_online_documents into get_online_features and do document search and feature retrieval.

Describe alternatives you've considered
Keeping things the same is a suboptimal option.

Instead of using some Boolean or equivalent, we could declare an explicit DocumentFeatureView class or something equivalent but we should move away from creating more feature views as that is a primitive that we want to centralize on (discussed further in #4584).

Additional context
@HaoXuAI @tokoko

@franciscojavierarceo franciscojavierarceo added the kind/feature New feature or request label Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant