How to force ChatGPT to make a story/sentence ONLY with the words I provided

Given LLMs like ChatGPT are so good with creating stories, I’d like to build a simple application that can help my kids learn Chinese characters. However, the unique feature I want is, I want ChatGPT to create the story with only the Chinese characters I provided (e.g. select some characters from the 100 most used Chinese characters) so it would be easy for my kids to practice. However, what I found is ChatGPT will be very creative and they keep using the characters I didn’t provide.

What is the best way to achieve what I want? Prompt engineering? Fine tuning? Any leads/examples are appreciated.

Also if it’s super hard for Chinese characters, I can try with English words as well.

This is not something you can do.

ChatGPT uses gpt-3.5-turbo or GPT-4, both of which are stochastic models.

There is always some non-zero probability of the models randomly selecting some arbitrary token.

By instructing the model to only use a certain subset of words you certainly make the tokens which comprise those words substantially more likely to be selected, but there will always be a chance of selecting something else.

1 Like