Question Anna Golitsyna · 4 hr ago

"Ask AI" quality and complaints

Is there any dedicated place on the InterSystems site to complain about "Ask AI" lack of rather simple knowledge? I'd say, as a bare minimum it should be trained on ALL InterSystems usually excellent documentation and know how to quote from it. A couple of recent examples, all of them "beyond my knowledge", which really should not be "beyond my knowledge". Common language rephrasing did help with a couple of requests below, but AI should be able to rephrase itself.

  1. How to copy all routines from namespace ABC to namespace XYZ?
  2. Can you list all INT routine indices?
  3. Suggest code to run the RoutinesSortByField query by Date (it's a built-in query - AG)
  4. need code for maximum of 4 integers
  5. How to check if string1 is alphabetically before string2?
  6. Given a Cache process, is it possible to get CPU for this process?
  7. ...

Thanks in advance,

Anna

Comments

Stephen Canzano · 4 hr ago

I tried your first example and entered exactly "How to copy all routines from namespace ABC to namespace XYZ?" and got back 

https://docs.intersystems.com/iris20261/csp/docbook/DocBook.UI.Page.cls…).

2. **Import routines into namespace XYZ**:
- Switch to namespace XYZ in the Management Portal.
- On the Routines page, click the Import button to open the Import Routines wizard.
- Choose the file where you exported the routines and select or clear options for compiling imported items as needed.
- Start the import process. Ensure to specify any compile flags if necessary [[1]](https://docs.intersystems.com/iris20261/csp/docbook/DocBook.UI.Page.cls…).

This process allows you to transfer routines between namespaces using the import/export mechanism. After importation, remember to compile the routines in the new namespace to make them executable.">

To copy all routines from namespace ABC to namespace XYZ, you need to export the routines from the source namespace and then import them into the target namespace using the Management Portal. Here are the steps:

  1. Export routines from namespace ABC:
    • Navigate to the Management Portal and go to the Routines page (System Explorer > Routines).
    • Select all routines you want to export by checking their boxes.
    • Click the Export button to open the Export Routines wizard.
    • Specify the file name and location for the export file. Ensure you select the appropriate options, such as exporting the routines in XML format, if required [1].
  2. Import routines into namespace XYZ:
    • Switch to namespace XYZ in the Management Portal.
    • On the Routines page, click the Import button to open the Import Routines wizard.
    • Choose the file where you exported the routines and select or clear options for compiling imported items as needed.
    • Start the import process. Ensure to specify any compile flags if necessary [1].

This process allows you to transfer routines between namespaces using the import/export mechanism. After importation, remember to compile the routines in the new namespace to make them executable.

Assistant says:

Sources

Using the Routines Page > Introduction to the Routines Page

seems reasonable... maybe I'm not understanding your issue

0
Anna Golitsyna  3 hr ago to Stephen Canzano

Thanks, Stephen. That was exactly my today's question, the result is below. 

My main issue in this post is the AI we have is too feeble, perhaps undertrained. Secondary issue is to be able to complain about specific AI problems in a dedicated place.

0
Julius Kavay · 2 hr ago

Why do you need an AI for those questions?

4) and 5) I'm pretty sure, both questions were already answered by the creators of MUMPS back in the 60es, without AI

ClassMethod MAX(a,b,c,d)
{
  quit $$max($$max(a,b),$$max(c,d))

max(x,y) quit $s(x>y:x,1:y)
}

/// Compare alphanumeric data
/// OUT: a<b --> -1
///      a=b -->  0
///      a>b -->  1
ClassMethod AlphaCompare(a,b)
{
  quit $s(a=b:0, a]b:1, 1:-1)
}

6) CPU for this process - What do you mean by that?
  a) on a multicore CPU, you ask for the core number for your process?
     If yes, I think, you won't get that number, because
     usually, a process runs on the same core, the emphasis is on "usually" but the OS may shift a process, according to load, to another  core.
     If you could have a code like:
     set currentCore=$$GetTheCurrentCore($j)
     write "Current core: ",currentCore,!
     in the next point of time that information could be wrong
     
  b) do $system.CPU.Dump()
     gives you an info about the CPU, your proces runs on
  
  c) write ##class(%SYS.ProcessQuery).GetCPUTime()
     gives you two CPU-times, system- and user-time in milliseconds
 

0
Anna Golitsyna  1 hr ago to Julius Kavay

Why do I need AI for these questions? Speed of coding, that simple. I use AI much less than many programmers nowadays and I really should use it more often, maybe ChatGPT or Codex though, since Ask AI regularly has problems with very simple questions, like the ones above. What are chances it would handle more complicated situations better?

0
Robert Cemper · 2 hr ago

As almost any AI it lives from already posted questions
If the subject was never touched before, there is just no chance of finding a suitable answer

Example #5):  I have never met any question related to the COS follows operator ] 

Example #2)  I never met any mention of global ^ROUTINE or ^rOBJ or similar

So where might the knowledge come from if never been mentioned before ?

0
Anna Golitsyna  1 hr ago to Robert Cemper

I am not a specialist in AI in general, but I was under impression that AI could or should process not only already posted to it questions, but selected body of other types of knowledge as well. In this case, InterSystems documentation and existing Iris/Cache code, be it internal or external, seem very useful to train Ask AI on. Say, number 3 is both in code and documentation. Probably someone used it already, or a similar query. 

Example 2. For what is worth, I dealt with ^ROUTINE, ^rOBJ, or rINDEX multiple times, using their contents, not changing programmatically, except for rebuildIndex.

Also, if AI knows, that is faster than browsing documentation or trying to remember functionality that I rarely use.

Lastly, I know that ChatGPT usage and budget is incomparable. Still, could anything be done about Ask AI knowing less about ObjectScript that ChatGPT?

0