A043 GPT can only improve efficiency, not replace learning

Since the release of ChatGPT at the end of 2022, this type of artificial intelligence has entered an unprecedented peak period, breaking through boundaries on a large scale. Ordinary people have also started paying to use it. However, amid the overwhelming publicity, people may have overestimated the capabilities of such tools, thinking that as beginners, spending some money would allow them to use this almost万能 (all-purpose) knowledge base at any time and train it to become a gentle, nurturing teacher.

The First Step in Learning: Reading and Understanding

Using GPT this way is indeed fine. GPT was trained by absorbing a large amount of knowledge, and with technologies such as RAG (Retrieval-Augmented Generation) and finetuning, it can be tailored in some specialized fields, or general tools connected to the internet can be used, fully meeting ordinary learning needs. For example, if we want to learn some simple concepts in statistics, such as precision, sensitivity, specificity—the answers to these questions are everywhere on the internet. Whether you ask GPT or use a search engine, the results are similar. But for parts GPT doesn’t understand, you can ask it to explain more, whereas articles found through search engines are basically static. Moreover, most people’s search skills do not support root-cause style inquiry searches. So, from this perspective, using GPT for learning is a good method.

The Second Step in Learning: Application and Feedback Adjustment

So why do I say “GPT can only improve efficiency, not replace learning”? You will find that the example I used above is essentially just part of learning: finding study materials and trying to understand them. This part can be achieved by reading books, attending classes, or using search engines. But learning also has a very important part: applying knowledge based on understanding, evaluating learning effectiveness according to results, and conducting reviews and extended learning.

If you already have a basic framework in a certain field, GPT can embellish it for you. For example, programming: you are already using Python daily. To learn a new package, you used to have to consult official documentation, others’ usage experiences, then write or copy-paste code, debug and fix. Now you can let GPT directly generate runnable code, then debug and fix it, refer to more materials based on results, finally achieving functionality. Whether you use GPT or not, you can complete this process because you already have the framework; GPT just improves your coding efficiency.

If you are a newcomer who hasn’t finished a Python course and only knows print('hello world'), having no knowledge framework of your own yet, you can still achieve simple functionality with Python. For example, you want to download a certain YouTube video; the code GPT generates is relatively simple[1], beginners can understand it, and it basically has no bugs and works properly.

import os  

# Replace the playlist URL with your own  
playlist_url = "https://www.youtube.com/playlist?list=PLWFKEqUUprKg2le6kvngoNGF3TlWzXlyh"  

# Download the playlist  
os.system(f"yt-dlp -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best' --yes-playlist --playlist-start 1 --output '%(playlist_index)s-%(title)s.%(ext)s' {playlist_url}")  

But if you want to implement a complex function, relying purely on GPT is almost impossible. For example: after downloading a YouTube video, download its subtitles, embed the subtitles into the video, and be able to read a batch of URLs to download in bulk. Looks easy, right? But the code suddenly becomes this complex (the longer the code, the difficulty of understanding increases exponentially, not linearly)[2], beginners basically cannot understand it, it’s easy to have bugs, and beginners have no debugging ability, unable to complete the last step of “evaluating and correcting learning based on application results.”

import re  
import yt_dlp  
import os  
import subprocess  
import sys  
from typing import List  
from youtube_transcript_api import YouTubeTranscriptApi  

# Download video  
def download_video(video_url, outtmpl, quality_options, download=True):  
    ydl_opts = {  
        'outtmpl': outtmpl,  
        'format': 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best',  
        'writesubtitles': False,  # Do not download subtitles  
        'verbose': True,  
        'nocheckcertificate': True,  
        'nocachdir': True,  
        'compat_opts': set(),  
        'http_headers': {  
            'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.24 Safari/537.36',  
            'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',  
            'Accept-Language': 'en-us,en;q=0.5',  
            'Sec-Fetch-Mode': 'navigate'  
        }  
    }  

    with yt_dlp.YoutubeDL(ydl_opts) as ydl:  
        try:  
            info_dict = ydl.extract_info(video_url, download=download)  
            if download:  
                available_formats = [f['format_id'] for f in info_dict['formats'] if f['ext'] == 'mp4']  
                for quality in quality_options:  
                    if quality in available_formats:  
                        ydl_opts['format'] = quality  
                        break  

                ydl.download([video_url])  
            return info_dict  
        except Exception as e:  
            print(f"Error: {e}")  
            print(f"Failed to download video: {video_url}")  
            return None  

def format_time(seconds: float) -> str:  
    milliseconds = int((seconds % 1) * 100)  
    minutes, seconds = divmod(int(seconds), 60)  
    hours, minutes = divmod(minutes, 60)  
    return f"{hours:d}:{minutes:02d}:{seconds:02d}.{milliseconds:02d}"  

def captions_to_srt(captions: List[dict]) -> List[str]:  
    srt_lines = []  
    for index, caption in enumerate(captions, start=1):  
        start_time = format_time(caption["start"])  
        end_time = format_time(caption["start"] + caption["duration"])  
        text = caption["text"].replace("\n", " ")  

        srt_lines.append(str(index))  
        srt_lines.append(f"{start_time} --> {end_time}")  
        srt_lines.append(text)  
        srt_lines.append("")  

    return srt_lines  

def srt_to_ass(srt_file: str, ass_file: str):  
    with open(srt_file, "r", encoding="utf-8") as f:  
        srt_content = f.read()  

    ass_lines = [  
        "[Script Info]",  
        "ScriptType: v4.00+",  
        "Collisions: Normal",  
        "PlayResX: 384",  
        "PlayResY: 288",  
        "Timer: 100.0000",  
        "",  
        "[V4+ Styles]",  
        "Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding",  
        "Style: Default,Arial,20,&H00FFFFFF,&H000000FF,&H00000000,&H00000000,0,0,0,0,100,100,0,0,1,3,0,2,10,10,50,1",  
        "",  
        "[Events]",  
        "Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text"  
    ]  

    for srt_block in srt_content.strip().split("\n\n"):  
        lines = srt_block.strip().split("\n")  
        start_time, end_time = lines[1].split(" --> ")  
        start_time = start_time.replace(",", ".")  
        end_time = end_time.replace(",", ".")  
        text = "\\N".join(lines[2:]).replace("\n", "\\N")  

        ass_lines.append(f"Dialogue: 0,{start_time},{end_time},Default,,0,0,0,,{text}")  

    with open(ass_file, "w", encoding="utf-8") as f:  
        f.write("\n".join(ass_lines))  

def download_captions(video_id: str, output_file: str):  
    try:  
        captions = YouTubeTranscriptApi.list_transcripts(video_id)  
        chinese_captions = None  
        for transcript in captions:  
            if transcript.language_code.startswith("zh"):  
                chinese_captions_obj = transcript.fetch()  
                chinese_captions = chinese_captions_obj  
                break  
        if chinese_captions:  
            srt_lines = captions_to_srt(chinese_captions)  
            with open(output_file, "w", encoding="utf-8") as f:  
                f.write("\n".join(srt_lines))  
            return True  
        else:  
            print("No Chinese captions available for this video.")  
            return False  
    except Exception as e:  
        print(f"Error: {e}")  
        print(f"Failed to download captions for video: {video_id}")  
        return False  

def embed_subtitles(video_file, subtitle_file, output_file):  
    cmd = [  
        'ffmpeg',  
        '-i', video_file,  
        '-i', subtitle_file,  
        '-c', 'copy',  
        '-c:s', 'ass',  
        output_file  
    ]  

    try:  
        subprocess.run(cmd, check=True)  
        print(f"Subtitles embedded successfully. Output file: {output_file}")  
    except subprocess.CalledProcessError as e:  
        print(f"Error embedding subtitles: {e}")  
        print(f"Failed to embed subtitles for video: {video_file}")  

def replace_special_chars(filename):  
    return re.sub(r'[\\/*?:"<>|,_|]', '_', filename)  

