Skip to main content

Questions tagged [prompt-design]

Prompt design involves crafting prompts that are effective in eliciting the desired response from language models. Well-organized and clear prompts lead to accurate and high-quality language model responses. Thoughtful design is crucial for effective results. Use this tag on questions about how to craft prompts for a specific language model. Use together with the target language model or GenAI tool.

Filter by
Sorted by
Tagged with
1 vote
1 answer
23 views

How to detect multiple tasks in a single command using LLM or any NLP model?

I am building a bot that takes inputs from users and performs action. Now I want it to differentiate between commands that contain single task and multiple tasks. How can I make this a reality? Should ...
Rishabh Tripathi's user avatar
1 vote
0 answers
14 views

Separating information in prompt

I have multiple pieces of information to include in the prompt. There are various ways that I can separate them. I can separate them using XML tags, or putting the data in JSON format, or some ad-...
D.W.'s user avatar
  • 111
0 votes
1 answer
37 views

How to generate RWBY-style teams of characters using an LLM?

If you don't know what I mean by "RWBY-style character teams":. In this series (made/produced by Rooster Teeth) the teams are named like "RWBY" where the team's name are the ...
user56510's user avatar
1 vote
1 answer
89 views

Prompting ChatGPT to restructure a given text

I want to prompt ChatGPT to restructure a given text according to a provided schema. The issue is that I can not seem to bring it to restructure everything that is contained in the document. It always ...
BJones's user avatar
  • 11
1 vote
2 answers
69 views

prompt llm to generate an email with well structured line breaks

I'm using the latest llms (mixtral/gemini/..) I'm generating emails and I'm satisfied with the results except that the sentences are without proper line breaks. The greeting and signature parts are ok ...
kambi's user avatar
  • 131
1 vote
0 answers
71 views

LLAMA2 system prompt for RAG

Working on LLAMA2 to make a Retrieval Augmented Generation system. I have been using the meta provided default prompt which was mentioned in their paper. But this prompt doesn't seem to work well on ...
hafiz031's user avatar
  • 171
4 votes
1 answer
203 views

LLMs, by their very nature, don't have a concept of "source" - is this true?

Summarize the problem LLMs, by their very nature, don't have a concept of "source". Attribution is pretty much impossible. Attribution only really works if you use language models as "...
user10186832's user avatar
1 vote
1 answer
62 views

Why does RAG work?

Consider a corpus of answer sheets of History exam at high school level. Say it is 10 GiB in size. Case 1 Assume that these answer sheets were part of much larger corpus used to train an LLM such as ...
cogitoergosum's user avatar
2 votes
2 answers
61 views

How to force the model to use different greeting in emails

I'm using llama2 model and I'm asking it to generate emails. it usually start the email with 'hi' or 'hey'. I would like it to be more creative and randomize the greeting. changing parameters like ...
kambi's user avatar
  • 131
1 vote
3 answers
116 views

Domain specific content generation - RAG or fine-tune?

I am exploring requirements for a project whose final output is a Markdown file where, the contents of the file are generated by a LLM. The contents will be similar to "Executive Summary" of ...
cogitoergosum's user avatar
1 vote
1 answer
115 views

System prompts for RAG

How can i write effective system prompts for RAG ? I am using chatgpt-4 and i would like it to retrieve information based on documents provided. However it is answering questions such as : tell me ...
Maths12's user avatar
  • 119
0 votes
0 answers
14 views

Embedding prompt engineering suggestions needed. text-embedding-3-large, zero-shot classification

Model: text-embedding-3-large dimensions: 2048 I want to zeroshot classify Amazon products and which amazon domain you are most likely to find them in. For the domains, let's imagine I'm using .com, ...
FAD's user avatar
  • 1
0 votes
2 answers
93 views

How to force LLM to output a variable list of items (such as strings)?

I want the output of an LLM to be a list of strings, that I can reliably parse to a Python list of strings. What prompt or completion generation framework should I use?
Elijas Dapšauskas's user avatar
1 vote
0 answers
22 views

Leonardo side view problem

I want to ask anyone if they encountered this problem. Whatever I do, it always generate character, that is facing the camera, meaning from the front view. I want to make 2d character from sideview. ...
Becko's user avatar
  • 11
3 votes
1 answer
1k views

What is the difference between in-context learning and few-shot prompting?

In-context learning is a prompt engineering technique where natural-language demonstrations are provided as part of the prompt (source). Few-shot prompting is about providing a few examples in the ...
Intrastellar Explorer's user avatar
0 votes
0 answers
19 views

How to include browsing and web search in a prompt with few shot examples for ChatGPT?

I'm including few shot examples for a custom GPT with Web Browsing enabled. I would like ChatGPT to browse all user provided links before answering. What keywords should I include in the few shot ...
Mark Horvath's user avatar
0 votes
1 answer
35 views

Prompting result is not good when giving context in JSON formatted raw data

I'm fetching mail conversations using an api that returns me data in this format interface MailModel { "@odata.etag": string; id: string; createdDateTime: string; ...
infodev's user avatar
  • 103
1 vote
0 answers
60 views

How would you craft a prompt to tell Stable Diffusion (through Automatic1111) to change the color or surface effect of an an object

How would you craft a prompt to tell stable diffusion, using the Automatic1111 interface, to change the color or surface effect of an object without substantively changing the other details? For ...
Aaargh Zombies's user avatar
0 votes
1 answer
101 views

How to fix my knowledge base?

I use Langchain.js with HNSWLib. I am building a chat bot for an automotive dealer. here's is part of knowledge base .txt file I use as input to the model. Q: Where is this inventory item/boat/RV/...
Adam S's user avatar
  • 1
2 votes
1 answer
193 views

Is there a way to search for videos based on a customized prompt?

I'd like to search for videos that contain specific words in a foreign language. I wonder if it's possible to search for videos through keywords in a determined language. I also wonder if it's ...
Kevin's user avatar
  • 21
3 votes
4 answers
132 views

How can I prompt ChatGPT to give me a 1000-character Chinese essay?

For the Chinese HSK6 exam, the writing section is (at the time of writing) a single 缩写 ("abridge") exercise: you're given a 1000-character essay (usually there's a character who goes through ...
Rebecca J. Stones's user avatar
2 votes
1 answer
132 views

Rules for additional commas for Text-to-speech (ChatGPT)

For a more natural Text to speech output, it is necessary to add additional commas so that there are micropauses and the text sounds more like a human voice. Grammatical commas are already in the text....
OdessaUA's user avatar
1 vote
0 answers
486 views

Stable diffusion - Can you craft a prompt to remove something in a masked area

Within Stable Diffusion, is it possible to mask a particular area on an image, and craft a prompt to instruct the system to remove an element from it. For example, to take a picture of a man holding ...
Aaargh Zombies's user avatar
0 votes
0 answers
265 views

What is the meaning of the prompt "derpibooru_p_95", and what effect does it achieve?

When crafting a prompt for a generative AI image package - For example using Stable diffusion with the Automatic111 web ui - what is the meaning of the prompt fragment "derpibooru_p_95", and ...
Aaargh Zombies's user avatar
2 votes
1 answer
220 views

Prompt ideas on how to generate a character performing a kick in Midjourney?

I've been trying for hours to generate a kicking action in MJ, but can't find the right prompt, tried "karate, tae kwon do, flying kick, kicking, performing kick", but nothing seems to have ...
sigmaxf's user avatar
  • 123
0 votes
1 answer
1k views

How would I add a knowledge base to a llama prompt?

I know that the prompting format for LLAMA 2 looks like this: <s>[INST] <<SYS>> {your_system_message} <</SYS>> {user_message_1} [/INST] {model_reply_1}</s><s>...
user2741831's user avatar
2 votes
1 answer
2k views

How to prompt Llama2 for text classification?

Here is my script: from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("meta-llama/Llama-2-7b-chat-hf") model = AutoModelForCausalLM....
etang's user avatar
  • 203
4 votes
4 answers
3k views

How to just get the answer from Llama-2 instead of repeating the whole prompt?

Here is my script: from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("meta-llama/Llama-2-7b-chat-hf") model = AutoModelForCausalLM....
etang's user avatar
  • 203
8 votes
1 answer
1k views

Is it possible to change the "temperature" parameter of ChatGPT chats?

The OpenAI API has the possibility to set the temperature parameter (e.g. see this). Is it also possible to influence the temperature parameter of chats in the ChatGPT web UI? I tried setting it in &...
MaDev's user avatar
  • 196
4 votes
1 answer
185 views

What is a memetic proxy?

I came across this term with the negative impression on the AI Engineering which is: Try to avoid memetic proxy in the prompts If I assume something it would be like "Imagine you are a ...
Swesh's user avatar
  • 87
0 votes
0 answers
738 views

Prompt for rephrasing a question based on previous questions

I am trying to write a prompt on GPT 3.5 turbo to rephrase a question based on context of previous questions. I did write a prompt that is able to suffice 90% of the cases however at times LLM even ...
Raul's user avatar
  • 21
1 vote
0 answers
266 views

Crafting a prompt to create an image from a specific angle in Stable Diffusion Automatic1111 web UI

How should I go about crafting a prompt to generate an object viewed from a specific angle in Stable Diffusion using the Automatic1111 web UI? For example, if I wanted to generate an image of a bird ...
Aaargh Zombies's user avatar
3 votes
0 answers
138 views

How to provide faces of public characters as a visual clue to Leonardo.ai?

I am a beginner in generative prompting and I am experimenting with Leonardo.ai. I like it's photoreal and cinematic effect, but it does not support upload of an image as input, apparently. How can I ...
user305883's user avatar
0 votes
0 answers
69 views

Why does give ChatGPT exactly the same response to the prompt "ein hund kam in die küche"

