Giskard LLM Testing: How to Scan Language Models for Hidden Risks

Giskard LLM Testing: How to Scan Language Models for Hidden Risks

Giskard LLM testing is an open-source way to scan a language model system for performance, bias and security problems before users meet them. It treats model quality like software quality: you run a set of checks, read the failures, and fix the worst ones first. The central question is simple: what could go wrong with this system in real use? Giskard answers it by generating test cases automatically and reporting the issues it finds, rather than waiting for a user to discover them in production.

Most teams test a language model by trying a handful of prompts by hand. That approach misses edge cases, because a model that answers ten friendly questions well can still fail on a reworded question, a loaded prompt, or a request that touches sensitive data. Giskard LLM testing widens the net. It probes the system with many variations, checks the outputs against defined risks, and turns the results into a test suite that can be run again after every change.

Key takeaways

  • Giskard LLM testing scans language model systems for performance, bias and security issues.
  • It generates test cases automatically, so teams do not have to write every edge case by hand.
  • Its checks cover hallucinations, harmful content, prompt injection, robustness and sensitive data disclosure.
  • Scan results can become a repeatable test suite that runs in continuous integration.
  • It works best alongside other evaluation methods, not as a replacement for human review.

What is Giskard LLM testing?

Giskard is an open-source Python library for testing and evaluating machine learning systems, including systems built on large language models. It was designed by machine learning engineers who wanted the same kind of testing discipline for models that software teams already use for code. The library works with different models and environments, and it integrates with common tools in the machine learning ecosystem.

The core idea is a scan. You describe your model or agent, and Giskard probes it with generated inputs, looking for vulnerabilities. The scan reports each issue with examples of the inputs that triggered it, so you can see exactly what went wrong instead of reading a vague score. That makes the results easier to act on than a single benchmark number.

How the scan works

A Giskard scan starts with a description of the system under test. For a language model application, that might be a chatbot, a retrieval-augmented generation system, or a multi-step agent. Giskard then generates a set of test inputs designed to expose weaknesses, runs them through the system, and examines the outputs.

The scan looks for patterns rather than checking one answer at a time. It might rephrase a question to see whether the answer changes, insert a misleading instruction to see whether the model follows it, or ask about a sensitive topic to see whether the model produces harmful or biased content. Each probe is small, but together they cover far more ground than manual testing.

What Giskard checks for

The issues Giskard looks for fall into a few broad groups. Performance problems include hallucinations, where the model states something false with confidence, and contradictions, where it gives different answers to the same question asked in different words. These matter most when the system is expected to be factual, such as a support assistant that answers questions about a product or a policy.

Security problems include prompt injection, where hidden instructions in user input or retrieved documents try to steer the model, and sensitive information disclosure, where the model reveals data it should not share. These are especially important for systems that read documents from untrusted sources or that have access to private information. Our guide to indirect prompt injection explains why instructions hidden in retrieved text are such a stubborn risk.

Fairness problems include stereotypes and discrimination, where the model treats people differently based on characteristics such as gender or ethnicity. Robustness problems cover cases where small changes to the input, such as typos or rephrasing, cause large changes in the output. A system that is robust gives similar answers to similar questions, even when the wording is not identical.

Hallucinations and factual errors

Hallucination is one of the most common reasons teams adopt Giskard LLM testing. A model can produce a fluent, confident answer that is simply wrong, and a human reader may not notice. Giskard probes for this by asking questions where the correct answer is known, or by checking whether the answer stays grounded in the documents the system was given. Best for: retrieval-augmented generation systems and any assistant that must stay close to source material.

Grounding checks are particularly useful for retrieval systems. If the retrieved documents do not contain an answer, a good system should say so rather than inventing one. Testing this behaviour deliberately, with questions that have no answer in the documents, reveals whether the system hallucinates under pressure.

Bias and harmful content

Bias testing asks whether the system treats comparable cases comparably. Giskard generates variations of a prompt that differ only in a demographic detail, then compares the outputs. Large differences suggest the model is leaning on stereotypes rather than on the facts of the case. Best for: systems that make recommendations about people, such as screening, summarising, or ranking.

Harmful content testing checks whether the system refuses, or fails to refuse, requests for dangerous or abusive material. This is not about a single blocked prompt. It is about whether the refusal holds up across rewordings, role-play framings, and indirect requests that try to work around the guardrails.

Prompt injection and jailbreaks

Prompt injection testing tries to make the model follow instructions that came from the user or from retrieved data instead of from the system. Giskard generates adversarial inputs that attempt this, including instructions hidden in documents and requests framed as hypotheticals. Best for: agents with tool access, systems that read web pages or files, and any application where user input reaches the model alongside trusted instructions.