def main(video_urls, max_results=None, download_videos=True):  
    quality_options = ['4320', '2160', '1440', '1080']  # Video quality options in priority order  

    for video_url in video_urls:  
        # Step 0: Get video info  
        info_dict = download_video(video_url, None, quality_options, download=False)  
        if info_dict is None:  
            continue  

        # Define output template  
        safe_title = replace_special_chars(info_dict['title'])  
        outtmpl = f'E:/Downloaded_Videos/{safe_title}/{safe_title}.%(ext)s'  

        # Step 1: Download video (if enabled)  
        info_dict = download_video(video_url, outtmpl, quality_options, download=download_videos)  
        if info_dict is None:  
            continue  

        # Step 2: Download subtitles  
        video_id = info_dict['id']  
        title = info_dict['title']  

        safe_title = replace_special_chars(title)  
        outtmpl_subs = f'E:/Downloaded_Videos/{safe_title}/{safe_title}.%(ext)s'  

        video_file = os.path.join("E:/Downloaded_Videos", safe_title, f"{safe_title}.mp4")  
        srt_file = os.path.join("E:/Downloaded_Videos", safe_title, f"{safe_title}.srt")  
        ass_file = os.path.join("E:/Downloaded_Videos", safe_title, f"{safe_title}.ass")  

        # Ensure directory exists  
        os.makedirs(os.path.dirname(video_file), exist_ok=True)  

        if download_captions(video_id, srt_file):  
            srt_to_ass(srt_file, ass_file)  
            if download_videos:  
                output_file = video_file.replace('.mp4', '.mkv')  
                # Step 3: Embed subtitles  
                embed_subtitles(video_file, ass_file, output_file)  
                print(f"Subtitles downloaded and embedded for video: {video_url}")  
            else:  
                print(f"Video info retrieved and subtitles downloaded for: {video_url}")  
        else:  
            if download_videos:  
                print(f"Video downloaded, but no subtitles available for: {video_url}")  
            else:  
                print(f"Video info retrieved, but no subtitles available for: {video_url}")  

if __name__ == "__main__":  
    with open("video_urls.txt", "r") as f:  
        video_urls = [line.strip() for line in f.readlines()]  
    main(video_urls, max_results=10, download_videos=True)  

This is why I say GPT can only improve efficiency, not replace learning. For capable people, GPT can improve efficiency and amplify their ability. If their previous ability was 80, amplified it becomes three 80’s (conservatively, tripled), so one person can do the work of three. But for people without ability, they cannot work independently relying on GPT: if their previous ability was 0, amplified it is still three 0’s.

Summary

There is no doubt that GPT-like tools are breakthrough products. Personally, I think their significance is no less than the birth of computers. But no matter how evolved the tools are, the initial fundamental knowledge learning still requires the individual to complete. This learning process, whether attending classes, reading books, or asking GPT, cannot be skipped.

It is like people using hoes to till soil: even if electronic hoes are invented, people who don’t know how to hold hoes won’t improve efficiency because of that. Of course, if a plow machine were invented, people would no longer need to learn how to use hoes. But unfortunately, whether GPT or other recently popular AIs, such as image generation, are just like "electronic hoes."Finally, the perspective of this article was directly inspired by the video “Can GPT-4 Save Your Spoken English?”, you can check out his interpretation

Is this thing really an equalizer? What is an equalizer? I can’t beat Tyson, and even ten of me plus a dollar more still can’t beat Tyson. Tyson can KO me with one punch. But if Tyson and I each have a handgun, our combat power comparison immediately changes. Theoretically, it’s a 50/50 fight between me and Tyson. Or rather, when both have guns, who can KO the other depends on whose shooting skills are better. Whoever’s shooting is better wins. Although Tyson’s physical fitness is 100 times better than mine, it’s useless. As long as my shooting is accurate, that’s enough. In this scenario, the handgun is an equalizer—it instantly makes a battle that was originally very unfair become fair. Or rather, after the equalizer appears, the rules of combat change. The one who can better use the equalizer wins. It’s that simple. This is the power of technology. If you ask me whether GPT-4 nowadays counts as an equalizer in English learning, I would say it doesn’t. Its biggest role in foreign language learning is being especially useful to certain groups, but it’s pretty useless to most people. Let me give a simple example: say you now have this thing in your hand—GPT-4. It’s very powerful and can help people practice spoken English. Then you practice. How do you practice? What can you actually say? Do you see the problem? You can’t say anything. Once again, even putting you in the United States wouldn’t help. So do you think GPT-4 nowadays can save your spoken English? Does that make sense? The real situation is that there is also a threshold to using GPT-4 for practicing spoken English. This is like using GPT-4 for coding—there is also a threshold. Some people can code like a pro, but most can’t. Spoken English is the same. If your foundation doesn’t reach a certain level, having GPT-4 in your hands does you no good.

GPT-4 is definitely a very, very excellent tool for learning English, but it has a usage threshold. To some extent, it’s not only not an equalizer, it can even cause polarization. For students strong in written skills, this tool can help you quickly develop good spoken output ability. But for those with very weak grammar skills, forget about GPT-4—even GPT-10 won’t help. So this tool is extremely powerful for some people, but for most people, at best, it’s just a very good translation software.

References


  1. This code comes from 解剖课推荐——艾氏解剖学(附下载链接) ↩︎

  2. This code comes from 下载youtube视频后自动插入字幕 - Python - iSharkFly ↩︎