Ontology
What is an Ontology?
For general information please check out: Preliminaries and Quiz Materials.
For this project:
Intents represent the user's high-level actions or goals.
Example: When a user says, "Can you recommend a recipe?", the intent could be
requestRecommendation
.
Slots define specific pieces of information extracted from the user’s input.
Example: In the query "Add garlic and chicken thighs to the recipe filter,"
garlic
andchicken thighs
are slot values of theingredient
slot type.
The ontology file is where all the possible intents and slots for the system are defined.
Steps to Analyze the Ontology
Open the Ontology File
Locate the ontology file (
ontology.json
) in your project. This file contains two key sections:Intents: A list of all possible intents your system can predict.
Slots: A dictionary where the keys represent slot types (e.g.,
ingredient
) and the values are lists of possible slot values (e.g.,garlic
,chicken thighs
).
Review the Intents
Look at the
intents
section in the file. Each intent represents a unique user goal or action.Reflect on the variety of intents. For example:
What do intents like
greeting
orfarewell
imply about the system's capabilities?How does the system distinguish between
recipeRequest
andrequestRecommendation
?
Explore the Slots
Examine the
slots
section. This is a dictionary of slot types and their potential values.Key questions to consider:
How many slot types are defined? Examples might include
ingredient
,cuisine
, orrecipe
.Are there any patterns in the slot values?
How do these slots connect to our MARBEL agent potentially?
Think About Model Outputs
Your model will predict one intent per input (intent classification) and assign a slot label to each token in the input (slot filling).
Understanding the ontology helps you map these predictions to actionable output
Reflection Questions
Study the Ontology File
Open
ontology.json
and carefully review theintents
andslots
.Make notes on any patterns, ambiguities, or gaps you observe.
Answer the Following Questions
What are the most common intents in the file? Are there any that seem rarely used or overly specific?
What slot types and values do you think will be the most challenging for the model to predict? Why?
How does the structure of the ontology affect how you might design a dataset or interpret the model’s outputs?
Done? Proceed with Fitting Label Encoders .