Skip to content

feat(cli): Add recommendation template for feast init#6078

Open
doc-johnson wants to merge 1 commit intofeast-dev:masterfrom
doc-johnson:feat/recommendation-template
Open

feat(cli): Add recommendation template for feast init#6078
doc-johnson wants to merge 1 commit intofeast-dev:masterfrom
doc-johnson:feat/recommendation-template

Conversation

@doc-johnson
Copy link

@doc-johnson doc-johnson commented Mar 8, 2026

Summary

Addresses #5478 (point 3: recommendation engine template).

  • Adds a new recommendation template to feast init demonstrating product recommendations using vector similarity search
  • Uses pre-computed embeddings via all-MiniLM-L6-v2 (384 dimensions) with SQLite online store (vector_enabled: true)
  • Includes 12 sample products across 4 categories (Electronics, Books, Sports, Home)
  • Demonstrates retrieve_online_documents_v2 API for top-k similarity search

New files

  • templates/recommendation/bootstrap.py — generates product catalog with embeddings
  • templates/recommendation/feature_repo/feature_definitions.py — Entity, FeatureView with vector_index, FeatureService
  • templates/recommendation/feature_repo/feature_store.yaml — SQLite config with vector search
  • templates/recommendation/feature_repo/test_workflow.py — end-to-end demo: apply, materialize, search

Modified files

  • sdk/python/feast/cli/cli.py — register recommendation in template choices (+1 line)

Test plan

  • feast init test_rec --template recommendation creates project successfully
  • feast apply registers entity, feature view, feature service
  • python test_workflow.py runs full cycle: apply → materialize → vector search → teardown
  • Vector search returns relevant results (e.g. "gaming laptop accessories" → electronics items)
  • Idempotent feast apply (second run reports no changes)
  • Existing local template unaffected
  • ruff check and ruff format pass

Open with Devin

@doc-johnson doc-johnson requested a review from a team as a code owner March 8, 2026 19:50
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

Open in Devin Review

Add a new "recommendation" template demonstrating product recommendations
using vector similarity search with pre-computed embeddings (all-MiniLM-L6-v2)
and SQLite online store with vector_enabled.

Signed-off-by: doc-johnson <hustler@mail.ru>
@doc-johnson doc-johnson force-pushed the feat/recommendation-template branch from d9af218 to df3427d Compare March 9, 2026 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant