Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to model classical NLU intents and entities(slots)? #133

Open
rmtuckerphx opened this issue Oct 21, 2023 · 0 comments
Open

How to model classical NLU intents and entities(slots)? #133

rmtuckerphx opened this issue Oct 21, 2023 · 0 comments

Comments

@rmtuckerphx
Copy link

The calendar example's actions are similar to intents that one would define for Dialogflow or Alexa. How to use OpenAI as an intent NLU engine?

The issue is that "yes" and "yes, please" matches the YesIntent but "ok" or other affirmative responses do not.

Inputs:

  • yes
  • ok
  • sure
  • i will
  • yes, please

Type schema:

// The following types define the structure of an object of type BotIntent that represents a user request that matches most closely to the sample or synonyms

export type BotIntent = YesIntent | NoIntent | UnknownIntent;

// if the user types text that closely matches 'yes' or a synonym, this intent is used
export type YesIntent = {
  intentName: 'YesIntent';
  sample: 'yes';
  text: string;
};

// if the user types text that closely matches 'no' or a synonym, this intent is used
export type NoIntent = {
  intentName: 'NoIntent';
  sample: 'no';
  text: string;
};

// if the user types text that can not easily be understood as a bot intent, this intent is used
export interface UnknownIntent {
  intentName: 'UnknownIntent';
  sample: 'unknown';
  // text typed by the user that the system did not understand
  text: string;
}

How to model more complicated intents with required and optional entities?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant