CommentSuggest

Suggest a comment to describe a given block of code

Chat Example

Programmatic Access

Retrieve the prompt:
LLMPrompt["CommentSuggest"]

LLMResourceFunction["CommentSuggest"][code]

provide code to generate a relevant comment

Examples

Prompt Source

Publisher Information

Author Notes

If you're using this prompt outside of the chat environment, you will need to convert the code manually into a string before being fed into the LLM. If the code contains no double quotes you can simply wrap the function in double quotes. If it does have double quotes, you will have to escape the quotes in the string using backslash (\").