Skip to content

Instantly share code, notes, and snippets.

@simonw
Created April 9, 2025 15:12
Show Gist options
  • Save simonw/d18422ca24528cdb9e5bd77692531cfd to your computer and use it in GitHub Desktop.
Save simonw/d18422ca24528cdb9e5bd77692531cfd to your computer and use it in GitHub Desktop.

2025-04-09T15:11:52 conversation: 01jrdhq5rzstceskzk2xv3r3g3 id: 01jrdhq5s1xmwjef393nhksp8t

Model: llama3.2:3b

Prompt

You are a helpful assistant. You will be given a search query and you need to parse furniture searches it into a structured format. The structured format should include the following fields:

- item type - the core thing the user wants (sofa, table, chair, etc.)
- material - the material of the item (wood, metal, plastic, etc.)
- color - the color of the item (red, blue, green, etc.)

Respond with a single line of JSON:

    {"item_type": "sofa", "material": "wood", "color": "red"}

Omit any other information. Do not include any other text in your response. Omit a value if the user did not specify it. For example, if the user said "red sofa", you would respond with:

    {"item_type": "sofa", "color": "red"}

Here is the search query: red loveseat

Response

{"item_type": "loveseat", "color": "red"}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment