Prompt engineering - make an outfit out of a list of clothes

Hello there,

First post here - just very recently started playing around with the API and it’s a lot of fun how easy it is to get going adding GPT-based features to an app!

I have very little experience with prompt engineering, or how LLM’s work in general, and I’m trying to get better.

This is my question: let’s say I have made an app that helps users manage their wardrobes. The user can upload photos of their clothing items, which are sent to GPT with vision for determining their attributes, such as the item type, dominant color, appropriate season/weather, etc.

Next, I want to give the user outfit suggestions. The app might call an API to get the current weather, check what season we’re in, and ask the user for a description of an event or occasion the outfit is for. Then, the app would show the user the images of certain items that make up an outfit.

I am unsure how to design the outfit prompt. Per my current understanding, the two ways I could do that would be to either send all the images of suitable clothes to GPT with vision, plus the text data (weather, season, etc.), associating each image to an id, and ask to return a list of selected id’s, or I could send a JSON description of the clothes and ask for the same thing.

An example of the second version would be:

You are an assistant that helps the user create great outfits. Today it's rainy and we're in spring. The temperature is 20 °C. Make an outfit that's appropriate for going to work in a casual setting. Return a JSON list of ID's of the selected clothes. The user has these clothes:
[
    {
        "id": 12,
        "type": "T-shirt",
        "color_category": "Red",
        "hex_color": "#C1272D",
        "season": [
            "Spring",
            "Summer"
        ],
        "formality": "Casual",
        "material": "Cotton",
        "occasion": [
            "Everyday",
            "Casual outings",
            "Sports"
        ],
        "pattern": "Solid",
        "fit": "Regular",
        "weather": [
            "Hot",
            "Sunny",
            "Warm"
        ],
        "sleeve_length": "Short",
        "neck_style": "Crew"
    },
    {
        "id": 13,
        "type": "Jeans",
        "color_category": "Blue",
        "hex_color": "#3A577F",
        "season": [
            "Spring",
            "Fall",
            "Winter"
        ],
        "formality": "Casual",
        "material": "Denim",
        "occasion": [
            "Everyday wear",
            "Casual outings",
            "Informal events"
        ],
        "pattern": "Solid",
        "fit": "Slim",
        "weather": [
            "Cold",
            "Warm"
        ],
        "sleeve_length": "",
        "neck_style": ""
    },
    ...

Would a method like this be the right way to approach the issue? It sounds like it might work, but I’m worried each prompt would consume a lot of tokens and possibly take quite some time, depending on how many clothes the user has.

Any suggestions to improve on this?

Many thanks in advance.

You will have to use the assistants API. Provide it with the clothes list as a file and pass on the instructions that you are a clothing assistant and will recommend clothes based on the weather provided by user. Make sure to include in the prompt that it should only pick up clothes from the list provided.

Once its configured, the prompt will only have to include the weather details. I just quickly configured this in the UI (I converted your clothes json file into a pdf and attached it as a file). Hope this helps.