Thursday, April 01, 2021

Algorithms for Recipes

If you want to get a real-life granular picture of what can go wrong with algorithms, try searching for recipes.  The search engines routinely ignore what you look for, insisting "Oh, this must be what you really want, because so many other people do."  If you search for Spare ribs, worcestershire, mustard, garlic, onion, it will ignore the garlic and onion. There is even a chance it will ignore one of the first three - spare ribs, worcestershire, or mustard. If you double back and put the garlic first, it will ignore the mustard and onion. If you put the + sign in front of all of them it will go completely random, giving you chicken recipes and pork in general rather than spare ribs per se. And don't even ask about the sudden intrusion of paprika, mushrooms, and red wine, all of which are perfectly good ingredients for slow-cooker spare ribs, but I didn't ask for them.

When it does this to me and I see a recipe that I actually do find intriguing, I force myself to ignore it.  I won't give the bastards the satisfaction. You got it wrong, dammit! I am giving you a failing grade for this assignment.

7 comments:

james said...

There's also this effect: https://xkcd.com/979/

The weird bit is that sometimes you later run across what you were looking for--and wonder why the search engine couldn't.

Donna B. said...

I would interpret that as a search for ingredients, not a recipe. That doesn't mean you could trust any recipes you might find with any search.

Assistant Village Idiot said...

If I want the spare rib recipe I made years ago that I know had those ingredients, I don't know how else I'd look. Do you have a special skill you'd like to share on this?

Donna B. said...

I would search "spare rib" recipes and choose the one that most closely resembles the method and ingredients you remember.

Though I have no special skill in searching for online recipes, I do have years of cooking experience and can tell you that any recipe you find online should be scrutinized very carefully for proportions. Apparently, you remember the ingredients but not the proportions, perhaps not the method? If you do remember the method, you are more than halfway there. Worcestershire, mustard, garlic, onion -- those are seasonings. Thus, they are mere suggestions. If you sent me the original recipe, I'd likely cut the amount of Worcestershire sauce and mustard in half because they aren't seasonings I particularly like.

My grandson thinks I make the best ever mac n cheese and he insists his mother follow my recipe exactly. The problem is that I don't have an exact recipe -- I have a method. It depends on what cheese is on sale, whether I have whole milk, 2%, half n half, or cream on hand. His insistence that *my* mac n cheese is the best has spread to his cousins and you have no idea the pressure I'm under to create an "exact" recipe. I hate to disappoint my grandchildren, but that's not likely to happen. They will have to live with the dozen variations just like I've lived with the dozen variations on "the best cornbread ever" since I was their age.

Douglas2 said...

It's been a great frustration to my wife when she wants to draw my attention to something she saw online and she says "Just do a search on X, Y, and Z" and I don't see anything like what she was describing in the results.

Then in a huff she says "give me that laptop", which begets MORE frustration as her trackpad is set to reverse-scrolling so mine is 'backwards'.

THEN she finds that when she types the same search terms that I typed, she gets the same results as me when using my computer.

Google has become progressively better at finding things that I find interesting and progressively worse at finding what I'm actually looking for. I've had days when Boolean search has been completely inoperative, makes no difference at all to the lame search results.

Used to be that I'd try Bing next, and then Yandex, and lately I just head straight for Yandex. There doesn't seem to be any political, PC, or 'disinformation' filtering there at least in the searches that I've been doing (YMMV). Using boolean symbols, – "" actually works.

I've long had a tactic of using different browsers for different compartments of my life, partly to avoid mixing up work and home social media and partly so that I don't have to keep signing into and out-of different organizations' office-365 and gmail based email accounts. So "Brave" browser is one of the ones that I suggest from having long good experience with it, and the same org is putting out a search engine which I look forward to trying.

Assistant Village Idiot said...

Thanks. I use Duckduckgo with Bing as a backup. Never tried Yandex. I downloaded Brave long ago but never used it.

I forget that MY previous searches are part of the algorithm.

RichardJohnson said...

I use the Google search engine only for Advanced Search- finding a specific word or term at a specific site. Unfortunately, Google is still the best at that. As such, I can't add any complaints about what Google does or doesn't do. DuckDuckGo is my normal search engine.

I used DuckDuckGo for fish cake recipes, to get inexpensive, nutritious canned fish like sardines or mackerel into my diet. I wasn't looking for the perfect recipe, but for a good enough one that I could modify to better fit my preferences. I looked at a fair number of recipes. I selected for not overly complex, and not a lot of added oil such as mayonnaise. Sardines and mackerel have enough oil as is. I then further modified a recipe for ease and/or cost-such as ground up oatmeal instead of Panko breadcrumbs. I tried adding more onions. Different seasonings.

Even though the fish cake recipe I now use is considerably different from the online recipes I looked at, the online recipes were very helpful in my making it up.

I have looked at yeast piecrust recipes online, and discovered that there aren't a lot of them. One big site cribbed its yeast piecrust from Beatrice Trum Hunter's Natural Foods Cookbook from 5 decades ago.