Search for an ingredient you like, and the graph will refine to give you a web of ingredients that share highly similar flavor profiles. Then, click on a new ingredient in the network to add it to your recipe above the search box (or to remove it). Clicking on a recipe item or a node has the same effect. Search is not sorted by the flavor metric, it is instead sorted lexically.
In this way, you can start building out recipes, menu items and tastings from a consensus of flavor combinations.
What you are seeing:
- the nodes with color are your recipe ingredients
- the suggested ingredients are determined by Jaccard similarity (default) or by one of the other options in the ‘lens’ dropdown
- if you choose the hybrid option, the suggested ingredients are fiducially split between:
- the most similar ingredients in the flavor metric (similarity)
- the most similar ingredients by text ranking (affinity)
- the edges from one ingredient to another are weighted by a consensus of chef and expert opinion 1
- if your ingredient is missing, it was likely missing in the book (quinoa) or was pruned because its mentions were too sparse 2
If a node is present without an edge, it means that the ingredient has a very good similarity with your recipe, but wasn’t mentioned (connected) in its book-entry literally. Reconstructing ‘ghost’ entries and connections by training a model with listed affinities is one of the ultimate goals of this project.
The amount of suggestions gradually decreases as you add more ingredients to your recipe. This is for performance reasons, as with the physics simulation disabling itself at destabilization. When that happens, maybe you discovered a flavor affinity.
I have included autogenerated links from your recipe basket to a few popular recipe resources above the network graph, including a database for cocktail mixing. 3
Why and how
Understanding why I chose this text for the dataset is probably already apparent to its readers, but the key thing to take away is that the authors did a fine job formatting something computer readable and human usable–a rare feat! Most importantly, it is aggregated from chefs, from real humans in kitchens doing what works, what’s delicious, and what’s in season. Recipe API’s don’t have this kind of granularity, many rely too heavily on user data to seed recommendations. To my knowledge, this is the only dataset of this kind.
Technical tools only involve vis.js for visualization and BeautifulSoup for parsing. The data is scraped from the Flavor Bible, and the similarity matrix is calculated using Jaccard similarity for pairwise comparisons. I am working on cleaning up the initial data with some mix of modern techniques with some concoction of nltk, fuzzywuzzy and/or Bert. The current form was done entirely with regexp/bs4 parsing. The suggested nodes can be improved by using a weighted Jaccard probability distribution (arXiv). Source code for this part of the calculation (the text → dataset chain) is available on GitHub.
In 2019, I was helping fellow chefs come up with new specials. At this point in time, we were rolling about four-ten new specials as a team every week, ranging from brunch, cocktails, lunch, football apps and our highly anticipated farm-to-fork pop-up dinners. But sometimes you just get plain stuck. A good trick, at least for creativity, is to set rules so you have some boundaries to push. But if you are going to set rules, they should at least solve a few things:
- do something new
- use something old
- feature three things in season
I hate having extra stuff around, but I love new stuff coming in, yet I don’t like wasting things, but then I actually look forward to doing inventory. Ah, Schrodinger’s cook.
Specials: we would work out new ideas together over the prep table. Sometimes ideas required working things out on paper, usually butcher’s, and occoasionally crude graphs of our plate setups evolved. These were sketches of sauce and protein layouts, heavy edges between ideas if their pairing ‘sang’, then as a guide hanging from the ticket rail on the night a feature debuted.
Karen and Andrew’s book was gifted to me later that year, and it changed my game. It finally put in words a mental ranking of flavor profiles based on ingredient query. I had a good resource that gave answers, and especially new ideas, quickly. And it was thorough enough to trust.
This method was so helpful, I started dreaming of a computer tool to help me sketch out this process. I remembered a reddit post that spurred others to lay out some of the underlying ideas here: overlapping communities :: compatible flavors.
I believe the impact of mathematical concepts to the broader culinary scope to be a major upgrade in our thoughtfulness about food. To extend its application, in creativity and clarity, not abused in statistics to pressure a sale and disable the creative mind. While I do see how a tool like this could provide immense practical application in the distribution world, my focus here is to empower chefs, bartenders, brewers, baristas, and sommeliers to create new things.
When it comes to tools available to chefs, compared to musicians, writers, and artists, chef’s are unfortunately at a disadvantage creatively. Yes, we have recipes, but those are instructions, and do little to help us build on ratio or balance. What might be more helpful, I think, is a playground for putting new food ideas together.
In the book, the weight of the pairing is given by the emphasis of the text:
- normal text means mentioned by at least one expert
- bold is recommended by many experts
- BOLD CAPS is highly recommended
- *BOLD CAPS is the “Holy Grail” of pairings
If the ingredient is not mentioned, it is given no weight (or edge) but it does not mean a flavor pairing doesn’t exist. This is part of the purpose of this tool! Lastly, there are a few dozen mentions of “Avoid”, and should be thought of as opposite charges. ↩︎
When What to Drink has been parsed and merged with the network, the latter link in the recipe site list should become much more robust. How fun! ↩︎