Overview • Architecture • Features • Research • Documentation
A purely data-driven interface for recipe retrieval.
Modern recipe websites are optimized for search engines and long-form narrative content rather than for cooking. RecipEZ is the opposite: a distraction-free, browser-rendered galaxy where the recipe data is the interface.
RecipEZ works as an inverse recipe search engine. Instead of searching for a specific dish, users enter ingredients they already have, receive a matching recipe seed, and explore its five semantically nearest recipes in a 3D point cloud.
The application ships without a live backend. Model vectors, UMAP coordinates, and K-NN neighbors are precomputed offline and loaded as static JSON.
- Ingredient-first search: Enter available ingredients to find a contextual recipe seed, then inspect its precomputed neighbors.
- Four-model ablation: Toggle between combined SBERT, ingredient-only SBERT, name-only SBERT, and TF-IDF retrieval spaces.
- Model hover details: Each model button shows a short technical description on hover.
- Zero-backend infrastructure: Host the generated files with any static web server.
- 30,000-recipe galaxy: Explore a WebGL point cloud with interactive recipe details, ontology filters, and nearest-neighbor links.
- Reproducible research: Regenerate model metrics and comparison figures without rerunning embedding or UMAP training.
Offline pipeline
- Sample and clean recipes from the source dataset.
- Build four feature representations:
- MiniLM-L6-v2 embeddings for combined text
- MiniLM-L6-v2 embeddings for ingredients
- MiniLM-L6-v2 embeddings for recipe names
- TF-IDF followed by 100-component SVD
- Project each vector space to 3D with cosine-based UMAP.
- Precompute five nearest neighbors in each original retrieval space.
- Export static JSON bundles for the frontend.
Runtime frontend
- Load one selected model bundle.
- Render recipe coordinates as a Three.js point cloud.
- Search locally by name or ingredient.
- Open a recipe to display ingredients, instructions, and its five model-specific neighbors.
RecipEZ/
├── web/ # Static Three.js frontend and generated model payloads
├── pipeline/ # Offline model builder and evaluation script
├── docs/ # Architecture, pipeline, evaluation, and sequence diagrams
├── research/ # Reproducible metrics, comparison report, and figures
├── data/raw/ # Ignored raw dataset location
└── old/ # Archived legacy apps, docs, tests, and presentations
The active evaluation compares all four retrieval modes over the same 30,000 recipes, 21 ontology clusters, and 8,436 unique ingredient strings.
| Model | Tag purity | Ingredient Jaccard | 3D overlap |
|---|---|---|---|
| TF-IDF | 0.5995 | 0.1143 | 0.1248 |
| SBERT Combined | 0.5406 | 0.1182 | 0.1421 |
| SBERT Ingredients | 0.3704 | 0.1785 | 0.1031 |
| SBERT Names | 0.4553 | 0.0969 | 0.1533 |
The result is not a single winner. TF-IDF best matches the current tag ontology, ingredient-only SBERT best preserves literal ingredients, and the SBERT modes offer concept-oriented alternatives. Most pairwise neighbor overlaps are below 0.06, so switching models meaningfully changes retrieval.
The browser starts in the Statistical (TF-IDF) mode by default, and it is the first model in the switcher.
Useful references:
- Model behavior radar
- UMAP projection gallery
- Model neighbor-overlap heatmap
- Cluster tag-purity heatmap
- Cluster ingredient-overlap heatmap
- Neighbor tag purity
- Ingredient Jaccard similarity
- Semantic vs geometry overlap
- PCA vs UMAP comparison
See Model comparison research for the complete report.
- Documentation index
- Architecture
- Build pipeline
- Model evaluation
- Sequence diagrams
- Dataset and generated artifacts
- Model comparison research
- Legacy archive map
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txtDownload Food.com Recipes and Reviews and place RAW_recipes.csv at:
data/raw/RAW_recipes.csv
python pipeline/build_models.pyThis writes four 30,000-recipe JSON files to web/model_data/:
sbert_all_data.jsonsbert_ingredients_data.jsonsbert_names_data.jsontfidf_data.json
python -m http.server 8000Open:
http://127.0.0.1:8000/web/
python pipeline/evaluate_models.pyThis writes research/metrics.json and eight generated figures under research/figures/. The evaluation reads the model bundles and does not rerun SBERT, TF-IDF, SVD, or UMAP.
| Mode | Browser label | Feature input | Vector space |
|---|---|---|---|
| TF-IDF | Statistical | Name, ingredients, and tags | TF-IDF followed by 100-component SVD |
| SBERT Combined | Combined | Name, ingredients, and tags | 384D MiniLM-L6-v2 embeddings |
| SBERT Ingredients | Ingredients | Ingredient list | 384D MiniLM-L6-v2 embeddings |
| SBERT Names | Names | Recipe title | 384D MiniLM-L6-v2 embeddings |
This project source is licensed under GPL-3.0. Dataset use is subject to the terms of the source dataset provider.