3 ms·
Its hacking not engineering. But what helps is understanding a bit how the attention mech works and how your prompt effects the output. This "prompt engineeri
by hackernoteng 3y ago
Its hacking not engineering. But what helps is understanding a bit how the attention mech works and how your prompt effects the output. This "prompt engineering" is a vastly different programming paradigm. The notion of time is different, as output is being formed (one token at a time), the attention mechanism can focus more or less on different parts of the original prompt (along with the previous output tokens). This means that your "code", (your original prompt), is essentially getting "revisited" at different spots and different times while the output is getting generated and you are essentially "steering" the output in different directions based on the instructions in the prompt. This is different than how traditional code works which is always sequential and top-down while prompt writing, its better to think and speak like a human with human thoughts than to try to narrow things down to logic and code-like syntax. The LLM isnt going to process your prompt in a top-down one-time manner - its going to keep revisiting it (reweighing different parts of it, emphasising different parts of it) based on the output tokens chosen, and those weights will help determine the next token chosen, etc. Its like a whole new world of hacking, and it can be super frustrating but also amazingly effective.