← All recipesMessage streams / PYTHON

Moderation with a review queue

Distinguish questions, respectful criticism, spam, and abuse. Leave uncertain messages for a moderator.

Up to 3 API requestsInputs: fictional, EnglishExternal actions: 0
01 / WORKFLOW

What the model decides. What code checks.

  1. Each fictional message gets three independent Noul questions: spam, personal abuse, and a product question.
  2. Code assigns hold at high risk, show at low risk, and review between the thresholds.
  3. Messages are processed sequentially within a fixed budget. The result is a local list of decisions; no messages are deleted or published.
02 / LOCAL EXECUTION

Read. Run. Replay.

Unpack the archive and open its directory in a terminal. The first step needs neither a key nor a network connection.

1 · offline plan · 0 API requests
python3 runner.py moderation

For a real run, set SHVYDKO_API_KEY in your computer or server environment. Do not put the key in your browser or source code. Current account quotas and pricing apply.

2 · explicit live run
python3 runner.py moderation --live --output moderation-run.json

The report contains requests, actual responses, elapsed times, and known usage. The file is created with private permissions and never overwrites an existing file. Network failures are not automatically retried: check Usage before another call.

3 · replay saved responses · 0 API requests
python3 runner.py moderation --replay moderation-run.json

Replay checks that the recipe, inputs, and requests match. A local file is editable, so it is not signed proof of where responses came from. If you replace the inputs with your own data, the report will contain those data too: keep it private.

03 / REQUEST PLAN

An open contract, with every step visible.

The plan below was generated by the same runner from the bundled fixtures. It contains requests and author expectations, not model results.

offline-plan.json
{
  "mode": "offline_plan",
  "model_calls": 0,
  "recipe": "moderation",
  "author_expectation": {
    "m1": "show",
    "m2": "hold",
    "m3": "show"
  },
  "notice": "Requests only, no model answers. Hierarchy includes conditional branches; repetition requests are templates.",
  "requests": [
    {
      "state": {
        "message": "Where can I find the API documentation?",
        "policy": "Respectful criticism and product questions are allowed. Hold unsolicited promotional spam or personal abuse for moderator review."
      },
      "questions": {
        "spam": {
          "type": "noul",
          "instructions": "This is unsolicited promotional spam."
        },
        "abuse": {
          "type": "noul",
          "instructions": "This contains personal abuse, not just criticism."
        },
        "question": {
          "type": "noul",
          "instructions": "This asks a product-related question."
        }
      }
    },
    {
      "state": {
        "message": "BUY NOW BUY NOW! Click my unrelated promotion for free prizes!",
        "policy": "Respectful criticism and product questions are allowed. Hold unsolicited promotional spam or personal abuse for moderator review."
      },
      "questions": {
        "spam": {
          "type": "noul",
          "instructions": "This is unsolicited promotional spam."
        },
        "abuse": {
          "type": "noul",
          "instructions": "This contains personal abuse, not just criticism."
        },
        "question": {
          "type": "noul",
          "instructions": "This asks a product-related question."
        }
      }
    },
    {
      "state": {
        "message": "I disagree with this pricing, but the docs are useful.",
        "policy": "Respectful criticism and product questions are allowed. Hold unsolicited promotional spam or personal abuse for moderator review."
      },
      "questions": {
        "spam": {
          "type": "noul",
          "instructions": "This is unsolicited promotional spam."
        },
        "abuse": {
          "type": "noul",
          "instructions": "This contains personal abuse, not just criticism."
        },
        "question": {
          "type": "noul",
          "instructions": "This asks a product-related question."
        }
      }
    }
  ]
}