Skip to content

Product photo captions ​

An agent writes a caption for every product photo of the new catalogue.

In words ​

The wishEvery product photo of the new catalogue has a caption

Step 1 · captions

What to doWrite catalogue/captions.md with one line for each photo in catalogue/photos: the photo's file name and what it shows.
Who does itAn agent
What proves it
  • These must be there: catalogue/photos/*.jpg, catalogue/captions.md
  • Another agent must find this true: “Each caption says what its photo shows and nothing it does not show.”

The file ​

json
{
  "$schema": "vpf/1",
  "wish": "Every product photo of the new catalogue has a caption",
  "steps": [
    {
      "id": "captions",
      "do": "Write catalogue/captions.md with one line for each photo in catalogue/photos: the photo's file name and what it shows.",
      "by": "agent",
      "tools": [
        "read",
        "write"
      ],
      "proof": [
        {
          "by": "algorithm",
          "needs": [
            {
              "need": "files",
              "path": "catalogue/photos/*.jpg",
              "at_least": 1
            },
            {
              "need": "names",
              "path": "catalogue/captions.md",
              "files": "catalogue/photos/*.jpg"
            }
          ]
        },
        {
          "by": "agent",
          "check": "Each caption says what its photo shows and nothing it does not show."
        }
      ]
    }
  ]
}

Why it is written this way ​

The names need proves that every photo has a caption, with no model asked. Another agent checks that each caption says what its photo shows.

Code, schema and examples under the Apache License 2.0. Guide text also under CC BY 4.0.