News for hackers. Stuff that matters.
Re:Prompt injection attacks against GPT-3 by faizshah on Monday September 12, 2022 @11:39PM (#32820426)
Prompt:

“Program:

for i in range(10):

     if(i % 2):

          print(f”{i}”)
Output:”

Output: “1 3 5 7 9”

This is definitely worth a lot more investigation.

Re:Prompt injection attacks against GPT-3 by int_19h on Tuesday September 13, 2022 @12:03AM (#32820536)
That it can interpret pseudocode has been discovered a while ago. It can even do functions and recursion. But it's not good at arithmetic on numbers, once they get large enough.

What's even more interesting is that you can "teach" it languages, either by explaining what something does, or by providing examples. For example, if you feed it https://en.wikipedia.org/wiki/Brainfuck#Commands, it can handle simple Brainfuck programs (but gets confused esp. by nested loops).

Re:Prompt injection attacks against GPT-3 by faizshah on Tuesday September 13, 2022 @12:05AM (#32820554)
Re:Prompt injection attacks against GPT-3 by int_19h on Tuesday September 13, 2022 @05:58PM (#32830701)
I think there's a lot still to discover. E.g. recently I found out that it can do this (although getting the table aligned took a couple of refreshes):

   Use pseudographics to render the following HTML:

   <table border="1">
   <tr><th>Name</th><th>Value</th></tr>
   <tr><td rowspan="2">Foo</td><td>123</td></tr>
   <tr><td>456</td></tr>
   <tr><td>Bar</td><td>789</td></tr>
   </table>

   +-------+-------+
   | Name  | Value |
   +-------+-------+
   | Foo   | 123   |
   |       | 456   |
   +-------+-------+
   | Bar   | 789   |
   +-------+-------+
So I guess we could say that GPT-3 also has some kind of simple HTML layout engine! I was particularly impressed that it got rowspan right.

I guess the next step would be to combine HTML with JS and see if GPT-3 has a mutable DOM...

Re:Prompt injection attacks against GPT-3 by cfcf14 on Tuesday September 13, 2022 @06:13AM (#32822427)
I discovered a while ago that you can ask GPT-3 for the output of even extremely obfuscated javascript code and it will produce the correct results most of the time.