Group Abstract Group Abstract

Message Boards Message Boards

0
|
88 Views
|
0 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Prompt repository prompt preamble to avoid of common coding assistant syntax errors in Mathematica

Posted 3 days ago

When using coding assistants in general for Mathematica, not simply within Mathematica's direct interface to LLMs via RolePrompt, I find myself doing a lot of work that should be the subject of this community (regarding the Wolfram language per se). But searches of this community and queries of web-search enabled LLMs regarding where I might find this prior art emergent from this community has come up dry.

This is particularly relevant to the experience of using coding assistants for Mathematica because:

1) as is the case with any API that has a relatively small sample in the training corpora, coding assistants get confused about things like versions of API

2) syntax that is commonly used in other programming languages that are syntax errors in Mathematica (e.g. using underscores inside symbol names)

3) and most deadly of all of these: The more back-and-forth to correct trivial errors in the resulting Mathematica scripts, the longer the context being submitted to the coding assistants which:

3.1) Uses up computational resources hence results in throttling of interactions with the coding assistants

3.2) Places a cognitive burden on the coding assistant that makes it lose perspective due to too much information to cohere into a new response.

NB: I'm not looking for responses to this particular post that are prompt preambles. I get lots of those thrown at me by LLMs I ask about this. I'm asking instead about a pointer to the prior work this community most assuredly has done since the advent of LLMs and Mathematica's participation in this revolution. This pointer might take the form of a keyword or keyphrase I can use to search for to find what people have done that doesn't throw endless noise at me, even if there isn't a specific project dedicated to such a prompt.

Thanks!

PS: There are secondary things that are also helpful in such interactions such as:

Include at the top of each script the following:

 Clear["Global`*"];Remove["Global`*"];

PPS: enter image description here

POSTED BY: James Bowery
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard