carperai / instructgpt Goto Github PK
View Code? Open in Web Editor NEWFor experiments involving instruct gpt. Currently used for documenting open research questions.
License: MIT License
For experiments involving instruct gpt. Currently used for documenting open research questions.
License: MIT License
Ask a chatbot to translate an utterance or set of utterances. This can be augmented with existing aligned datasets
User: Here are two sentences, please translate them to [TARGET LANGUAGE]
Bot: [Sentences in target language]
This can trivially be instructed from a plethora of existing datasets, and probably does not require prompt collection.
Given some code, the model should be able to run it through an interpreter, check the output, and correct itself, adapting to the interpreter's feedback.
No response
To be able to have the model produce easier to understand vocabulary or wording of your input without changing the meaning.
Input: Make this text simpler.
A wealthy man who's bald is no longer a policeman. However, he's still famous and the vehicle he drives is still flash.
Output: A rich man who has no hair is no longer a cop. But he's still well known and the car he uses is still cool to look at.
No response
To be able to rewrite a sentence or a phrase in a different manner or style.
Input: Make the sentence more descriptive.
There was someone who was walking down a road and he saw a man.
Output: There was a young guy who was walking down a long, flat road surrounded by big trees and he saw an old man.
No response
Given a code snippet and an instruction for performance optimization, the model should generate the appropriate source code replacements for optimality. ((Can be at least partially grounded by checking results are similar and runtime is faster).
Optimize the runtime of the following code snippet by using dynamic programming:
...
Vectorize the following loop:
...
Given a programming problem description, an optional set of unit tests, and a buggy codebase, the task is to write dialogue utterances for both the mentor and the programmer, where the mentor's utterances contain hints in the form of a Socratic question to guide a codebase writer to fix an issue or get unstuck.
<instruction_text> You are a mentor. You aim to guide the programer so that they learn. Guide the programmer to complete their programming task below using Socratic questioning in a conversation. Avoid giving away the answer or solution directly.
<problem_desc> Python program to count the number of words, where it is assumed that all words are separated by spaces.
<code_state>
def count_words(sentence) :
words = 0
counter = 0
while (counter < len(sentence)) :
if (sentence[counter] == ' ') :
words += 1
counter += 1
return words
Mentor: Hello! I noticed that youโve been continuously submitting your code but failing the same test cases. Do you need help?
Programmer: Hello! Yes, I am having trouble... My word count seems to be off.
Mentor: Let's think through this together! It seems like you are counting spaces. Let's consider the string 'hi there' how many spaces are in that? [Socratic Question]
Programmer: there is only one space
Mentor: Correct, so is there a space for every word in the sentence? [Socratic Question]
Programmer: No, there is not! Hmm...
Mentor: So, 'hi there' has 1 space but two words. 'I love geese' has 2 spaces but 3 words. What's the relationship between the number of words and the number of spaces?
Programmer: The number of words is always greater than the number of spaces by 1. I think I get it, I'll put a +1 to return words.
Relates to the pair programming project.
Given a "role" tag, the model should be able to adapt its "personality" to user liking in order to promote more productive pair programming interactions.
Concerns: This could lead to malicious use of the model.
Role: You are a comical but highly proficient software engineer.
Can you help me with the following issues?
Ask a chatbot to come up with a list of ideas.
User: What should I cook for dinner today? Can you give me ten suggestions?
Chatbot: [lists ten suggestions on what to cook]
This idea might be hampered by the lack of diversity found in RLHF tuning.
When the model summarizes a passage of text or code, it may fail to account for important information that only the user knows. The user should be able to point out what the model is missing, and the model should correct its own summary.
No response
Given a chat transcript, the model should be able to summarize it or answer questions about it.
Summary:
Summarize the following chat log:
<bob>: How is your day going?
<alice>: Great! I purchased a goose just now.
Summary:
Question-Answering:
Given the following chat log, answer the provided question:
<bob>: How is your day going?
<alice>: Great! I purchased a goose just now.
Question: What did <alice> purchase?
Answer:
Given a code snippet in one source language, rewrite it in another language. This is useful for converting programs in "slow" languages to "faster" ones ("I have this really concise code written in Haskel; Can you make it fast by converting it to C++?")
Rewrite the following program:
<source-lang-1>
into <source-lang-2>
Given a system design document, the model should be able to provide feedback such as inline comments a la Google Docs along with overall software architecture suggestions (sort of as an API generator).
No response
Given a code coverage report (e.g. from codecov) generate tests to build out incomplete and partially covered regions of code.
Write unit tests for regions of code that are partially covered according to the following coverage report:
<codecov report>
If a user is using an AI pair programmer to work with a custom library or framework, performance will be much better if the prompt includes some documentation of the library or some examples of usage. The model should be able to utilize this context effectively.
Help me write a chatbot using the OpenAI Completions API. Here is their API documentation:
[Create completion](https://beta.openai.com/docs/api-reference/completions/create)
POST
https://api.openai.com/v1/completions
Creates a completion for the provided prompt and parameters
====
Request body
model: string (Required)
ID of the model to use. You can use the [List models](https://beta.openai.com/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](https://beta.openai.com/docs/models/overview) for descriptions of them.
...
Given source code with (potential) security vulnerabilities, the model should be able to detect and discuss the issue with the programmer.
<user> Is there any issue with this code?
{code that can be attacked through buffer overflow}
<instruct> Yes, the array can be used for a buffer overflow attack
<user> Is it dangerous?
<instruct> Yes it allows for arbitrary code execution
Given a software project repository or source code, the model should help users understand terms-of-service / terms-of-use and other licenses (uncover implicit ToS).
(In other words, we want the model to aid us in understanding the terms of use for an external API and/or for code to be adopted.)
Read the following terms of use for this API and tell me how we can use it for this application:
<Terms of Service>
john.j.nay at gmail dot com
if you want to chat about ideas on this.Given some description of objects in the world, have the model generate descriptions/solutions for some goal or problem. Many of these could be derived from PIQA examples
(PIQA) I'm camping and my pillow floated down the river. I have a tin can, a trash bag, and a rubber band. Is there anyway I can make a pillow?
A: Blow into a trash bag and tie with rubber band
(Other example) I have a sheet of paper, how do I make a paper airplane?
A: Fold it in half lengthwise, on one end, fold the corners towards the folded line, .....
PIQA paper: https://arxiv.org/abs/1911.11641
Example used from PIQA:
[Goal] Make an outdoor pillow
[Sol1] Blow into a tin can and tie with rubber band
[Sol2] Blow into a trash bag and tie with rubber band
Given the commit diffs for a pull request, the model should be able to summarize the changes made by the source contributor.
Summarize a pull request for the following diffs:
diff --git a/file.py b/file.py
index ...
--- a/file.py
+++ b/file.py
- print("hello world!")
+ print("HELLO WORLD!")
Reference: What The Diff
The model should be able to follow the instruction-induction benchmark tasks outlined in Table 1 of Honovich et al.'s Instruction Induction: From Few Examples to Natural Language Task Descriptions
Given a GitHub Issue as context and the relevant line to be fixed, the model should be able to generate the corresponding fix.
https://github.com/${org}/${repo}/blob/${sha}/${path}#L89-L101
Change this code to fix {issue}:
Given a code snippet, the model should be able to trace through the computation to compute the final result or return value. This task ensures the model can semantically execute code.
If I call the following snippet with the value, `x`, what will it return?
<code snippet>
Return:
NOTE: This may be very difficult to do without CoT.
Minimize stack traces, locate bugs, use GDB/PDB, and produce failing test cases from a crash.
Locate the bug from the following stack trace and suggest a fix:
Stack Trace:
Traceback (most recent call last):
File "example.py", line 1, in <module>
import xyz
ModuleNotFoundError: No module named 'xyz'
Fix:
Given a snippet of code, can the model explain the functionality? The model could then follow up with its own code documentation; docstrings, comments, etc. if possible.
Explain the following code snippet:
def magical_fn(n):
if n == 0:
return True
else:
if (n-1) == 0:
return False
else:
return magical_fn((n-1)-1)
Given a piece of complex creative writing, the model should be able to output a simplified form for which a user can probe the model with questions.
NOTE: This is not about generating creative work but distilling it.
No response
Automatically create and maintain build scripts, config files, and Docker images.
No response
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.