The value of this testing is that it finds weaknesses before an attacker does. A single successful injection in testing is a warning, not a verdict: it shows where the system needs stronger separation between instructions and data, or where a tool call needs a human check. See our guide to AI agent testing for how to evaluate agents that take actions, not just produce text.

Giskard for retrieval-augmented generation

Retrieval-augmented generation, or RAG, adds a second thing to test: the retrieval step. A RAG system can fail because it retrieves the wrong documents, because it ignores the documents it retrieved, or because it mixes retrieved facts with invented ones. Giskard’s RAG evaluation approach generates test questions from the knowledge base itself, along with reference answers and reference context, and then scores the system on each part.

This component-level view matters. If the overall answer is wrong, you need to know whether the retriever or the generator is at fault, because the fix is different in each case. A retriever problem calls for better chunking or ranking, while a generator problem calls for a better prompt or a stricter grounding instruction. Our guide to RAG hallucination testing covers how to catch answers that drift away from their sources.

Comparing Giskard with other approaches

Approach How it works Main strength Main limitation
Giskard scan Automatically generates adversarial test cases and reports issues Finds problems you did not think to test for Needs review to separate real risks from false alarms
Manual prompt testing A person tries prompts and reads the answers Good judgement on subtle cases Slow, and misses edge cases
Benchmark suites Fixed public test sets with known answers Comparable scores across models May not reflect your own use case
LLM-as-a-judge Another model scores the outputs Scales to many outputs The judge can share the model’s blind spots
Production monitoring Checks live traffic for failures Catches real user problems Finds problems after users have seen them
A laptop showing a checklist with coloured pass and fail markers beside a notebook
A scan is only useful if its findings become a repeatable checklist: each failure should turn into a test that runs again after every change.

Turning scan results into a test suite

The most useful thing a scan produces is not the report, but the test suite that follows from it. Giskard can generate a test suite from the issues the scan found, turning each problem into a concrete test that can be run again. That suite can then be extended with domain-specific tests written by the team, covering risks that only they know about.

Once a test suite exists, it can run in continuous integration, so every change to the prompt, the model, or the retrieval setup is checked before it ships. If a change breaks a test that used to pass, the team finds out in the pipeline rather than from a user complaint. This is the same discipline software teams use for code, applied to model behaviour.

Where Giskard fits in a testing workflow

Giskard works best early in development and again before a release, when a scan can still change the plan. A clean scan is not a permanent guarantee, because models, prompts and documents change, so re-running the suite matters.

Limitations to keep in mind

Automated scans produce false positives, and a flagged output may be a quirk of the test rather than a real risk. Read the examples, decide which ones matter, and record the decision.

Giskard LLM testing checklist

  • Describe the system under test, including its tools, data sources and intended users.
  • Run a scan early, before the design is locked in, and read the example outputs.
  • Sort findings by risk to your use case, not by count alone.
  • Turn the important findings into a repeatable test suite.
  • Add domain-specific tests based on real user questions and real failures.
  • Run the suite in continuous integration on every prompt or model change.
  • Re-scan after major changes and monitor live traffic for new failure modes.
  • Record which findings you accepted and why, so they are not re-debated.
  • Pair the scan with human review for subtle quality and safety judgements.
  • Compare candidate models on the same suite, test by test, before choosing.

Frequently asked questions

What is Giskard LLM testing used for?

It is used to scan language model systems for performance, bias and security issues before they reach users. The scan generates test cases automatically, reports the problems it finds with examples, and helps teams turn those findings into a repeatable test suite.

Is Giskard open source?

Yes. Giskard is an open-source Python library, and its core testing and scanning components are available for teams to use and inspect. There is also a hosted hub for comparing models and debugging test results, which is a separate offering from the library itself.

Does Giskard work with retrieval-augmented generation?

Yes. Giskard can generate evaluation data from a RAG system’s knowledge base and score the system on each component, including retrieval and generation. That helps teams tell whether a wrong answer came from bad retrieval or from the model ignoring good retrieval.

Can Giskard replace manual testing?

No. It finds problems at a scale manual testing cannot match, but it cannot judge subtle quality, tone, or context the way a person can. It also produces false positives that need human review. The strongest setup pairs automated scanning with human judgement on the findings that matter.

How is Giskard different from a benchmark?

A benchmark runs a fixed public test set and produces a comparable score. Giskard generates tests tailored to your system and reports specific issues with examples. Benchmarks are useful for comparison across models, while Giskard is useful for finding the risks in your own application.

When should I run a Giskard scan?

Run one early in development, again after major changes to the prompt, model, or data, and before a release. Running the resulting test suite in continuous integration keeps the checks going between scans, so regressions are caught as soon as they appear.

Latest articles

Scroll to Top