Extracting Ingredients and Cookware from Recipe Text
Short answer
A Create a Vertex AI entity-extraction text dataset with two entities, ingredient and cookware, label at least 200 examples each, train AutoML, and evaluate on a holdout set.
Question
Key Takeaways
The exam tests choosing span-level entity extraction with a small custom taxonomy over document classification or pre-trained APIs; the trap is creating one entity per distinct word, which breaks Vertex AI's 100-label dataset limit.
Recipe ingredient and cookware extraction is an entity-extraction task, answered by option A: a Vertex AI text dataset with two custom entities, at least 200 labelled examples each, AutoML training, and holdout evaluation.
Common mistake: Option D looks similar but creates an entity for every distinct ingredient and cookware word, which exceeds Vertex AI's maximum of 100 unique entity labels and cannot generalise to unseen ingredients.
Expert Analysis
Governing principle
Vertex AI AutoML entity extraction is the documented path when you must define your own entity types and pull typed spans out of free text. The workflow is fixed: create a text dataset configured for entity extraction, define the entity types you care about, label examples of each span, train the AutoML model, then measure it on a holdout split. The dataset preparation rules cap unique entity labels at 100, which is exactly why option D's approach — one entity per distinct ingredient or cookware word — is invalid; that scheme would explode far past the limit and never generalise to unseen ingredients.
Mapping the scenario
The meal-planning task needs span-level extraction with a small, closed taxonomy: two types, ingredient and cookware, covering many surface forms (carrot, rice, bowl, pot). Option A follows that structure — two entities, roughly 200 labelled examples each, AutoML training, holdout evaluation — so it matches both the task and the platform's data constraints. Option B is wrong because multi-label classification labels whole documents, not the individual words and their positions; a recipe-level label cannot return the substring "carrot" inside a sentence.
Why C fails
Option C leans on the Natural Language API's Entity Analysis, a pre-trained general-purpose model tuned for people, places, organisations and similar standard categories. It has no built-in knowledge of recipe ingredients or cookware and offers no mechanism to register your own types, so it cannot be customised to this domain; a holdout evaluation would simply confirm weak coverage. Comments argue C is cheaper and that labelling effort is unnecessary for common nouns, but cheapness is not accuracy, and the API's generic entity taxonomy is the deciding limitation. Other comments counter that custom labelling yields better domain accuracy, though the real blocker for D remains the 100-label ceiling.
Verdict
Option A is correct: define exactly two entity types, label at least 200 spans each, train AutoML entity extraction, and evaluate on a holdout dataset.
Official Reference
- https://cloud.google.com/vertex-ai/docs/text-data/entity-extraction/prepare-data
- https://cloud.google.com/natural-language/docs/analyzing-entities
These links open the official vendor documentation in a new tab.
Exam Strategy
Classify the task first: if the question asks to pull typed substrings from free text, it is entity extraction, not document classification, so discard any multi-label option immediately. Next check platform limits — a custom dataset caps unique entity labels at 100, which eliminates designs that mint one label per distinct word. Finally, reject pre-trained generic APIs when the domain types are custom, since they cannot register your own entity categories; then confirm the surviving option follows dataset creation, labelling, training, holdout evaluation in order.
Frequently Asked Questions
Why isn't multi-label text classification enough for ingredient extraction?
Why can't I create one Vertex AI entity per distinct ingredient?
Does the Natural Language API Entity Analysis handle custom recipe entities?
Community Votes
64% of anonymous learners picked answer A. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 19 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 19
-
b1a8fae 👍 4 Answered AA. "... you might create an entity extraction model to identify specialized terminology in legal documents or patents." I prefer this over C, which might classify carrot as vegetable, chicken as meat... custom entity extraction allows you to specify what entities you wish to extract from the text.
-
guilhermebutzke 👍 3 Answered AMy Answer: A A: is the most suitable approach for this task because we need to identify and extract specific named entities ("ingredient" and "cookware") from the text, not classify the entire recipe into predefined categories. B: This approach would require classifying each recipe based on all possible ingredients and cookware, leading to a vast number of classes and potential performance issues. C: This pre-built solution might not be as customizable or scalable as training a specific model for this task. D: This is impractical and unnecessary as the number of potential ingredients and cookware is vast.
-
Wuthuong1234 👍 3 Answered CThe Entity detection in the NLP API will be sufficient to identify ingredients and cookware-related words. It is much easier than training your own model in AutoML. Keep in mind that training on your own dataset could introduce some bias. Imagine your training data might cover many French or western recipes, but suddenly you get lots of Thai recipes in production. Your AutoML model would struggle to correctly identify ingredients that are not so common in western cooking such as lemongrass, kecap manis, kaffir or galangal.
-
omermahgoub 👍 3 Answered CNatural Language API offers a pre-built solution for entity analysis which eliminates the need for custom model training and labeling large datasets, saving time and resources. Vertex AI AutoML can aslo be used for entity extraction but it requires data labeling and training, which can be time-consuming for a vast number of potential ingredients and cookware.
-
b1a8fae 👍 3https://cloud.google.com/vertex-ai/docs/text-data/entity-extraction/prepare-data
Show 14 more comments
-
kalle_balle 👍 3do you mean Option A?
-
fitri001 👍 2 Answered AFor extracting ingredients and cookware from recipe text files, creating a text dataset on Vertex AI for entity extraction with a custom NER model is the better approach. While it requires more upfront effort for data labeling and training, it offers superior accuracy and control over the types of entities extracted. However, if you need a quick and easy solution to get started, the Natural Language API's Entity Analysis can be a temporary option. Be aware that the accuracy might be lower, and you might need to post-process the results to filter out irrelevant entities.
-
Omi_04040 👍 2 Answered AThis option involves creating a dataset specifically for entity extraction and training an AutoML model to identify ingredients and cookware. By labeling a minimum of 200 instances for each entity, it ensures a sufficient amount of data for training. Using a holdout dataset for assessment helps evaluate the model's performance. Overall, this approach seems appropriate for the task at hand. Reference: https://cloud.google.com/vertex-ai/docs/text-data/entity-extraction/prepare-data
-
andrea_c_ 👍 2 Answered CWith A you must label a dataset. Since the entities that need to be recognized are pretty common this effort is not justified. Moreover, as specified in https://cloud.google.com/vertex-ai/docs/text-data/entity-extraction/prepare-data, "You must supply at least 1, and no more than 100, unique labels to annotate entities that you want to extract." So, it looks like the dataset has a limit of 100 entities, which I do not think is enough for this use case.
-
daidai75 👍 2I prefer to A. Option C is not the best, because The NLP API is designed to identify general entities within text. While it's effective for broad categories, it may not be as precise for specialized domains like cooking ingredients and cookware, which require a more tailored approach.
-
shadz10 👍 2 Answered AA is the correct option here
-
taylz876 👍 1 Answered AWhy A is right • The task is entity extraction. You need to pull individual words out of the text (carrot, pot) and say what kind each one is. That's different from classifying a whole recipe. • Two entity types, many examples each. You define just two entity types, ingredient and cookware, and label plenty of real examples of each (200 or more). The model learns what an ingredient looks like and what cookware looks like from the context, so it can recognize items it never saw in training. • Evaluate on a holdout set. Testing on recipes the model hasn't seen shows how well it works in practice. Why the others are wrong • B: Multi-label text classification tags a whole recipe with labels. It doesn't find where each ingredient or cookware item appears in the text, which is what extraction means. • C: The Natural Language API's entity analysis finds general entities (people, places, organizations, products) and can't be told to use your custom "ingredient" and "cookware" categories. • D: Creating a separate entity for every different ingredient and cookware item gives you hundreds of entity types with only a few examples of each. The model can't learn from so little data, and it can't handle a new ingredient. Two broad types with many examples each work far better.
-
OpenKnowledge 👍 1 Answered AThe Google Cloud Natural Language API primarily offers pre-trained models for entity extraction, identifying common entities like people, places, organizations, and events. While it provides robust capabilities for these standard entity types, it is not directly designed for custom entity extraction where you define and train the API on your own specific entity types. For custom entity extraction, you would typically need to use a more specialized service like Google Cloud's AutoML Natural Language. AutoML Natural Language allows you to train custom machine learning models to identify entities unique to your domain or use case by providing your own labeled training data. This enables you to extract entities that the pre-trained Natural Language API models might not recognize.
-
pikachu007 👍 1 Answered COption B: Multi-label text classification is less suitable for identifying specific entities within text and would require labeling entire recipes with multiple classes, increasing complexity and reducing model specificity. Option C: Natural Language API's Entity Analysis might not be as accurate for this specialized domain as a model trained on custom recipe data. Option D: Creating separate entities for each ingredient and cookware type would significantly increase labeling effort and potentially hinder model generalization.
-
AzureDP900 👍 1By choosing option A, you can leverage the power of machine learning to efficiently extract ingredients and cookware from recipes in a scalable manner. option C uses the Entity Analysis method of the Natural Language API, which might be a viable option if you had access to the API's pre-trained models. However, since you're working with Vertex AI, creating a dataset for entity extraction is a better choice.
-
billyst41 👍 1 Answered AI think I'll go with A. C was what I picked first. From Gemini: Using the standard, pre-trained analyzeEntities method of the Natural Language API alone is not sufficient to extract specific cooking ingredients and cookware from freeform text. While it can identify common nouns, it lacks the specialized domain knowledge to reliably parse the unique structure of recipes.
-
tavva_prudhvi 👍 1No, A is right as it may not be as effective for this specific task unless the ingredients and cookware are already well-represented within the types of entities the API is trained to recognize. This approach might require less initial setup but could be less accurate for specialized domains like recipes.
-
shadz10 👍 1 Answered CReconsidering my answer and going with C Option A involves using AutoML entity extraction, which could be a valid approach. However, for extracting entities like ingredients and cookware, Google Cloud's pre-trained Natural Language API might be a more straightforward solution.
-
hit_cloudie 👍 1 Answered Aagree with Omi_04040
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All PMLE Questions
Access 65 questions with complete answers and detailed explanations.
View Full PMLE Practice Test →