• abhibeckert@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    arrow-down
    1
    ·
    edit-2
    8 months ago

    I really wish all of these companies racing to replace their existing software features and employees with LLMs understood this.

    They totally understand it. And OpenAI has solved it. For example while researching The Ultimate Answer to Life the Universe and Everything, I asked it to calculate 6 by 9 in base 13 and got the correct answer - 42.

    ChatGPT didn’t use the LLM to calculate that. It only used the LLM understand an obscure and deliberately confusing chapter of the Hitchhiker’s Guide book, to write and execute this python script.

    # To calculate six by nine in base 13, we multiply the numbers in our standard decimal system and then convert the result to base 13.
    
    # Calculate 6 * 9 in decimal
    result_decimal = 6 * 9
    
    # Convert the result to base 13
    # The easiest approach is to use the divmod() function repeatedly to get the remainder (which corresponds to the base 13 digit) 
    # and update the quotient for the next iteration until the quotient is 0.
    
    def decimal_to_base_n(num, base):
        if num == 0:
            return "0"
        digits = []
        while num:
            num, remainder = divmod(num, base)
            digits.append(str(remainder))
        return ''.join(digits[::-1])
    
    # Convert the decimal result to base 13
    result_base_13 = decimal_to_base_n(result_decimal, 13)
    
    result_base_13