Generate code versions
Once you have extracted your code snippets and decided which of the snippets you want to optimise, you can use the Artemis Versions
functionality to generate alternative snippets.
In order to generate code versions, first ensure that you are on the Snippets
section of your selected code project. See image below:
Across the Code Snippets
page, the "plus" icon indicates the option to create an alternative code version.
To generate a code version for a given snippets, click the plus icon available under Versions
for that particular snippet.
If you would prefer to generate code versions for all of the extracted code snippets, click the plus sign next to the Versions
column title on top.
See image below:
Once you click the plus icon for versions, it will open a Generate Versions
panel to select the LLM and provide additional details. In order to start the code versions generation, you need to select an LLM. We use a set of pre-defined prompts to generate the code versions using LLMs, but you are also able to set your own prompt, or provide additional context for your query. See image below:
Use the checkboxes to select one or more LLMs to generate the code versions.
Click on the Prompt
button (circled in red in the image above) to edit the prompt. Clicking on the Prompt
button will open the following form:
Click the down arrow on top (labeled 1️⃣ in the diagram above) to select from a list of other pre-defined prompts.
Click the "notepad" icon (labeled 2️⃣ in the diagram above) to edit a prompt that has already been defined.
Click the "plus" icon (labeled 3️⃣ in the diagram above) to define a completely new prompt.
Once you make your edits using 1, 2, or 3 above, click Create
to add your prompt.
Click Run
on the Generate Versions
panel to start generating alternative code snippets.
Once the code generation process has completed, the alternative snippets, generated by the different LLMs you selected, will appear under the Versions
section.
Sometimes the LLMs you selected will not be able to provide alternative code snippets. The grey alert icon will provide more information on this. See image below:
Click on any of the entries under Versions
to see details of the code version.
Additional information include a comparison of the original code with the new code version and Artemis chat functionality to ask questions about the version. See image below for an example:
Once you have your code versions generated, you can use the Artemis Version Scores
and Validations
to check the credibility of the code version.
More on that in the next section, Evaluate code versions