You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support Hugging Face get_top_docs() Style Retrieval for RAG in retrieve_online_documents_v2 #5391
Is your feature request related to a problem? Please describe.
Extend retrieve_online_documents_v2() implementation to support integration with Hugging Face’s Transformers-based RagRetriever, which expects a specific method signature and output format via a get_top_docs() method.
Add a new method (e.g., get_top_docs) to the Feast or provide a utility class like FeastIndex that wraps retrieve_online_documents_v2 and returns RAG-compatible results.
get_top_docs(query_vectors, n_docs) is expected to:
Input:
query_vectors: A tensor or list of vectors representing one or more queries (usually from a language model like BERT).
n_docs: The number of top documents (e.g., text passages) to retrieve for each query.
Expected Output:
A tuple of:
doc_scores: List[List[float]] # similarity scores
doc_ids: List[List[str]] # string document IDs
docs: List[List[str]] # raw document text
Activity
franciscojavierarceo commentedon May 29, 2025
Probably we should just move
retrieve_online_documents_v2toretrieve_online_documentsas well.