Prompt Resource

CodeWriterX

Source Notebook

AI code generation without the chatter

 

Examples

Generate code programmatically:

In[1]:=
LLMSynthesize[{LLMPrompt["CodeWriterX"], "Simulate a random walk"}]
Out[1]=

Generate code programmatically with the "target" language being Python:

In[2]:=
LLMSynthesize[{LLMPrompt["CodeWriterX"]["Python"], "Simulate a random walk"}]
Out[2]=

Neat Examples

In[3]:=
conf = LLMConfiguration[
   "Model" -> <|"Service" -> "OpenAI", "Name" -> "gpt-5.4-mini"|>];
In[4]:=
ResourceFunction["GridTableForm"]@Dataset@Table[<|
    "Language" -> lang,
    "Code" ->
     LLMSynthesize[{
       LLMPrompt["CodeWriterX"][lang],
       "Find all words in a list that adhere to the Raku regex /:i class \d ** 1..3 /"
       }, LLMEvaluator -> conf]
    |>,
   {lang, {"WL", "Python", "R", "Raku"}}]
Out[4]=

Source Metadata

Publisher Information