Badge Webflow Award Winner 2023

Claude AI vs ChatGPT: advantages, limitations and feedback

Published on 
23/8/2024
-
Amended on 
23/8/2024
Reading time: 5 min
Claude AI vs ChatGPT
Written by
Lucas Clairet - Webflow & Client-First Developer

Lucas Clairet

Webflow Developer

Complete analysis of Claude AI and ChatGPT: interface, code generation, and our feedback on using these AIs at Digidop.

Key points to remember
  • Claude AI: AI developed by Anthropic, an alternative to ChatGPT, with a focus on code generation.
  • Code accuracy: Claude generates clean, optimized code, often of higher quality than ChatGPT.
  • Focus on the essentials: Claude concentrates on crucial tasks and handles large amounts of code well.
  • Prompt limit in the free version: complete blocking after the limit is reached, unlike ChatGPT, which switches to a lower model.
  • Very positive feedback: Claude is very good for his excellent performance on development tasks.
  • Well, you've probably already heard of ChatGPT, the artificial intelligence that crushes all others. It's become the benchmark for everything from content writing to code generation. But today, we'd like to draw your attention to another AI which, although less well known, is just as deserving of the limelight: Claude AI.

    Developed by AnthropicClaude AI has become a serious alternative to ChatGPT. Why? Because, if we had to sum it up, Claude combines the same features as ChatGPT with much higher quality answers on one subject in particular: code.

    To give you a bit of context, at Digidop, we've tested (and compared) Claude in several development situations, and we've all been convinced by the precision and quality of his answers. Where ChatGPT tends to produce functional but not always highly optimized code, Claude's is often much cleaner and better structured.

    In this article, we'll introduce you to Claude AI and what makes it different from ChatGPT, and show you how you can start using it today. And to top it all off, we'll share our feedback from Digidop.

    Here we go!

    1. What is Claude AI?

    Claude AI is the artificial intelligence ofAnthropic, a startup founded by OpenAI alumni (the same people who designed ChatGPT). Their mission? To create an AI that is not only powerful, but also more responsible. With this in mind - to combine performance and ethics - Anthropic designed Claude AI.

    Claude AI interface

    The idea behind Claude is to push the limits of language models even further, while reducing the risks.

    2. Why choose Claude AI over ChatGPT?

    But beyond that, what makes Claude special, compared to the benchmark that is ChatGPT?

    The two AIs share similar foundations, but where ChatGPT aims to be a "generalist" who can answer on any subject, Claude is more specialized-especially in technical areas such as code. On such topics, Claude often provides better solutions, with fewer errors, and more attention to detail.

    One of Claude's greatest assets is its ability to understand and manipulate complex concepts (like code). Unlike other AIs that can give you basic code snippets or generate answers that seem correct but often require several iteration prompts, Claude AI is more efficient. It doesn't just suggest functional code; it seeks to understand the intent behind your request and give you the most optimized solution. Less trial and error, more productivity.

    A concrete example

    To illustrate this last point, here's one of my latest simple tests:

    Write me a JS code for:
    1) Get the language of the page
    2) Get the text inside the block [data-content-name]
    3) Put these two parameters as the value of the input [data-content-input].

    And here are Claude and ChatGPT's answers:

    ChatGPT's code is a bit messy, while Claude's is better structured.

    Reply from Claude AI

    document.addEventListener('DOMContentLoaded', function() {
        // 1) Récupérer la langue de la page
        const pageLanguage = document.documentElement.lang || 'en';
    
        // 2) Récupérer le texte à l'intérieur du bloc [data-content-name]
        const contentNameElement = document.querySelector('[data-content-name]');
        const contentText = contentNameElement ? contentNameElement.textContent.trim() : '';
    
        // 3) Mettre ces deux paramètres comme valeur de l'input [data-content-input]
        const contentInput = document.querySelector('[data-content-input]');
        if (contentInput) {
            contentInput.value = `${pageLanguage}|${contentText}`;
        }
    });

    Reply from ChatGPT

    // Fonction pour récupérer la langue de la page
    function getPageLanguage() {
        return document.documentElement.getAttribute('lang') || 'unknown';
    }
    
    // Fonction pour récupérer le texte à l'intérieur de l'élément avec data-content-name
    function getContentText() {
        const contentElement = document.querySelector('[data-content-name]');
        return contentElement ? contentElement.textContent.trim() : 'No content found';
    }
    
    // Fonction pour mettre les valeurs dans l'input avec data-content-input
    function setInputValues() {
        const language = getPageLanguage();
        const contentText = getContentText();
        
        // Sélectionner l'input avec data-content-input
        const inputElement = document.querySelector('[data-content-input]');
        
        if (inputElement) {
            inputElement.value = `${language} | ${contentText}`;
        } else {
            console.warn('Input element with data-content-input not found.');
        }
    }
    
    // Appel de la fonction pour mettre à jour l'input avec les valeurs récupérées
    setInputValues();

    A quick analysis of the two codes reveals that Claude's code is indeed more optimized (12 lines versus 23) and better structured.

    Benchmark comparison

    The same trend can be seen in the benchmarks for the various models, with Claude outperforming all ChatGPT models on code and logic tests.

    Claude outperforms ChatGPT-4 and ChatGPT-3.5 in all code and logic tests

    3. How to use Claude AI

    Well, maybe now you're convinced of Claude's benefits and want to integrate it into your workflow. If so, here's how to get started with :

    • Registration: Visit the official Anthropic website to create a Claude AI account.
    • Interface: Once you've logged in, you'll find an interface very similar to ChatGPT's, with a preview of your latest prompts on the left, and information on how to start a new conversation on the rest of the screen. All you have to do is write and send your prompt.

    Tips for optimizing your prompts

    But before you get started, here are a few tips for getting the most out of Claude AI with your prompts:

    1. Be specific and precise: One of the most important aspects of getting good responses from any AI assistant is to formulate clear requests. Don't hesitate to include details, such as the type of project or constraints you have.
    2. Use detailed contexts: the richer and more detailed the context described in your prompts, the more effective Claude's responses will be. Give as much information as possible about what you want, the expected method or frameworks to use, and why.
    3. Use examples to clarify: Providing an example of what you've already done or what you want to achieve can help a lot. By copying and pasting very long pieces of code into your prompts, you can actually add them as additional files so as not to clutter up your prompting windows too much.
    4. Iterate to fine-tune responses: Finally, although you should need less of this with Claude, don't forget that the process is iterative. After receiving a response from Claude, test it and adjust your prompts according to the result to fine-tune solutions and get increasingly precise answers.

    4. Our feedback on Claude chez Digidop

    At Digidop, we've been testing Claude for some time now. Although ChatGPT remains a benchmark, Claude is starting to make a real place for itself in our workflow, particularly for its code performance.

    Finally, here's our feedback, mainly oriented towards development :

    Better quality answers in code

    Well, you've probably already guessed it, but this is the most obvious point to emerge from our tests: Claude's ability to generate clean, concise code.

    Where ChatGPT often requires several iterations to achieve a satisfactory result, Claude often finds the right solution from the very first prompt -a significant time-saver.

    This ability to produce well-optimized code right from the start makes Claude AI an ideal assistant for development tasks. It won't just provide a solution; it will seek to minimize code while maximizing efficiency, which is essential for the best possible projects.

    Focus on the essentials

    Following on from the first point, another of Claude's strengths is its ability to stay focused on the essentials. Unlike ChatGPT, which can sometimes get lost in superfluous explanations or generate excessive code, Claude tends to limit itself to what's necessary.

    This aspect is particularly useful for improving efficiency and keeping conversations focused on the critical aspects of the project-without being overwhelmed by large blocks of superfluous code.

    A slightly less fluid workflow than ChatGPT

    Overall, we found Claude AI's interface rather pleasant to use, but ChatGPT still has a major advantage in this respect: its MacOS application and the fluidity of use it enables in a workflow.

    Another drawback with Claude is the prompt limit on the free plan. Once this limit is reached, access to Claude is simply blocked, which can be frustrating in the middle of a task where ChatGPT simply switches to a less powerful model but allows us to continue working without interruption.

    This fluidity of use, even when restricted, gives ChatGPT an edge over Claude, especially for those who rely heavily on these tools for their daily productivity.

    Conclusion

    In conclusion, Claude AI stands out as a serious and promising alternative to ChatGPT, especially for developers looking for an AI capable of generating clean, efficient code right out of the box.

    Although ChatGPT continues to dominate the market, our experience with Anthropic's AI has been very positive overall, and we will continue to integrate it into our workflow to leverage its clear advantages over ChatGPT.

    Flomodia by Digidop
    Coudac project by Digidop
    project Heka by DigidopFlaw by project DigidopMorfo project by Digidop