Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    14.1p/15.0d New AI samples questions

    Hi Isomorphic,

    I'm playing around with the new 14.1p/15.0d AI samples, which are really cool, and have a few questions.
    While for most of the samples it is easy to understand what is happening (on the SmartClient side of things), some feel like black magic.
    • aiFilterAssist does not seem to send any requests in the Developer Console nor in the F12 browser tools. Does this really happen locally, and if so, how does it work?
    • Is aiAnswerEngine using DataSources serverside? Does it e.g. fetch all records and send them to OpenAI, or are there for example aggregation queries generated? Would these queries honor DSRequestModifiers or generally Declarative Security features? Or is it all client side? From the Developer Console one can tell that certainly a lot is happening client side.
    Other than that, the aiSortAIDE example seems to show "random" results (I was always looking at the end of the list with restricted/very restricted, which is constantly changing), which is interesting, as I assume the request is always the same and only a few seconds passed between sample starts.

    Pretty interesting stuff for sure!

    Best regards
    Blama

    #2
    It's a good sign when a feature is so advanced it seems like black magic :)

    1) aiFilterAssist indeed sends requests to AI to suggest formal criteria based on the user's prompt. Let us know if you continue to not see these - the sample might somehow be running in "test mode" for you

    2) The Answer Engine basically accesses DataSources in the same way the end user accesses DataSources: it puts together DSRequests client-side and executes them. This creates two huge advantages:

    a. automatic security enforcement: the AI is restricted to what the end user can do, automatically. All security rules are applied.

    So there is no need to try to analyze, say, SQL directly generated by the AI, and try to enforce security rules on that generated SQL based on the user's role (an extremely hard problem).

    It's all just automatic. If the end user can't see a given field, neither can the AI.

    b. performance: the whole process can be driven client-side - it can actually be serverless

    Bedrock AWS and other AI providers have a way of vending tokens to a browser allowing that browser to directly contact an AI for a limited session, without going through a server as a proxy.

    When run in this mode, Answer Engine causes zero server load for it's AI use. The only server load you see is Answer Engine performing DSRequests as it analyzes the data. And the results of those requests are cached client-side.

    Further, the resulting answer is Component XML / JSON, and cached server results can optionally be inlined, meaning viewing a shared dashboard causes zero server requests unless and until you play with the dashboard (like scroll further into the data, or change criteria in a grid).

    So it is literally as light on your server as it's possible to be.

    3) Sort by AI (AIDE) has a known bug here, but we already have the solution, it's in process.

    Comment


      #3
      Hi Isomorphic,

      thanks for the fast answer.

      re 1):
      I'm not seeing any requests for aiFilterAssist, see the video at the bottom.

      re 2):
      Yes, I was thinking about how the server would impersonate as that client how that surly would open a can of worms. But with everything happening on the client it's a lot easier to understand.

      I assume that now the textual description of DataSource and Fields can and will be used as context for AI queries? If so, does this effect l18n? Does e.g. the AI always need the description to be in English?

      re AI use:
      So the openAIRestConnector DataSource right now is basically just a proxy to forward client requests to OpenAI and protect your API key?

      Best regards
      Blama

      Click image for larger version

Name:	No server contact.gif
Views:	32
Size:	2.08 MB
ID:	276184

      Comment


        #4
        1) aiFilterAssist: we'll check on this.

        2) Answer Engine: localization is also basically "free" with Answer Engine. Answer Engine is given the current DataSources and UI with localized titles, and the UI is generates uses those localized titles, and for the prose parts of the produced dashboard result, you can ask it to produce whatever language you like.

        3) openAIRestConnector: yes, there is no server logic other than splicing in the API key. With AWS Bedrock sessions (and similar offerings on Azure) the Answer Engine and other AI tools will not even need to be proxied via the server.

        Comment


          #5
          Hi Isomorphic,

          thanks for the fast answers. Re 2):
          Does it matter that your prompt is always in English while everything else is localised?
          I mean that the different content might be in different languages as here in the DE version of aiHiliteAssist:
          Code:
          {
              dataSource:"openAIRestConnector",
              operationType:"fetch",
              operationId:"fetch",
              data:{
                  model:"gpt-4o",
                  temperature:0.7,
                  messages:[
                      {
                          role:"system",
                          content:"This is a request for one or more Hilite objects to apply to a data-bound component (such as a ListGrid) in a web application built with the Isomorphic SmartClient JavaScript Framework. Should you need to know, today's date is August 05, 2025. A hilite applies specific styling (such as a text color, background color, and/or font-weight) to one or more fields of records that match a filter-query. The user's description of the styling to apply, the fields that should have this styling, and/or the filter-query is:"
                      },
                      {
                          role:"user",
                          content:"Markieren Sie alle Länder, die den Buchstaben U enthalten, mit gelbem Hintergrund und roter Schrift."
                      },
                      {
                          role:"system",
                          content:"The data-bound component's DataSource has the following summary:\n{\n
          ...
          ...
          Best regards
          Blama

          Comment


            #6
            Mostly, it doesn't matter. At a basic level, even with chat interfaces for AIs, you can say something like: here is the topic for a blog (in English). Write the blog in Italian. And it works.

            The main thing we'd be worried about is very short phrases where the AI can't infer the language. But that's definitely not a problem for our (quite lengthy) prompts in English, especially when we tell the AI that the user is in the DE locale, for example, so that it understands some titles or labels will be in German.

            Certainly, it would be much worse to do mechanical translation of our English prompts to the current locale. That's how you get things like: "the spirit is willing but the flesh is weak" -> "the vodka is strong but the meat is rotten" (famous example of mechanical translation going wrong).

            Comment

            Working...
            X