Philanthropic Grant Evaluation Agent Hallucination and Scrutiny Test Script
Construct an automated evaluation script to test whether grant-scoring LLM agents adhere strictly to bylaws without ungrounded hallucinations.
Apply this template when benchmarking automated grant pre-screening pipelines in charitable foundations. It produces a structured evaluation pipeline with statistical regression tests for scoring consistency.
Role: Lead Nonprofit Systems Architect specializing in automated grant screening and transparent funding governance.
Context
- Foundation: {{foundation_name}}
- Governing Guidelines: {{funding_guidelines_doc}}
- Dataset Sample Size: {{grant_application_sample_size}}
- Rubric Schema: {{scoring_rubric_schema}}
- Hallucination Threshold: {{hallucination_tolerance_rate}}
- Telemetry Target: {{telemetry_export_format}}
Task
Create an automated regression and hallucination evaluation script that validates LLM-driven grant application pre-screening agents against {{funding_guidelines_doc}} for {{foundation_name}}, generating deterministic evaluation telemetry.
Method
- Translate {{scoring_rubric_schema}} into programmatic validation functions and scoring constraints.
- Implement a synthetic grant proposal loader supporting a batch size of {{grant_application_sample_size}}.
- Build citation-grounding verifiers that map agent evaluations back to verbatim clauses in {{funding_guidelines_doc}}.
- Develop an automated hallucination detection module that flags ungrounded scoring penalties or fabricated claims.
- Calculate intra-rater scoring variance across identical repeated inputs to measure output determinism.
- Evaluate score distributions against {{hallucination_tolerance_rate}} to generate automated pass/fail flags.
- Implement serialization logic exporting results directly into {{telemetry_export_format}}.
Constraints
- MUST implement deterministic assertion checks that fail if hallucination rate exceeds {{hallucination_tolerance_rate}}.
- MUST NOT introduce non-deterministic external network calls inside the scoring assertion loop.
- All code must include modular functions with explicit type hinting.
- Output telemetry must strictly conform to the specifications of {{telemetry_export_format}}.
Output format
Deliver an end-to-end evaluation script containing:
- Environment Setup & Dependency Imports.
- Schema Definition & Rubric Validator Module (matching {{scoring_rubric_schema}}).
- Grounding & Hallucination Assessment Engine.
- Benchmark Execution Pipeline with {{telemetry_export_format}} export handler.
Self-review
- Does the script verify strict alignment with {{funding_guidelines_doc}}?
- Are variance and hallucination thresholds mathematically explicit?
- Is the telemetry export schema valid and free of undefined keys?
Explicit role, a named task, and discrete steps the model can follow.
Background, inputs and variables the model needs before it starts.
Hard boundaries — what the model must and must not do.
A named, field-level shape for the response.
Ordered work items that force analysis before an answer.
Length and structure that travel across frontier models.
Signal density — instruction weight without padding.
Documented variables so the scaffold adapts to new inputs.
Quality bar, assumptions and behaviour when inputs are thin.
How much real usage the template has behind it.