5 ms·
Is it actually able to base64 encode and decode completely correctly?
by herpderperator 3y ago
Is it actually able to base64 encode and decode completely correctly?
- simonw 3y agoYes, GPT-4 can at least.
- bqmjjx0kac 3y agoAt first I was shocked to hear this, but then I realized it's basically a substitution cipher.
- tmalsburg2 3y agoYeah, still a bit strange given that GPT4 doesn’t even see individual characters but only tokens.
- dev_snd 3y agoIt's not even a cipher, it's just an encoding. Nobody would be surprised if chatgpt would be able to also understand e.g. utf-16. What's interesting here is that base64 does not have the exact same byte sequence (such as a single space) between tokens. So I still think for it to understand base64 is a bit surprising.
- IshKebab 3y agoIt's the same for every trigram... maybe that makes it easier for it? It could probably memorise the most common trigrams. If that's the case it would be less accurate for encoding random letters than English.
- lkirk 3y agoThis thought led me to a strange conversation with chatgpt. I just base64 encoded "Hello chatgpt how are you" as "SGVsbG8gY2hhdGdwdCBob3cgYXJlIHlvdQ==" and sent it as the first prompt. Notice how there is no question mark in my phrase. Now here's my conversation with chatgpt: User SGVsbG8gY2hhdGdwdCBob3cgYXJlIHlvdQ== ChatGPT This appears to be a Base64 encoded string that translates to "Hello chattpt how are you?" User not quite... almost but not quite ChatGPT I apologize for the mistake. The encoded string actually translates to "Hello chatgpt how you are". User also not quite, you were closer the first time ChatGPT Thank you for letting me know. The correct decoded message for the given Base64 encoded string is "Hello chatgpt how are you?" I apologize for any confusion my earlier responses may have caused. User can you now re-encode it into base64 ChatGPT Certainly! The message "Hello chatgpt how are you?" encoded in Base64 is: SGVsbG8gY2hhdGdwdCBob3cgYXJlIHlvdT8= I hope this helps! I find it particularly odd that it was misspelling things in its decoding and adding punctuation where there was none. I suppose a LLM would be trained to do something like that, but the "chattpt" really threw me off. Also, it's base64 encoded message back to me decodes as "Hello chatgpt how are you?". Maybe not that impressive of a demonstration, but definitely not was I was expecting.
- moffkalast 3y agoWell it's almost like transliteration when you think about it, should be even easier to do than any proper language translation and it can do that reasonably well for most languages. There probably just aren't enough examples in the training set to make it super reliable at it.
- pmoriarty 3y agoFrom what I understand, these LLMs deliberately incorporate randomness. So it's not surprising at all that some of their answers would be imperfect. Something else to consider is that these models work on tokens, not characters, so that might also account for why it made a mistake.
- hrayr 3y agoIt must have learned from your prompt because this is what I got: User: SGVsbG8gY2hhdGdwdCBob3cgYXJlIHlvdQ== ChatGPT: Hello! I'm doing well as an AI assistant, thank you. It seems you've sent a message in Base64 encoded format. The decoded message is "Hello chatgpt how are you". I'm here to assist you with any questions or tasks you have. How can I help you today?