GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: Add feast rag retriver functionality by Fiona-Waters · Pull Request #5405 · feast-dev/feast

Conversation

@Fiona-Waters

@Fiona-Waters Fiona-Waters commented May 30, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

This PR adds a FeastRagRetriever that inherits from the HuggingFace Transformers RagRetriever class. It allows for integration with feast functionality allowing RAG to be performed more easily using the Feature Store.

The following has been added:

rag_retriever.py
This module implements a custom RAG retriever by combining Feast feature store capabilities with transformer-based models. The implementation provides:

  • A custom RAG retriever (FeastRAGRetriever) that supports three search modes:
    • Text-based search
    • Vector-based search
    • Hybrid search
  • Integration with Hugging Face's transformers library and sentence-transformers
  • Configurable document formatting options

vector_store.py
This module implements a FeastVectorStore class. The FeastVectorStore takes in a FeatureStore, FeatureView and features using these to query the store via the existing retrieve_online_documents_v2 function.

setup.py
Adding entries for RAG dependencies allowing for installation with pip install feast[rag].

init.py
Adding entries for new classes added in rag_retriever.py and vector_store.py

pyproject.toml
The dependencies required for the RAG implementation have been added here.
The relevant dependencies have also been added to the relevant requirements.txt files.

feature_store.py
Changes were made to the def _validate_vector_features function. The updated function now correctly validates the length of each individual vector within a specified DataFrame column, rather than checking the total number of DataFrame columns. This change ensures that every single vector matches its expected dimension, significantly improving data integrity and error reporting. This was improved following addition of unit tests.

Unit tests
Unit tests have been included to cover the added functionality, along with some minor changes in the existing example_feature_repo_1.py file.

examples/rag-retriever
An example has been added here including, feature_repo, README, low level design image and example notebook. This currently includes implementation on Red Hat OpenShift with a remote Milvus instance.

.github/workflows
The change here is a small update suggested by @ntkathole for torch installation and error handling.

Which issue(s) this PR fixes:

Related to #5391 but get_top_docs has not been implemented here as the FeastIndex is a dummy index - the retrieval functionality exists in the FeastRagRetriever via the FeastVector store which uses retrieve_online_documents_v2 .

Misc

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

haoxu0, jyejare, astefanutti, and franciscojavierarceo reacted with thumbs up emoji gkamathe, ntkathole, astefanutti, and franciscojavierarceo reacted with hooray emoji
All reactions
  • 👍 4 reactions
  • 🎉 4 reactions
@Fiona-Waters Fiona-Waters changed the title [WIP] feat: Add feast rag retriver functionality feat: Add feast rag retriver functionality May 30, 2025
@Fiona-Waters
Fiona-Waters force-pushed the ragretriever branch 4 times, most recently from 0abf934 to fc99dd0 Compare May 30, 2025 22:47
franciscojavierarceo
franciscojavierarceo reviewed May 31, 2025
View reviewed changes
Comment thread docs/SUMMARY.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

@Fiona-Waters
Fiona-Waters force-pushed the ragretriever branch 14 times, most recently from 069fe93 to 6873c84 Compare June 5, 2025 12:28
@jyejare jyejare mentioned this pull request Jun 5, 2025
Create DocEmbedder class along with RAGRetriever #5426
Open
@Fiona-Waters
Fiona-Waters force-pushed the ragretriever branch 6 times, most recently from ec5ba98 to 40dfde0 Compare June 5, 2025 19:15
ntkathole
ntkathole reviewed Jun 6, 2025
View reviewed changes
Comment thread pyproject.toml Resolved

Uh oh!

There was an error while loading. Please reload this page.

ntkathole
ntkathole reviewed Jun 6, 2025
View reviewed changes
Comment thread pyproject.toml Resolved

Uh oh!

There was an error while loading. Please reload this page.

jyejare
jyejare reviewed Jun 6, 2025
View reviewed changes

@jyejare jyejare left a comment

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great Progress, few comments.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread .github/workflows/smoke_tests.yml Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread sdk/python/feast/rag_retriever.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread sdk/python/feast/rag_retriever.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread sdk/python/feast/rag_retriever.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread sdk/python/feast/rag_retriever.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread sdk/python/feast/rag_retriever.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread sdk/python/feast/rag_retriever.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread sdk/python/feast/vector_store.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread sdk/python/feast/vector_store.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread sdk/python/requirements/py3.10-ci-requirements.txt Resolved

Uh oh!

There was an error while loading. Please reload this page.

@Fiona-Waters
Fiona-Waters force-pushed the ragretriever branch 6 times, most recently from 7980963 to 04fd031 Compare June 17, 2025 11:37
@jyejare

jyejare commented Jun 17, 2025

Copy link
Copy Markdown
Collaborator

LGTM. Please address @ntkathole comments and fix unit tests!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Fiona-Waters
Fiona-Waters force-pushed the ragretriever branch from 04fd031 to f98e50c Compare June 17, 2025 11:55
@Fiona-Waters

Fiona-Waters commented Jun 17, 2025

Copy link
Copy Markdown
Contributor Author

LGTM. Please address @ntkathole comments and fix unit tests!

Thanks @jyejare I have addressed all comments now.
The unit tests are still failing

FAILED sdk/python/tests/unit/infra/online_store/test_dynamodb_online_store.py::test_dynamodb_online_store_update - botocore.exceptions.ClientError: An error occurred (UnrecognizedClientException) when calling the ListTagsOfResource operation: The security token included in the request is invalid.
FAILED sdk/python/tests/unit/infra/online_store/test_dynamodb_online_store.py::test_dynamodb_online_store_update_tags - botocore.exceptions.ClientError: An error occurred (UnrecognizedClientException) when calling the ListTagsOfResource operation: The security token included in the request is invalid.

I'm not sure if it is related to changes that I have made. Will look into it further.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Fiona-Waters
Fiona-Waters requested a review from ntkathole June 17, 2025 13:17
@Fiona-Waters
Fiona-Waters force-pushed the ragretriever branch 2 times, most recently from 099ae82 to 6d4c12d Compare June 17, 2025 15:17
efazal
efazal reviewed Jun 18, 2025
View reviewed changes
Comment thread sdk/python/feast/rag_retriever.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@Fiona-Waters
Fiona-Waters force-pushed the ragretriever branch 3 times, most recently from 7b3ad36 to 6a9708d Compare June 18, 2025 16:12
astefanutti
astefanutti reviewed Jun 19, 2025
View reviewed changes
Comment thread sdk/python/feast/rag_retriever.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread sdk/python/feast/rag_retriever.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread sdk/python/feast/rag_retriever.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread sdk/python/feast/rag_retriever.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread sdk/python/feast/rag_retriever.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread sdk/python/feast/vector_store.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread sdk/python/feast/vector_store.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

ntkathole
ntkathole reviewed Jun 23, 2025
View reviewed changes
Comment thread sdk/python/tests/unit/test_vector_store.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

ntkathole
ntkathole reviewed Jun 23, 2025
View reviewed changes
Comment thread sdk/python/tests/utils/rag_test_utils.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

ntkathole
ntkathole approved these changes Jun 24, 2025
View reviewed changes

@ntkathole ntkathole left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Fiona-Waters reacted with hooray emoji
All reactions
  • 🎉 1 reaction
astefanutti
astefanutti approved these changes Jun 24, 2025
View reviewed changes

@astefanutti astefanutti left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, awesome work!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Fiona-Waters reacted with hooray emoji
All reactions
  • 🎉 1 reaction
Comment thread examples/rag-retriever/rag_feast.ipynb Resolved

Uh oh!

There was an error while loading. Please reload this page.

@Fiona-Waters
Add feast rag retriver functionality
dcd0c86
Co-authored-by: Esa Fazal <[email protected]>

Signed-off-by: Fiona Waters <[email protected]>
franciscojavierarceo
franciscojavierarceo reviewed Jun 24, 2025
View reviewed changes
Comment thread .github/workflows/unit_tests.yml Resolved

Uh oh!

There was an error while loading. Please reload this page.

franciscojavierarceo
franciscojavierarceo reviewed Jun 24, 2025
View reviewed changes
Comment thread Makefile Resolved

Uh oh!

There was an error while loading. Please reload this page.

franciscojavierarceo
franciscojavierarceo reviewed Jun 24, 2025
View reviewed changes
Comment thread examples/rag-retriever/README.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

franciscojavierarceo
franciscojavierarceo reviewed Jun 24, 2025
View reviewed changes
Comment thread examples/rag-retriever/README.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

franciscojavierarceo
franciscojavierarceo reviewed Jun 24, 2025
View reviewed changes
Comment thread examples/rag-retriever/README.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

franciscojavierarceo
franciscojavierarceo reviewed Jun 24, 2025
View reviewed changes
Comment thread examples/rag-retriever/README.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

franciscojavierarceo
franciscojavierarceo approved these changes Jun 24, 2025
View reviewed changes

@franciscojavierarceo franciscojavierarceo left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great! Thank you @Fiona-Waters !! Can we add a link to this in the examples in the documentation? Can be done in a follow up PR.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Fiona-Waters reacted with thumbs up emoji Fiona-Waters reacted with hooray emoji
All reactions
  • 👍 1 reaction
  • 🎉 1 reaction
@Fiona-Waters Fiona-Waters mentioned this pull request Jun 30, 2025
Updating feast example after merge in feast repo opendatahub-io/distributed-workloads#426
Merged
2 of 3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@franciscojavierarceo franciscojavierarceo franciscojavierarceo approved these changes
@ntkathole ntkathole ntkathole approved these changes
@jyejare jyejare Awaiting requested review from jyejare
@haoxu0 haoxu0 Awaiting requested review from haoxu0
@efazal efazal Awaiting requested review from efazal
+1 more reviewer
@astefanutti astefanutti astefanutti approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

ok-to-test

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

7 participants

@Fiona-Waters @jyejare @astefanutti @franciscojavierarceo @ntkathole @haoxu0 @efazal
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.