cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
The Discovery Summit 2025 Call for Content is open! Submit an abstract today to present at our premier analytics conference.
Choose Language Hide Translation Bar
View Original Published Thread

How can get an AI to be more familiar with the JSL scripting language in JMP?

lala
Level VIII

I often use AI to write Python code, but I find it's less familiar with JSL. I explain that I want to open local JMP files or save results as JMP tables, but it often gives me code that deals with CSV files, or the JMP table code it generates doesn't work.

I have to constantly remind it of the correct syntax.

Here's a syntax reference for reading JMP files:

import jmp
import numpy as np
import pandas as pd
from pandas.api.types import is_object_dtype, is_numeric_dtype, is_bool_dtype, is_string_dtype

# creating a Pandas dataframe from a JMP DataTable directly
dt = jmp.open(jmp.SAMPLE_DATA + "Big Class.jmp")

# create pandas DataFrame from Big Class
df = pd.DataFrame()
for idx in range( len(dt) ):
    df[ dt[idx].name ] = np.array( dt[idx] )

 

 

 

Here's a syntax reference for saving as JMP tables:

    import jmp    dt = jmp.DataTable("JMP", df.shape[0])  
    for col in df.columns:
        col_type = jmp.DataType.Numeric  
        dt.new_column(col, col_type)
        dt[col] = list(df[col])

 

5 REPLIES 5
jthi
Super User


Re: How can get an AI to be more familiar with the JSL scripting language in JMP?

You can give it some assistance by trying to prompt and make sure it understands you want JSL but most likely it doesn't have that much material regarding JMP/JSL that it will make mistakes.

-Jarmo


Re: How can get an AI to be more familiar with the JSL scripting language in JMP?

Hi @lala ,

 

Have you tried the JMP learn bot available on the Marketplace? It has been trained specifically on JMP material including the JSL Scripting Index and JSL documentation, that will likely give you a better output.

 

In general, I think most AI (currently) struggle with JSL against Python simply because there is a whole lot more Python material out there to train AI models on - from my time using ChatGPT I have noticed some groups making JMP based GPT's to work with.

 

Thanks,

Ben

“All models are wrong, but some are useful”


Re: How can get an AI to be more familiar with the JSL scripting language in JMP?

This may be sideways from what you want, but one approach to have generated code would be to use the Workflow Builder to record yourself doing the tasks that you want AI to generate the code for. Workflow Builder generates the JSL, which you can then copy/paste/modify as you need.

lala
Level VIII


Re: How can get an AI to be more familiar with the JSL scripting language in JMP?

Thanks!

I primarily have the AI interact with JMP tables directly within Python code.


Re: How can get an AI to be more familiar with the JSL scripting language in JMP?

Hi @lala ,

 

I can't share a particular secret recipe (like the other contributors here; there is just not enough training material around JMP - particularly the new functionality around Python).

Where I found it still successful is using it as a scripting partner (ChatGPT tends to be superior to Claude). This requires the knowledge of JSL (which can be backed using the Scripting index in JMP), but you can tell the AI (let's just call it that) when it's making up fantasy code and tell it how JSL works.

With this you can build a conversation where the AI has the knowledge it needs and you can use it to do the coding for you. I particularly like that AI doesn't mind to come up with 2-3 code suggestions ;-). This also helps to navigate the AI towards coding style you prefer.

 

Hope this helps!

 

Best

Florian