# Using AI (chatGPT) or other

**URL:** <https://forum.inductiveautomation.com/t/using-ai-chatgpt-or-other/102280>\
**Category:** Ignition\
**Created:** [February 12, 2025, 10:01pm UTC](https://forum.inductiveautomation.com/t/using-ai-chatgpt-or-other/102280 "2025-02-12T22:01:53Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![rfolkes](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@rfolkes](https://forum.inductiveautomation.com/u/rfolkes)\
**Post date:** [February 12, 2025, 10:01pm UTC](https://forum.inductiveautomation.com/t/using-ai-chatgpt-or-other/102280/1 "2025-02-12T22:01:53Z")

</div>

Anyone using AI to refine or create scripts for ignition?

I have been playing with it and while I am not sure if it would work well for making scripts in first place, putting a script I have already working into the AI and asking it to improve format, readability, comments seems to do alright.

if you are using AI for scripting with ignition do you have a method so it doesn't try to change syntax or style into Python 3.5+. What I have done so far is to state. Assume any provided syntax is correct and do not edit syntax.

Would be nice (or let me know where I can find if it already exists) if the AI was trained on ignition scripting in particular with all the ignition built in functions.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [February 12, 2025, 10:11pm UTC](https://forum.inductiveautomation.com/t/using-ai-chatgpt-or-other/102280/2 "2025-02-12T22:11:45Z")

</div>

> [@rfolkes](#):
>
> if you are using AI for scripting with ignition do you have a method so it doesn't try to change syntax or style into Python 3.5+. What I have done so far is to state. Assume any provided syntax is correct and do not edit syntax.

You can explain in your prompt that you are using Python 2.7, or even tell it you're using Jython, which is Python 2.7 but with access to JDK 17 libraries, and that you want it to ensure any code it suggests uses Python 2.7 syntax.

---

<div class="post-metadata">

**Author:** ![Ryan\_Deardorff](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan_deardorff/32/63815_2.png) [@Ryan\_Deardorff](https://forum.inductiveautomation.com/u/Ryan_Deardorff)\
**Post date:** [February 12, 2025, 10:12pm UTC](https://forum.inductiveautomation.com/t/using-ai-chatgpt-or-other/102280/3 "2025-02-12T22:12:13Z")

</div>

I don't know about Python in general, but I wouldn't trust AI to understand Ignition just yet...

> [@Expression equivalent of Python .join()?](https://forum.inductiveautomation.com/t/expression-equivalent-of-python-join/101291):
>
> Would this qualify as an AI "hallucination?" It says there isn't an equivalent, then gives an example of an exact equivalent...which as far as I can see, doesn't exist. It seems like something simple enough that there should be an expression alternative, but if so, Google is of no help.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [February 12, 2025, 10:13pm UTC](https://forum.inductiveautomation.com/t/using-ai-chatgpt-or-other/102280/4 "2025-02-12T22:13:28Z")

</div>

Yeah too soon for that. They've probably ingested the forums (at some snapshot in time) and maybe even the user manuals, but it's not enough to trust the output.

---

<div class="post-metadata">

**Author:** ![Kevin\_Flener](https://avatars.discourse-cdn.com/v4/letter/k/74df32/32.png) [@Kevin\_Flener](https://forum.inductiveautomation.com/u/Kevin_Flener)\
**Post date:** [February 12, 2025, 10:19pm UTC](https://forum.inductiveautomation.com/t/using-ai-chatgpt-or-other/102280/5 "2025-02-12T22:19:56Z")

</div>

I've used it sparingly to bounce ideas off for both Ignition and Grafana (and VBA before that), but I don't take its response as gospel. Occasionally it will point you in the right direction, but in all cases where I've used it, the answer is almost never quite right.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [February 12, 2025, 10:22pm UTC](https://forum.inductiveautomation.com/t/using-ai-chatgpt-or-other/102280/6 "2025-02-12T22:22:49Z")

</div>

If AI were to train on this forum there would be as many wrong code questions as there were right code answers. It won't know the difference.

---

<div class="post-metadata">

**Author:** ![bmusson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bmusson/32/87530_2.png) [@bmusson](https://forum.inductiveautomation.com/u/bmusson)\
**Post date:** [February 12, 2025, 10:28pm UTC](https://forum.inductiveautomation.com/t/using-ai-chatgpt-or-other/102280/7 "2025-02-12T22:28:31Z")

</div>

🤮

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [February 12, 2025, 10:29pm UTC](https://forum.inductiveautomation.com/t/using-ai-chatgpt-or-other/102280/8 "2025-02-12T22:29:38Z")

</div>

> [@Transistor](#):
>
> It won't know the difference.

Well, it might notice solution marks..... \* _Cough_ \*

---

<div class="post-metadata">

**Author:** ![rfolkes](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@rfolkes](https://forum.inductiveautomation.com/u/rfolkes)\
**Post date:** [February 12, 2025, 10:31pm UTC](https://forum.inductiveautomation.com/t/using-ai-chatgpt-or-other/102280/9 "2025-02-12T22:31:59Z")

</div>

What I did was put in some scripts that I created through a lot of testing and I was NOT great about maintaining format , naming conventions, commenting etc But it works and does what I need it to do.

Put it into chat gpt and told it... Assume all syntax is correct and not to be edited but edit this script to improve format, standardize naming convention, add functions for any repeated code and improve readability.

took the resultant code and put it back into ignition and nothing broke and ended up with something that was a lot more readable a lot faster then if I had done it myself.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [February 12, 2025, 10:35pm UTC](https://forum.inductiveautomation.com/t/using-ai-chatgpt-or-other/102280/10 "2025-02-12T22:35:39Z")

</div>

That is a fair task for an LLM.

---

<div class="post-metadata">

**Author:** ![rfolkes](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@rfolkes](https://forum.inductiveautomation.com/u/rfolkes)\
**Post date:** [February 21, 2025, 5:33am UTC](https://forum.inductiveautomation.com/t/using-ai-chatgpt-or-other/102280/11 "2025-02-21T05:33:26Z")

</div>

Its funny. Chat GPT at least really really really doesn't want to stop using f-strings. Even if I start with "using Python 2.7" and tell it explicitly don't use f-strings given enough prompt and response even in the same chat it will eventually revert to f-strings. I get a bit snarky and say what in the f-string are you doing? It will reply oops we can't do that let me fix it..

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [February 21, 2025, 10:19am UTC](https://forum.inductiveautomation.com/t/using-ai-chatgpt-or-other/102280/12 "2025-02-21T10:19:24Z")

</div>

thats not how LLM work sadly.

anyways chatgpt should never be trusted, always verify and double check