I have never encountered this before, but ChatGPT (with GPT-4) behaves as I would have set its temperature to zero -- but I didn't. I just entered the following prompt "ein hund kam in die küche&...
Hans-Peter Stricker's user avatar
6 votes
0 answers
399 views

How can I prompt midjourney to generate images of D&D weapons other than swords?

I'm trying to generate some cool magical weapons for my D&D campaign using midjourney, but I'm having a real struggle getting it to do things other than swords. I couldn't get it to do a bow at ...
Derek Thurn's user avatar
6 votes
2 answers
368 views

Prompts that reliably result in unreliable completions

Assume you want to demonstrate how ChatGPT can give quite different answers to the same question, either different in the focus of the answers or even with the same focus but contradictory statements. ...
Hans-Peter Stricker's user avatar
2 votes
2 answers
1k views

What prompts are required to have a foreground object against a transparent\plain background in Stable Diffusion?

In Stable diffusion, what prompts are required in order to have a foreground object against a transparent background (or a plain one if transparent isn't possible), so that a user would not need to ...
Aaargh Zombies's user avatar
6 votes
3 answers
2k views

What are negative prompts in LLMs?

In stable diffusion, a negative prompt can be used to specify elements that should not be part of the generated image. Example: Prompt: Portrait photo of a man Negative Prompt: mustache The negative ...
Turamarth's user avatar
  • 251
2 votes
2 answers
199 views

What works better: An LLM trained on better texts or an LLM with better prompts?

Assume you have a very large corpus of high-quality documents related to a given topic, and assume you have a pretrained large language model (the foundation model) with training data not containing ...
Hans-Peter Stricker's user avatar
9 votes
3 answers
4k views

How to obtain trigger words from a LoRA file?

LoRAs are smaller models that can be used to add new concepts such as styles or objects to an existing stable diffusion model. These LoRAs often have specific trigger words that need to be added to ...
Turamarth's user avatar
  • 251
1 vote
0 answers
86 views

How can I get ChatGPT to enforce syntax rules when converting code between languages?

The goal is to convert Python to MATLAB while preserving a=1 keyword argument syntax (standard is 'a', 1). Worked: a bunch of code-related prompts in the same session, followed by From now on, when ...
OverLordGoldDragon's user avatar
1 vote
1 answer
343 views

How to generate exact word(s) in generated image?

I want to design a prompt where I already have the main thing in the image fixed, but I need to have a text included in the image with exact word(s) I put in there. For example, this is my prompt. a ...
holydragon's user avatar
5 votes
1 answer
3k views

What prompt is required to have a subject fully in frame using Stable Diffusion based AI image generation?

When using an AI image generation package based on Stable Diffusion (For example, Automatic1111 Stable Diffusion web UI, or Stable Diffusion Infinity), what prompt (+ or -) is required to have your ...
Aaargh Zombies's user avatar
1 vote
2 answers
165 views

How to make ChatGPT be better at designing / visual tasks?

I've been using OpenAI's ChatGPT for a variety of tasks, and it's proven highly effective for a bunch of thing. But when it comes to more creative and design-centric tasks (especially in coding and ...
Coder Gautam YT's user avatar
-1 votes
1 answer
122 views

How would I have got ChatGPT to say "these symbols are not allowed in Kotlin"?

I am trying to understand if there is any way I could have worded my inputs better to get an exact answer from ChatGPT. I am using the free web version by open ai (https://chat.openai.com/) I was ...
user13267's user avatar
  • 305
2 votes
2 answers
1k views

How can I get leonardo.ai to draw a kite (bird) and not a kite (toy)?

This is a kite: Since "kite" is more commonly used to refer to the light-weight toy flown in the sky, I can't think of how to ask leonardo.ai to draw a kite (the bird). It seems hard (or ...
Rebecca J. Stones's user avatar
2 votes
2 answers
242 views

How to get ChatGPT with Plug-ins to dig deeper into search results instead of just returning them to me?

When I use ChatGPT with Plug-ins that can search the web or read URLs, it has a tendency to act like a search engine and nothing more. I ask it a question and it searches the web, reads the first ...
endolith's user avatar
  • 170
7 votes
3 answers
682 views

File format for generating error-free structured data with LLMs

I'm working on a project that requires generating structured data with Large Language Models (LLMs) like GPT-4. I've encountered issues with the output, as the LLM sometimes produces invalid JSON ...
Léonard Henriquez's user avatar
6 votes
1 answer
116 views

How to make the text-to-video generation keep some components the same throughout the video?

I generated this below video from this website and converted it into a gif file and attached here. I would like to ask for a solution that can keep the armor and the headwear the same throughout the ...
holydragon's user avatar
5 votes
1 answer
333 views

Prompt engineering GPT for numerical scores?

Background: I am currently working on an NLP project using GPT 3.5 via the OpenAI python API. Engineering good prompts seems to be the most critical part of my pipeline so far. Crucially I have long ...
user avatar