Suggest Prompts for the code Analysis, which we can use as Action, intent and Output
- User
Suggest Prompts for the code Analysis, which we can use as Action, intent and Output
Assistant
I’m happy to provide a variety of possible prompts and actions for code analysis. Would you like 10 examples?
- User
Give me 10 Examples
Assistant
Here are the first five:
-
Find all code that modifies the value of x.
-
Identify all assignments to x.
-
Search for all uses of x.
-
Mark all code paths that update x.
-
Identify all functions that depend on x.
-
- User
complete from 5 to 10
Assistant
-
Mark all functions that use x.
-
Identify all functions that modify x.
-
Mark all functions that assign to x.
-
Search for all statements that update x.
-
Find all code that writes to x.
-
- User
complete 9 and 10
Assistant
-
Search for all statements that update x. Also, search for all statements that assign to x.
-
Find all code that writes to x. Also, find all code that modifies x.
-
- User
Generate Prompts for Code Generation of various kind
Assistant
Here are some prompts for code generation:
- Write a Python function that takes a list of integers and returns the sum of all even numbers in the list.
- Generate a SQL query that selects all rows from a table where the value in a specific column is greater than a certain number.
- Create a Java class that represents a bank account with methods for depositing and withdrawing money.
- Write a C++ program that reads in a list of numbers from a file and sorts them in ascending order.
- Generate a bash script that creates a backup of a specific directory and saves it to a different location.
- Write a Ruby script that takes a string as input and returns the number of times each character appears in the string.
- Create a JavaScript function that takes an array of objects and sorts them by a specific property.
- Write a Python program that reads in a CSV file and creates a new file with only the rows that match a certain criteria.
- Generate a SQL query that joins two tables and returns the average value of a specific column in one of the tables.
- Write a Java program that creates a binary search tree and allows the user to insert, delete, and search for nodes.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.