Grade system prompts in Google Sheets with a Gemini LLM judge
Quick overview This workflow manually grades a system prompt by running it against a sample user task with Google Gemini, then has a second Gemini judge score the prompt (1–10) and write the grade and reason back to Google Sheets.
How it works Starts when you run the workflow manually. Reads the prompt list from a Google Sheets spreadsheet and keeps only the last row as the system prompt under test. Sets a fixed sample customer-support task and sends it to a Google Gemini-powered agent using the sheet prompt as its system instructions. Sends the original prompt, the sample task, and the agent’s response to a second Google Gemini judge that returns a structured grade and short justification. Updates the same Google Sheets row with the returned grade and reason.
Setup Connect a Google Sheets OAuth2 credential with access to the target spreadsheet. Connect a Google AI Studio (Gemini) credential for the candidate model, grader model, and parser-fixer model. Ensure your sheet has columns for at least prompt, grade, and reason, and that the workflow can match rows using the row_number field. Update the spreadsheet ID/sheet and edit the sample task text if you want to test prompts against a different scenario.
Related Templates
Restore your workflows from GitHub
This workflow restores all n8n instance workflows from GitHub backups using the n8n API node. It complements the Backup ...
Build a Restaurant Voice Assistant with VAPI and PostgreSQL for Bookings & Orders
This n8n template demonstrates how to create a comprehensive voice-powered restaurant assistant that handles table reser...
Extract Named Entities from Web Pages with Google Natural Language API
Who is this for? Content strategists analyzing web page semantic content SEO professionals conducting entity-based anal...
🔒 Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments