Discussion: Prompting / Prompt Engineering #1677
Replies: 20 comments 1 reply
-
After many more tries I've finally managed to convince the
One key change here was removing the In general, this model doesn't seem to be able to deal with this kind of meta-requests very well. Its sister model Side note: writing solely -- without prior prompts -- "tldr" or "translate to <language>" -- with <language> being one a specific model has potentially been trained on -- seems to be a good way to investigate whether it has picked up the additional instructions. The idea here is to shift the context and make it output the instructions that otherwise would be implicit. P.S. One take-away from these experiments is that the UI would probably benefit from per-model Prompt Templates at some point down the line. |
Beta Was this translation helpful? Give feedback.
-
Make an issue for per-model templates :) |
Beta Was this translation helpful? Give feedback.
-
Eventually, but I'm not yet sure whether it'd be a good idea to add some of the other parameters or even the whole panel to such a feature. I haven't really done a lot of tests adjusting the parameters. |
Beta Was this translation helpful? Give feedback.
-
Aside: Funny thing is, sometimes you get some really weird stuff while testing things. Currently playing around with But the way it did that here -- and the Prompt Template was similar to the one used in Prompt:
Response:
And another time I told it "translate to spanish" it responded in some Arabic language... |
Beta Was this translation helpful? Give feedback.
-
Looks like the idea as originally envisioned -- "assistant personality; reply and reflect on/review your response" -- is actually quite difficult for these things to get right (up to now
And I regenerated each response 3 times. Mosaic mpt-chat
|
Beta Was this translation helpful? Give feedback.
-
Sorry for kicking in, but I find this interesting, so I wanted to know, where I can read about prompt templates and how they are done. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
I just discovered this "prompt template", so I'm afraid I'm not of good use at the moment. 😊
Now I wonder if something like this also works:
Or
Am I on the right track on how this (could) work or is that just wishful thinking? 🙄 |
Beta Was this translation helpful? Give feedback.
-
People have come up with specifically tailored prompts to use with ChatGPT, e.g. here is a site that collects them: https://flowgpt.com/ These models are not as powerful as ChatGPT, though, so I've been experimenting on my own with how to formulate them to get the best results. I think the original template I used was adapted from a reddit discussion (but on ChatGPT), not sure anymore, I'd have to go find that again. Doesn't really matter much, however, they need to be tailored.
Probably. I don't know PHP very well, so I'd use another language myself. But try it and see what happens. Results always depend on how much it was trained on a given language, though. Another thing I've found that is also "understood" quite well is something like: They tend to come up with false information quite a bit, though. So it's a good idea to question/task them in a subject area where you have some knowledge. Although one of my goals is to come up with prompts that make them "more reliable" in general. Edit: Additional note: I've also started to look into the training data of individual models; I hope that'll help in coming up with better prompt templates. For your question in particular, it's probably not a good idea to start with PHP and the |
Beta Was this translation helpful? Give feedback.
-
I’m doing well for a basic character creation with groovy model with the following prompt template: ###Instruction: |
Beta Was this translation helpful? Give feedback.
-
Nice. Gave it a quick try and at some point it came up with this: 😄 Prompt: and where is that factory located?
Just in case anyone's interested: I've also seen the keywords Edit: Additionally, the following keywords are currently hardcoded into the different backends (haven't looked into where they're used, however):
|
Beta Was this translation helpful? Give feedback.
-
@cosmic-snow Thanks for your reply. I will explore this a bit and see where it gets me ... 🙂 |
Beta Was this translation helpful? Give feedback.
-
Here is a great repo for general possibilities that could be re-tooled for this UI. I'm going to do a bit of experimenting with the suggestions in this tread. This is a great discussion. |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
[comment major revision: v2] In this comment I'm going to write a few things about Datasets & Models and will update it occasionally once I know more. The basics: there are so-called Foundation Models which are trained on big Datasets from various sources. These are then typically fine-tuned with much smaller Datasets for specific purposes. Some models use only parts of datasets as their input. So far I've seen keywords like Foundation Models
Fine-Tuned Models
Datasets (WIP)
to add later: mC4, ShareGPT-Vicuna, HC3, Evol-Instruct, [GitHub], [Wikipedia], [Books], [ArXiV], [Stack Exchange] Additional Notes
Why does all of this matter? Looks like especially the fine-tuning datasets can have a considerable impact on which Prompt Templates work and which don't. So I wanted to have a bit of an overview. Last but not least, a note: The models are also typically "downgraded" in a process called quantisation to make it even possible for them to work on consumer-grade hardware. This can negatively impact their performance (in terms of capability, not speed). I'm not yet sure where to find more information on how this was done in any of the models. |
Beta Was this translation helpful? Give feedback.
-
I've been pointed to a very interesting paper which brushes on the topic: "Large Language Models are Zero-Shot Reasoners" (pdf), which cites "Chain-of-Thought Prompting Elicits Reasoning in Large Language Models" (pdf). They say:
based on the referred-to paper:
If you're not interested in reading those, one key take-away is, as mentioned: add something like I'm currently experimenting with deducing something general from a very narrow, specific fact. For a template I've come up with for
And I feel like this helps. But I'll have to do more tests and try different models to get a better picture. To test it I used e.g. the prompt (with a location I randomly looked for on Wikipedia): "What are the conditions like around lake Chala?". Some problems/notes:
|
Beta Was this translation helpful? Give feedback.
-
Would love any advice on prompt engineering for mpt-7b-instruct where I provide a context from a local embeddings store. I'm really used to openAI's simplistic syntax of: You will be provided a context, answer the following question based on the context Context: I'm finding it very hit-and-miss with mpt-7b-instruct, but more reliable still than mpt-7b-chat. Also it seems the mpt-7b-instruct response is more willing to derive an answer from outside the locally provided conext... I think language like "don't rely on any sources outside of the context" can help. Anyhow, does anyone have good experience with this approach on mpt-7b-instruct?? I'm finding very few examples online that involve a local embeddings store as part of the prompt. I don't even really know how necessary #### and newline separators are for the LLM to interpret the context vs question. |
Beta Was this translation helpful? Give feedback.
-
I haven't played around with a local embeddings store, so I'm not sure I can help you there. Also, recently I've been busy with a few other things and haven't had much time to invest into this. However, I can tell you a few things you can try that helped me so far:
Also, in what I've tried so far, it does depend on the model you pick. A good prompt in one does not necessarily mean it works well in another. It's a big part of why I started looking into the training sets (see comment above). For example,
I don't think newlines are very important, but ### might be. As mentioned, see the Last but not least, also have a look at this issue: #736 Prompts that you think do work. |
Beta Was this translation helpful? Give feedback.
-
I'll leave this open for future reference. This is interesting. |
Beta Was this translation helpful? Give feedback.
-
"###Instruction: this type of prompt template is worth gold! i´m messing up with gpt4all for 5 days, from getting no answer to getting answers i dont wanna get, and back to no answers. holy shit my odyssey ends here x) |
Beta Was this translation helpful? Give feedback.
-
Issue you'd like to raise.
[Note: this is intended to be a discussion rather than an issue with the codebase]
As you guys probably all know, it's sometimes hard to get consistent or even coherent responses.
I'm especially interested in bringing out the "assistant personality".
I'm currently experimenting with
gpt4all-l13b-snoozy
andmpt-7b-instruct
.I've researched a bit on the topic, then I've tried with some variations of prompts (set them in: Settings >
Prompt Template). But it seems to be quite sensitive to how the prompt is formulated. For example,
I've tried the following plus a few variations, and it didn't really work all that well:
Most of the time this just ended with it repeating itself, if it made a review at all. Even telling
it to not repeat the answer in the review didn't help.
However, while
mpt-7b-instruct
in general doesn't really want to follow these instructions, I'vehad some limited success with the following on
snoozy
:So this issue's goal is to open a discussion on how to better make it stay "on the rails". Are there
specific things that can be added to make it more likely to "listen"? For example:
P.S. please always include the models you've used.
Example conversation with the better prompt template using
snoozy
. You probably have to regenerate the answer several times to get something similar:Prompt:
Response:
Suggestion:
No response
Beta Was this translation helpful? Give feedback.
All reactions