实测对比:Claude3在小项目编程中如何超越GPT-4

今天正好有个朋友找我帮忙,写个小程序,实现如下需求,

将一批图片文件按照excel中的格式进行文件名修改,原文件名要从excel中的F列获取,修改的文件名要从excel中的H列获取,大概就这么个需求,

我先将需求发给gp4,请看截图

gpt4解释得倒是很详细,可惜代码运行后不能没有达到需求。

这时,我想起了claude3,同样的需求我发给了claude3,(Opus模型,这个模型是最强大的).

不过它的代码,只改了我的第2行, 其他行没改,我继续问它

然后我运行它给的代码,这次运行正常了。下面是完整代码

cs 复制代码
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Windows.Forms;
using Excel = Microsoft.Office.Interop.Excel;

namespace foryutao
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            string excelFilePath = @"C:\temp\123.xlsx";
            string folderPath = @"C:\temp\123\";

            Excel.Application excelApp = new Excel.Application();
            Excel.Workbook workbook = excelApp.Workbooks.Open(excelFilePath);
            Excel.Worksheet worksheet = workbook.Sheets[1];

            try
            {
                int lastRow = worksheet.Cells.SpecialCells(Excel.XlCellType.xlCellTypeLastCell).Row;

                for (int i = 2; i <= lastRow; i++)
                {
                    string oldFileName = worksheet.Cells[i, 6].Value?.ToString();
                    string newFileName = worksheet.Cells[i, 8].Value?.ToString();

                    if (!string.IsNullOrEmpty(oldFileName) && !string.IsNullOrEmpty(newFileName))
                    {
                        string oldFilePath = Path.Combine(folderPath, oldFileName + ".jpg");
                        string newFilePath = Path.Combine(folderPath, newFileName + ".jpg");

                        if (File.Exists(oldFilePath))
                        {
                            File.Move(oldFilePath, newFilePath);
                        }
                    }
                }

                MessageBox.Show("文件重命名完成!");
            }
            catch (Exception ex)
            {
                MessageBox.Show("发生错误:" + ex.Message);
            }
            finally
            {
                workbook.Close();
                excelApp.Quit();
            }
        
        }
    }
}

程序运行界面如下:

点这个按钮就可以实现这个功能。

结论:如果只是写个小项目或者小程序的功能,目前看下来确实是claude3比gpt4更强大,其他方面还没做比较,另外目前claude3太难注册了,分享一个网站给朋友们试用一下:

https://chat.lmsys.org/

一定要选opus模型,claude3有三个模型,只有opus是最强大的。

相关推荐
孤狼GPT1 小时前
Codex免费版够用吗?Free、Plus和Pro怎么选
chatgpt·ai编程·codex·chatgpt plus·chatgpt pro
顿哥GPT3 小时前
7月15更新ChatGPT Pro、Plus 与 Codex:多 Agent 软件工程中的一致性问题 (GPT5.6来了)
人工智能·chatgpt·软件工程
z落落3 小时前
C# WinForm 自定义控件
开发语言·c#
袋鼠云数栈UED团队3 小时前
Agent Loop:让 Agent 真正跑起来的核心机制
ai编程
yingyuecom3 小时前
映悦AI复刻爆款更新深度评测:资产锁定如何治好AI短剧的‘变脸症’
人工智能·gpt·chatgpt·prompt·aigc
宅小年4 小时前
AI 记忆是怎么实现的?下篇:向量检索、知识图谱和长期记忆系统
aigc·openai·ai编程
xianrenli384 小时前
DS5900作业之“氛围(Vibe)”背后的伦理
学习·ai编程·msai
Python大数据分析@4 小时前
如何评价 OpenAI 正式推出的 GPT-5.6 系列模型?
gpt·chatgpt
hqk4 小时前
我给 AI 造了一个原型工具:AIWireframeViewer V1
前端·ai编程·vibecoding
lzhdim5 小时前
20260714 - 个人小作品更新
c#·notenet