genai-testing

Evaluate LLM outputs for hallucinations, bias, instruction compliance, and OWASP security risks.

Updated Aug 31, 2026
One-click install
npx skills add https://github.com/ahuaracab/test-genesis --skill genai-testing-ahuaracab
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: genai-testing
Source: https://github.com/ahuaracab/test-genesis/tree/main/.agents/skills/genai-testing
Command: npx skills add https://github.com/ahuaracab/test-genesis --skill genai-testing-ahuaracab

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Testing AI and LLM outputs is hard because responses are non-deterministic and can hallucinate, leak data, show bias, or ignore instructions. This Skill provides a structured framework to plan, implement, and grade AI output evaluations with measurable metrics instead of subjective judgment. ## Core Features & Use Cases - Nine evaluation metrics: Four OWASP LLM security metrics (prompt injection, sensitive info disclosure, excessive agency, unbounded consumption) plus five quality metrics (hallucination, instruction following, bias, confidence score, custom rubric). - Provider-agnostic adapter pattern: Swap between Claude, OpenAI, or custom LLM backends via configuration without changing test code, using the @evalCase decorator that extends existing @atc tests. - Layered cost model: Run free mocked checks on pull requests, cheap cached grading in CI, and full LLM evaluation for nightly or production sampling. - Use Case: A team shipping a RAG chatbot uses the skill to verify every response cites sources faithfully, resists prompt injection, and scores above 70% on a custom faithfulness rubric before release. ## Quick Start Ask the AI to plan and implement an evaluation for your chatbot using the genai-testing skill, starting with hallucination and instruction-following metrics.

Frequently Asked Questions about genai-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I test an LLM chatbot for hallucinations?

Use the hallucination metric with the HallucinationDetector provider, passing the LLM output and a context string of source documents. It returns a faithfulness score from 0 to 1 plus a count of unsupported claims, with scores below 0.8 flagged for review.

How do I detect bias in AI model outputs?

Run the BiasDetector with demographic test variants covering gender, ethnicity, disability, and age. It compares tone variance and detects stereotype patterns across variants, returning a bias score and fairness gap percentage.

Can I use this with OpenAI instead of Claude?

Yes, the EvaluationAdapter is provider-agnostic. Set GENAI_PROVIDER=openai in your .env file and implement an OpenAIEvaluationAdapter subclass; the metrics and test code remain unchanged.

What OWASP LLM risks does this cover?

It implements testable metrics for prompt injection, sensitive information disclosure, excessive agency, and unbounded consumption. Supply chain and plugin risks (LLM05, LLM07) are reference-only since they require dependency audits rather than output evaluation.

How do I handle non-deterministic LLM evaluation results?

Run critical metrics like hallucination and bias three to five times, then report the average with a 95% confidence interval. Lower the model temperature to 0.2 and fix the seed for release gates to improve repeatability.

How much does LLM evaluation cost in CI?

Cost depends on the selected layer: Layer 1 mocked checks are free for pull requests, Layer 2 costs about $0.01 per evaluation for CI, Layer 3 costs $0.05-0.10 for nightly runs, and Layer 4 costs $1-5 for production audits.