Why does Luis Preview Portal use Luis v2 prediction endpoint? RRS feed

  • Question

  • I created a Luis application, intents and entities, from scratch in the Luis Preview Portal (https://preview.luis.ai).

    I'm watching Microsoft videos, learning about Luis v3 prediction API and trying to test it out with a Luis application I create.

    If I use Fiddler to watch the network traffic, I see that the Preview Portal makes calls to the v2 (not v3) prediction endpoint.  It makes calls to the v3 authoring endpoint afterwards, but those are not the calls that tokenize utterances.

    Shouldn't the preview portal use the Luis v3 prediction endpoints?

    I'm having some trouble re-creating behavior I see in the Microsoft videos.  Is this because the videos are using v3 prediction API?

    Please advise.

    Adam Leffert http://www.leffert.com

    Tuesday, May 5, 2020 2:45 PM

All replies

  • Hello Adam,

    It looks like the version of the API that can be used can be configured from the manage section of your app in the preview LUIS portal. Here is a screen shot from my resource. 

    If your app is pointing to v2 is it possible to change it to v3 and check if it works?


    Wednesday, May 6, 2020 7:28 AM
  • Rohit,

    Thank you for your reply.

    To clarify, I am not asking about an app.  I'm asking about the Luis Preview Portal.

    I will write code to call Luis from C# via the v3 API's you point to.  For now, I'm asking about how the Luis Preview Portal (LPP) works.

    I'm trying to learn specifically how the LPP works, when it comes down to small details, such as how to select parts of utterances and assign them to built-in entities, as in this question I posted separately:


    I'm watching the Microsoft videos, reading the docs and learning the fine details.

    I get the idea that the LPP is the latest (if not production-ready) GUI for Luis and that the v3 API's are also the latest.  I would assume that the LPP uses the v3 API's for the LPP's own GUI features.  If it doesn't, I'm concerned that I'm wasting time learning details of the old stuff (v2) which may be different in v3.

    In the LPP, I enter an utterance, for example

    best mexican food in boston ma

    I capture the network traffic generated by the LPP (not my own C# app) when I submit this utterance to the LPP for parsing with my model.

    The URL you point to in your reply is not the URL the LPP itself uses.

    When I submit the utterance to the LPP, it makes 4 requests

    https://westus.api.cognitive.microsoft.com/luis/webapi/v2.0/apps/[my app id]/versions/0.1/predict

    https://westus.api.cognitive.microsoft.com/luis/webapi/v2.0/apps/[my app id]/versions/0.1/predict
    (this is the one whose reply contains the info on how the utterance was tokenized)

    https://westus.api.cognitive.microsoft.com/luis/authoring/v3.0-preview/apps/[my app id]/versions/0.1/examples
    (no response body)

    https://westus.api.cognitive.microsoft.com/luis/authoring/v3.0-preview/apps/[my app id]/versions/0.1/examples
    response is: [{"value":{"ExampleId":1072821422,"UtteranceText":"best mexican food in boston ma"},"hasError":false}]

    The first 2 requests use the v2 API and perform prediction.

    The second 2 requests use the v3 API, but unless I am mistaken, are related to authoring, not prediction.  The response from the first v3 request is empty.  The second is short and does not contain parsing info.

    So unless I misunderstand what's going on here, which is certainly possible, LPP uses the v2 API to parse utterances.

    This leaves me concerned that I am wasting time trying to use the LPP to learn the subtleties of how to create an effective model with the v3 API's.

    Please advise.



    Adam Leffert http://www.leffert.com

    Wednesday, May 6, 2020 5:41 PM
  • Hello Adam,

    Apologies for my delayed response. I checked with our internal team on the above question and it looks like the v2 version API's captured in your network data are actually webapi's that are actually for internal use for the portal and there is no dependency on these API's mapped to the actual v3 version of the APIs and cannot be called by users directly like the v3.0-preview version of the public APIs, so the preview portal uses the webapi internally and all non webapi's map to the available preview version of the API's that are available for public.

    https://westus.api.cognitive.microsoft.com/luis/webapi/v2.0/apps/[my app id]/versions/0.1/predict

    We hope this clarifies your question.

    If you found this post helpful, please give it a "Helpful" vote. 
    Please remember to mark the replies as answers if they help. 

    Friday, May 15, 2020 6:57 AM
  • This is helpful.  Thank you.

    To further clarify, is the behavior the internal API's you describe above identical to:

    - the public v2 API's

    - the public v3 API's

    - neither

    I understand internal.  I'm not trying to call them.  I'm trying to understand how to interpret the results I get in the Luis Preview Portal GUI vs. the results I will get when I call the public API's.



    Adam Leffert http://www.leffert.com

    Friday, May 15, 2020 10:24 AM