Fun fact! This page was actually written partially by Codex!
This helped the author (Kaeden Brinkman) develop a functional version of this web app with less than two hours of work.
This is a tool for students to help them learn to code, and to learn a little about Machine Learning.
The model used is the Codex model from OpenAI. The model is trained on a large dataset of code samples from GitHub.
The model is trained to be able to simply be given text and predict the next word. However, through clever organizations of the prompt, a useful output can be obtained.
The prompt for this web app is given below:
Below is a conversation between a teacher and their student. The teacher wants to help the student with their code without telling them what to write.
<conversation>
<studentInput>
<studentCode>
for(int i = 0; i < 10; i++) {
System.out.println(\"Hello World!\" i);
}
</studentCode>
<studentComment>
I'm not sure why it isn't working. I'm trying to get it to print Hello World and then a number.
</studentComment>
</studentInput>
<teacherInput>
<teacherCode>
for(int i = 0; i < 10; i++) {
System.out.println(\"Hello World!\" + i);
}
</teacherCode>
<teacherComment>
When you are trying to add two strings together, you need to use the + operator.
</teacherComment>
</teacherInput>
</conversation>
<conversation>
<studentInput>
<studentCode>
YOUR CODE HERE
</studentCode>
<studentComment>
YOUR COMMENT HERE
</studentComment>
</studentInput>
<teacherInput>
<teacherCode>
As you can see, if the model attempts to continue the text above, it will end up explaining the solution and providing new code.
It takes some time to experiment with what prompts work best to get the best results. Because I gave an example of how I want the "teacher" to interact with the student, the generated text is more likely to behave in a similar way.
I do log your prompt and the resulting completion for quality purposes. This is to help me improve the model and to help you get the best results. I also will block users for excessive usage / spam.
When you click "Submit," your prompt is sent to a third-party server owned by OpenAI. Read their privacy policy here.
Please be aware that this model will generate incorrect feedback and code. Do not use it anywhere where this matters.
Do not use this tool on exams or anywhere else where collaboration or outside resources are not allowed.
If you have any questions or feedback, please do send me an email. You can find my email by closing this window and clicking the feedback button.