ChatGPT - A Programming Tutor
Sal Khan (from The Khan Academy) gave a TED talk on how AI solutions (based on LLM) could improve education.
He described the integration of AI into the Khan Academy platform (Khanmigo) to act as a guide to students. It sounded very ambitious and I wondered to what extent it could be helpful.
After working with ChatGPT over the past few weeks, I agree. Previously, I used ChatGPT to help with little programming tasks and it was able to provide relevant responses (with some prodding). However, I can see its capabilities to provide guidance and coaching too.
This is in addition to its remarkable speed (watching the responses appear is always mesmerizing) and accuracy of most answers.
Here are some examples that I encountered in my interactions.
1. Providing guidance to improve code
Note: Make sure to use error handling and logging in your code for a robust solution. Also, this is a basic structure, you may need to adjust according to your specific requirements.
2. Providing suggestions based on intent of a program
Also, remember to multiply the allocation percentages by 100 if you want to express them as a percentage rather than as a decimal fraction.
3. Helping to troubleshoot an error
Given the snippet you've shared, I suspect there might be some name collision with the variable name funds. From the context, it seems you have a list of funds. However, you also have a dictionary named funds that you are trying to populate. These two uses of funds are conflicting.
4. (Gently) pointing out a blunder
No, there's a small mistake in the string format specification. The correct way to format the number as a floating-point number with two decimal places followed by a percentage sign is:
领英推荐
5. Teaching something new
Given the increased complexity, it would be advisable to use an optimization technique. One of the commonly used methods for this kind of problem is linear programming. A simple approach is as follows:
6. Breaking down a problem
Great! Let's progress step by step.
7. Appreciating progress
That's fantastic! You've successfully converted your data into a dictionary format where each fund is a key.
Yes, you're absolutely correct.
8. Acknowledging mistakes
I apologize for the confusion, you're absolutely right.
9. Confirming understanding
From your description, I can see you have a correct understanding of what we're trying to achieve.
10. Ability to change course
Yes, you've brought up a crucial point. Let's try a heuristic approach.
I'm not sure if any of these features were introduced as part of GPT-4 enhancements. But, it is exciting to see these new developments and how these tools are going to evolve. A new age indeed.