1

I'm trying to do a simple story that would go something like this:

U: What's the stock symbol for Google?
A: The stock symbol for Google is GOOGL.
U: Give me a stock quote.
A: The current price for GOOGLE is 796.95.

But I'd also like the user to be able to do:

U: Give me a stock quote for GOOGL.
A: The current price for GOOGLE is 796.95.

In addition, I'd like the user to be able to use shorthand and shorten the above to:

U: symbol google
A: The stock symbol for Google is GOOGL.
U: quote
A: The current price for GOOGLE is 796.95.

and

U: quote GOOGL
A: The current price for GOOGLE is 796.95.

or

U: GOOGL quote 
A: The current price for GOOGLE is 796.95.

and also: U: quote A: What symbol would you like a quote for? U: GOOGL A: The current price for GOOGLE is 796.95.

But I can't seem to find a way of structuring the above without WIT.AI freaking out or producing outputs that just dont' work.

I'd paste in some of the iterations I'd try but it's challenging with a UI front end and non-concise code output.

Thanks in advance.

dangerimp
  • 11
  • 2
  • I feel your pain:( To my surprise, wit.ai is "not so smart"...maybe not yet. One way you can try to achieve that is to make sure you set entities by each possible user input and then in you different stories (short and long) you use those entities in the Actions tab as hard conditions, meaning: send this reply ONLY IF entity "symbol" is present. It actually surprises me that wit.ai doesn't really follow the story if you don't have Actions set properly (conditions). The "story" flow is sort of useless... – GeekSince1982 Aug 23 '16 at 07:54
  • 1
    I agree with @GeekSince1982, go with setting the ONLY IF on the actions. – Bcf Ant Sep 17 '16 at 17:17

1 Answers1

0

I was able to get this working by adding both an "intent" and "verb". Additionally, I avoided trying to train the "quote" by itself use case.

dangerimp
  • 11
  • 2