Discussion
· Jul 25

Share how Developer Community AI helped you for your chance to win

Hey Community!

As you may know, our Developer Community AI has been out for over a month now 🎉 We hope you were curious enough to give it a try 😁 If you haven't yet, please do! Anyway, since it's still in beta, we're very interested in learning what you think about it, and we look forward to hearing your thoughts and experiences.

Since we value your time and effort, we will give away a cute prize to a random member of the Community who shares how DC AI helped you. To participate in this sweepstakes, you have to follow the guidelines:

  • be a member of the Community (InterSystems employees are welcome to participate)
  • write a comment describing how Developer Community AI helped you with your question (don't forget to add a link* to the result) in this discussion.

And this is it! At the end of summer, we will use random.org to choose one lucky owner of our cute little something out of everyone who commented here (and followed the guidelines) — max 5 entries per person.

Good luck!


* To get a link to the answer, click on the share button  under the answer.

Discussion (22)13
Log in or sign up to continue

I think the DC AI is the most helpful with answering more straightforward questions. For example, on DC every once in a while there's a question on converting dates (for example): https://community.intersystems.com/ask-dc-ai?question_id=129616

Most short questions like this can be answered by AI and if the answer is wrong than it's worth posting a question on a Developer Community.

There are lots of articles in the DC and in the documentation about error handling and I have a few of them bookmarked, but for the most part I always throw $$$GeneralError (5001).  Using this tool and asking about when I should or shouldn't use this helped me learn that there are more buckets to throw custom errors under.  Plus the link to the source article gives even more info on registering custom error codes (I've never seen this article, so glad this tool pointed me to it).  

https://community.intersystems.com/ask-dc-ai?question_id=132835

I tried DC AI and found it quite impressive. Below is one of the questions I asked:
https://community.intersystems.com/ask-dc-ai?question_id=177731
Here are some suggestions for improvement:
Session History: Having a history of asked questions, at least at the session level, would enhance convenience and allow users to track their inquiries more easily.
Reference Links: Instead of displaying links always as "[1]", consider using more readable references like "Ref #1" or "Ref #2". This format would improve readability.

Cool feature!

I asked for interoperability adapters for issuing shell calls and the answer was quite objective, although the DC post reference didn't match my question (I guess)... Anyway, here is the link: https://community.intersystems.com/ask-dc-ai?question_id=218088

PS: I tried to google the same question just for fun, prefixing Intersystems to it ("intersystems is there an interoperability adapter for call programs by command line?"), and didn't get any result pointing to EnsLib.Pipe.OutboundAdapter. :)

i was inspired by your post as I have an idea to use ObjectScript code to control WireMock during unit testing. So I checked the documentation of  Ens.Util.Pipe to notice it's not much help for me :(

So let's ask from community AI: https://community.intersystems.com/ask-dc-ai?question_id=242465

how i can use Ens.Util.Pipe to run a command line program?

I got answer that seems to do the job (I don't know, I haven't tried it yet, but bookmarked) but it doesn't help me with the Ens.Util.Pipe class.

Let's try another way: https://community.intersystems.com/ask-dc-ai?question_id=242514

show me an example how to use RunCommand class method of Ens.Util.Pipe class

This is beyond my current knowledge. Please ask the Developer Community for further assistance.

So in this case the AI tool is not yet a magical replacement for missing/lacking documentation :(

The results can be good, but there's room for improvement.

One of my go-to LLM tests is to provide a zero-shot prompt for ObjectScript code that calculates the distance between two points. As seen in this example (https://community.intersystems.com/ask-dc-ai?question_id=238163), which has some issues.

Most LLMs get close to answering this question, but they often fail with operator precedence and / or the square root function, either misspelling $ZSQR as $SQRT or hallucinating a math library that doesnt even exist, such as ##class(%SYSTEM.Math).Sqrt().

The problem stems from the token volume of other languages outweighing ObjectScript in the gradient descent during training. This causes solutions and functions from other languages to bleed into the ObjectScript code.

RAG powered by IRIS vector search is a good approach to address this, but it looks like it can be improved.

Generally, the LLM often has the right idea of how to answer the question, but not always with the correct details. To use an analogy, the LLM already has millions of recipes, but these might not match the ingredients in the kitchen. If we can tell it what ingredients to use, it will do a far better job at morphing a relevant recipe.

One strategy is to first ask the LLM to break down a question into smaller questions, such as "How do you calculate the square root of a number?" However, the DC AI still struggles with these simple atomic questions about the ObjectScript language:

https://community.intersystems.com/ask-dc-ai?question_id=239065
https://community.intersystems.com/ask-dc-ai?question_id=239114
https://community.intersystems.com/ask-dc-ai?question_id=239125

At a minimum, the vector database should also include these atomic facts about IRIS and ObjectScript.

One approach I've experimented with is to produce a compact document of atomic facts and either include the entire text in the prompt or have the LLM select which facts it thinks it needs first from a keyword list.

This results in a prompt reengineered by the LLM itself:

"InterSystems IRIS ObjectScript Reference: ObjectScript has strict left-to-right operator precedence, use brackets to ensure correct operator precedence, $ZSQR(num) is used to calculate the square root of the given number, $ZPOWER(num,exponent) is used to calculate the value of a number raised to a specified power. Task: How do you calculate the distance between two points."

With this approach, we see that the DC AI gives a much better response:

https://community.intersystems.com/ask-dc-ai?question_id=239152

ClassMethod CalculateDistance(x1, y1, x2, y2) As %Float
{
    // Calculate the differences
    Set dx = x2 - x1
    Set dy = y2 - y1
    
    // Calculate the distance using the Pythagorean theorem
    Set distance = $ZSQR($ZPOWER(dx, 2) + $ZPOWER(dy, 2))
    
    Return distance
}

I'm enthusiastic about this technology's potential. If you need a beta tester for future versions, please reach out. I'm also happy to contribute my ideas further if its of use.

For simple questions, its working fine. If after the answer I want to refine my question, I need to add to the original question, and not sure if sessions are persistence (like in chatGPT that I can do a "conversation").
when a too long and complex question is being entered, I got:
"This is beyond my current knowledge. Please ask the Developer Community for further assistance."
There is an advantage that some (simple) questions get good referrals to the documentation or community pages

Recently, I asked the DC-AI where the streams formatted as %GlobalCharacterStream are saved, as since I suspected that these were responsible for a significant disk usage. 

The chatbot answered: <"Streams formatted as %GlobalCharacterStream are typically stored in the global ^CacheStream by default.">. I found out that I wasn't the only one with this problem and asked further information about the CacheStream global and how to clean it up.

The best solution to my issue was to implement a custom purge task, as I found in one of the sources the bot provided me (that provided purging code too):

1.Cleaning up CacheStream Global

2.Default Purge Does Not Delete Streams

3.A beginners guide to Orphaned data- How as a trust we cleaned up 200+gb

My overall experience with the DC-AI has been quite positive. Provided information is still closely tied to the specific answers given on the forum about the argument and could be more generalized, but I believe we're on the right way.

Links to the discussions below:

https://community.intersystems.com/ask-dc-ai?question_id=249111

https://community.intersystems.com/ask-dc-ai?question_id=249126