Replies: 1 comment 18 replies
-
Hello @MarcusWey! 👋 I'm here to help you with any bugs, questions, or contributions you have. Let's tackle this together! The elements like Here's a breakdown of how you can use these elements in your prompt templates for models like Llama 3.1 8B and Gemma 2:2B:
Example Prompt Template
Detailed ExampleIf you want to create a more detailed prompt that includes instructions and context, you can structure it as follows:
Tips for Effective Prompts
By structuring your prompts this way, you can help the models better understand the context and follow the instructions more accurately. If you continue to face issues, you might need to experiment with different prompt structures or consult the specific documentation for the models you are using. |
Beta Was this translation helpful? Give feedback.
-
Good day, everyone. I am relatively new to Langflow and currently at the stage of experimenting with different open-source models available on Ollama. I noticed that different models seem to require different formats for prompts, or perhaps I misunderstand how prompt templates work.
For example, with OpenAI (before trying Ollama models), I would assign it a role, provide instructions, input variables, and it worked quite well.
OpenAI prompt example:
User: {user_input}
You are a professional data analyst proficient in analyzing tabular data. You will answer all requests made by the user if they are related to data.
However, when it comes to longer prompts, I found that models like Llama 3.1 8B and Gemma 2:2B don’t fully understand my instructions. They tend to ignore the instructions and restrictions I set but can still fetch website documents through the website loader component. After reading their official documentation, I discovered they use elements like <start_of_turn>user, <start_of_turn>model, and so on. However, I still don't fully understand these elements, as my recent attempts to use them haven’t yielded the desired output. Anyone can explain this for me?
Beta Was this translation helpful? Give feedback.
All reactions