CarperAI / CarperAI/InstructGPT

[task] Programming Socratic Questions

Open
#26 0 comments 0 reactions 0 assignees View on GitHub
task
Dominant language
No language data
Stars
71
Forks
4
PR merge metrics
No merged PRs in 30d

Description

### 🚀 The Task

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.

### Example

**** 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.
**** Python program to count the number of words, where it is assumed that all words are separated by spaces.
****
```py
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.

### Additional Notes

Relates to the pair programming project.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.