Skip to content

Rating

The Rating LOP provides a standardized way to rate items within a TouchDesigner project. It can be used manually by developers or programmatically by AI agents like Agent or Gemini Live. Ratings are saved to a JSON file, making it easy to track preferences, evaluate generated content, or collect feedback.

The operator takes an “Item to Rate” (a string identifier) and a “Rating” (a float between 0.0 and 1.0). When the “Rate Item” pulse is triggered, it saves the item and its corresponding rating to a specified JSON file. This process can also be automated.

Item to Rate (Item) op('rating').par.Item Str
Default:
"" (Empty String)
Rating (Rating) op('rating').par.Rating Float
Default:
0.0
Auto Rate on Change (Autorate) op('rating').par.Autorate Toggle
Default:
Off
Rate Item (Rateitem) op('rating').par.Rateitem Pulse
Default:
None
File Settings Header
Storage Location (Storagelocation) op('rating').par.Storagelocation Menu
Default:
Project Folder
Rating Folder (Ratingfolder) op('rating').par.Ratingfolder Folder
Default:
"" (Empty String)
Rating File (Ratingfile) op('rating').par.Ratingfile Str
Default:
ratings
Last Rating File (Lastratingfile) op('rating').par.Lastratingfile Str
Default:
"" (Empty String)
Status Header
Last Rated Item (Lastrateditem) op('rating').par.Lastrateditem Str
Default:
"" (Empty String)
Output Display (Outputdisplay) op('rating').par.Outputdisplay Str
Default:
"" (Empty String)
Undo Last Rating (Undolastrating) op('rating').par.Undolastrating Pulse
Default:
None
GetTool Settings Header
Enable Tools (Enabletools) op('rating').par.Enabletools Toggle
Default:
On
Tool Configuration Header
Tool Info (Toolinfo) op('rating').par.Toolinfo Str
Default:
"" (Empty String)
Agent Selects Item (Agentselectsitem) op('rating').par.Agentselectsitem Toggle
Default:
Off
Bypass (Bypass) op('rating').par.Bypass Toggle
Default:
Off
Show Built-in Parameters (Showbuiltin) op('rating').par.Showbuiltin Toggle
Default:
Off
🔧 GetTool Enabled 2 tools

This operator exposes 2 tools that allow Agent and Gemini Live LOPs to rate items and retrieve ratings for AI-driven evaluation and quality assessment workflows.

The most powerful feature of the Rating LOP is its ability to be used as a “Tool” by AI agents. When Enable Tools is on, the Rating LOP exposes its functionality to operators like Agent or Gemini Live, allowing the AI to programmatically rate items based on its own evaluation.

The GetTool method in the Rating LOP dynamically generates two tools for an AI agent:

  1. rate_item: This tool allows the agent to assign a rating to an item.
  2. get_ratings: This tool lets the agent retrieve a list of all previously rated items.

This is especially useful in generative workflows where an AI creates content (e.g., images, text, or music) and then evaluates its own output.

To let an AI agent use the Rating LOP, you assign it as a tool in the agent’s parameters. This allows the AI to call the rate_item and get_ratings functions programmatically.

  1. Select the Agent: Click on the Agent or Gemini Live operator in your network to open its parameters.

  2. Navigate to the Tools Page: Go to the Tools page in the parameter window.

  3. Enable LOP Tools: Turn the Use LOP Tools toggle On.

  4. Assign the Rating LOP: The External Op Tools parameter is a sequence of blocks for adding tools. Find an empty block (e.g., the first one, which has an OP parameter labeled Tool 0 OP).

  5. Drag and Drop: Drag your rating LOP from the network editor and drop it directly onto the OP parameter field.

    Assigning a Tool
    Drag / drop the Rating LOP here!
  6. Activate the Tool: Ensure the Mode menu for that tool block is set to enabled.

Once assigned, the agent will have access to the Rating LOP’s functions. You can then instruct it in your prompt to use these tools.

Example Prompt:

“You are an art critic. The user will provide you with an image. Your task is to analyze it and rate it on a scale from 0.0 to 1.0 based on its composition and color harmony. Use the rate_item tool to submit your rating.”

This workflow creates a powerful feedback loop where an AI can generate, evaluate, and record its own performance, enabling more complex and autonomous systems.