How to make a strict Term. Quotes does not help

Prompt: Create a paragraph in english about “Finance” including the exact term: “financial consultant grand rapids”. Paragraph has p tag.

Result:
Finance is an important part of life, and it is important to have a good understanding of it. Financial consultants in Grand Rapids can help individuals and businesses make the best decisions when it comes to their finances. A financial consultant can provide advice on budgeting, investments, taxes, and more. They can also help with retirement planning, estate planning, and other financial matters. With the help of a financial consultant in Grand Rapids, you can make sure that your finances are in order and that you are making the best decisions for your future.

financial consultant grand rapids → financial consultant in Grand Rapids

The AI adds a “in” because its may believe its the correct form. But I want the AI to really use the term as it is. Sometimes it works but thats very random and not reliable.
I also tried to tell the AI:
Do not change the term.
Do not correct, modify, edit the term.
When completed, check if the exact term is included.

But nothing comes up with a repetitive correct result. Even when the resulting text is always nearly the same.

Please help.

Thanks

Model: text-davinci-003
Temperatur: 0.7
Token: 1500

This is really hard to do in a one-shot prompt. In general, it’ll react similarly to a human, so typos will be ignored and meanings will get inferred. Yoouuu caaannnn eeevvvennn writttte tooo ttthhheee Ai liiiikkke thhhisss and it’ll likely still understand you for example.

So if I was trying to get it Exactly the way you want it, you will probably have to do a few examples where the phrase is used literally exactly how you want it, and you’ll improve your chances that the Ai will do the same (instead of just assuming, like many humans would, that you just forgot the “in”). I haven’t verified it myself, but others report that the 003 model can actually perform better on one-shot (single) examples than multiple. So you might find that it’s not the best one to use for your purposes. While 001 is considered old/inferior it often performs well on longer prompts with many examples. So you might want to include several examples of requests and outputs in your prompt, several which contain things that look like “mistakes” but are interpreted literally (instead of corrected). So 4-5 examples (use separators like *** or whatever you want) preceeding your actual prompt request might give it a better idea of the response that you’re looking for if you’re using 001. BUT, if you are really set on using 003, you might try one single example of a verbatim use of the exact terms your looking for preceding your actual prompt (just tried this in playground and it seemed to work ok). E.g.

Q: use the phrase “financial consultant grand rapids” in a sentence.
A: The recruiter began typing out their jobs ad, “Talented numbers wizard needed, financial consultant grand rapids.”

Q: Create a paragraph about “Finance” including the phrase: “financial consultant grand rapids”.
A:

I already played with:

  1. Including the phrase: “financial consultant grand rapids”
  2. Including the words: “financial consultant grand rapids”
  3. Including the term: “financial consultant grand rapids”

I pasted your promt and the result was okay. then I removed the text and click submit again. phrase changed…
But same. Sometimes it works. Sometimes just one of 5 sometimes 4 of 5 sometimes 0 of 5.

Thats not reliable.

I would use a one-shot or two-shot example in the prompt.

How would you, as a human, naturally and correctly insert "financial consultant grand rapids” into a paragraph?

If it’s for SEO, I’m pretty sure Google and others by now know that "financial consultant grand rapids” and "financial consultant IN grand rapids” is basically the same thing.

Thats not working:
Prompt: How would you, as a human, naturally and correctly insert "financial consultant grand rapids” into a paragraph?

Result:
As a financial consultant in Grand Rapids, I am dedicated to helping individuals and businesses reach their financial goals. With my expertise in financial planning, I am able to provide comprehensive advice and guidance to help my clients make sound financial decisions.

I thought there is a syntax telling the AI taking a phrase as it is and do not change it…Even quotes and explaining not to change in prompt is ignored…

Oops. I think there was a misunderstanding. I didn’t mean to use that as a prompt. I meant there’s not really a natural way to insert "financial consultant grand rapids” naturally…

Write a prompt that has one or two examples of what you’re trying to do would be my advice. Good luck!

Like so…

ETA: Although it appears to have not worked on the last one. Might be best to just try one at a time. I had a big max_tokens. Using text-davinci-003 might help too.

Interesting… As I said, not having the “in” in your phrase makes it not natural / correct…

Here it was trying to do “collage fitness plan” which isn’t a real thing as it’s “college fitness plan…”

Request:

Create a paragraph in english about “Fitness” including the exact term: “collage fitness plan”. Paragraph has p tag. It’s okay to make mistakes.

Result:

Fitness is an important part of a healthy lifestyle. A good fitness plan can help you reach your goals and stay in shape. College students often have busy schedules, so it can be difficult to find the time to exercise. A college fitness plan can help you stay on track and reach your fitness goals. A college fitness plan can include a variety of activities such as running, weightlifting, and yoga. It can also include healthy eating habits and regular check-ins with a fitness coach. With a good college fitness plan, you can stay fit and healthy while in college

So maybe it’s trying to correct your wrong phrasing “ie keyword without the “in” …” Seems to work okay for other phrases…

Have you tried with other phrases that aren’t just keywords stuffed together?

Here I got it to understand that it’s okay to repeat the phrase if it’s not technically correct (as in your first example!) You can’t correctly use "financial consultant grand rapids” in a sentence…

If it’s a brand name of some sort, and you are using some sort of programming language, take the response string and do a simple search and replace.

Even if the ai generates the in, it reads ok if you remove it in your code before using the response

Seems annoying but it is a simple solution that lets you move on

Now, if you are using playground or chatgpt, you probably can’t resolve it. But then I assume you are going to have to copy and paste the text so you can still change it then :frowning:

1 Like

Good idea.

I think it is hanging-up on malformed phrases that don’t exist naturally in the training data.

My goal is to replace the Exact Term by str_replace but it fails when its modified. and you can not programatically find the modified version the ai used because there are thousand of possibilities.

Something I tried to trick the ai was:
Create one paragraph in english about “Finance”.This paragraph MUST include the EXACT PHRASE:“financial consultant grand rapids”.Any changes on the phrase is not allowed. Paragraph have p tag. Use a b tag on the phrase.

Result:

<p>Finance is an important part of our lives, as it helps us to manage our money and investments. It is important to understand the basics of financial planning and investing, as this can help us to make the most of our money. A <b>financial consultant grand rapids</b> can help to provide advice and guidance on how to manage our finances and make the most of our investments. With the right advice and guidance, it is possible to make sound financial decisions that can help us to reach our financial goals.</p>
1 Like

I like your idea to trick the ai

So are taking the text between the two tags and doing a replace in that? (With or without the tags)

Do you use a different company each time? Is that the issue? Or can you give an example of how the text changed so you couldn’t use str replace.

Can you clarify the issue now you have done that, or has it solved the problem now?

1 Like

thanks :slight_smile:

I need to use a rarely used tag so I can avoid a false match. Sometimes the ai adds html tags itself. But its mostly em, strong, ul, li etc… So a rare used tag might do the trick.

The topic and the term is different on each query. So deliver a example text as paulbellow suggested is not practical here. Since its different on every query.

Since this is just a workaround I would like to have a more reliable version. Maybe the ai coder should take quoted text as given and do not edit. Or provide a way to make input text constant.That would be the best.

You can use anything for the examples, but it might influence the later generation. Good luck with it, though!