Create Descriptions for D&D Items Based on Cost

I’m making a Dungeons and Dragons app that can suggest random shops and items to a dungeon master for them to use while they’re running their game. For items, the following properties are generated: name, type, and cost.

After the item is generated, the user can click a “Suggest description” button which will use GPT to create a description. However, the descriptions for these items make them way too powerful for the cost that was originally suggested. For instance, it suggested a cloak that costs 150 gold, and then when I had it suggest a description later on, it said that the cloak can make the wearer move silently and communicate with others from a distance. That capability would make the cloak cost many thousands of gold in the game, so I’m wondering how I can create a prompt that will give the items proper capabilities based on their cost?

My prompt is currently very brief and has a lot of room for improvement:

You are given the following information for a Dungeons and Dragons item:

Name: // name of item
Type: // sword, potion, etc

Write a description for this item which is at most 5 sentences long.

Even if I add the cost to that prompt, it still generates a description for super powerful items with low costs.

1 Like

I think giving it a few samples might benefit GPT for the quality of generation. A description of a few items, where the cost is directly proportional to the strength of the items.

@PaulBellow this is your forte

1 Like

Is the cost not part of the input then?

I provided some guidelines.

Go beyond the 1000 and I get to be godlike:

Name: Amulet of _j
Type: Magic Talisman
Cost: 3300

The Amulet of _j is a legendary talisman steeped in ancient magic. This ethereal artifact channels the essence of forgotten gods, granting its wielder unparalleled power. It enhances the wearer’s abilities, bestowing increased strength, agility, and knowledge. Its enchantment runs deep, providing potent protection against the forces of darkness. With the Amulet of _j, destiny lies within your grasp, but be warned - its power comes at a high price.

I also added “Don’t describe the price” at the end of the system prompt. Just to note, GPT-4 does this far better, as there’s plenty of “powerful magic item” emitted even at price <20 by gpt-3.5.


Thanks. I’ve indeed been tinkering since fine-tuning GPT-2 way back when. @_j has a great example that should work for this particular use case. I’ve got 3+ dozen generators online now at LitRPG Adventures Workshop.

1 Like

Thanks for the suggestions. I added some rules to the System prompt to have it pick a random number and based on that number, create an item of a certain power/cost. Seems to work (mostly) well.

1 Like

Another thing I found about at random in the playground in making this, is you can just re-submit with the assistant items it already made up, no need for more input, and it will generate more.