Need help building NLU model from docs

Hi, I am trying to import the NLU model example that was provided in the docs here.

But I received a email saying “We’re having trouble building your NLU model request.search using the data you provided”

Will like to confirm if the steps I am doing is correct?

  • create a file name ‘request.search.toml’
  • add the contents into the file
  • import the file

Reference for the file content

description = """
Search for an exercise video relevant to a specific muscle group.
"""

[implicit_slots.search_target]
type = "entity"
value = "exercise"

[slots.muscle_group]
type = "entity"
values = [
    "neck",
    "back",
    "biceps",
    "triceps",
    "calves"
]

[generators.search_phrase]
type = "list"
values = [
    "search for",
    "find me",
    "i want"
]

[generators.exercise]
type = "list"
values = [
    "exercise",
    "workout",
    "series",
    "circuit",
    "routine",
    "movement"
]

[utterances]
values = [
    "{search_phrase} a {muscle_group} {exercise}",
    "i want to exercise my {muscle_group}"
]

Hi @sual!

Thanks for reaching out.

Your process is almost correct—you’re missing a step between 2 and 3. The first section of the NLU training data doc you linked shows the final structure for an NLU model: a zip file that contains an intents/ and (optionally) an entities/ subdirectory. request.search.toml (and presumably other TOML files containing different intents) would go in the intents/ directory, and when training is complete, the model will be given the same name as the zip file.

This is why import is failing—the system expects a zip file with multiple intents rather than a single intent file. An NLU model with a single intent wouldn’t do you much good anyway—it would predict that intent no matter what input it received.

Hope this helps,
Josh

Thanks for your reply!