Introduction
Deploying AI agents and machine learning models into production often feels like a gamble. Developers struggle with non-deterministic outputs, hidden biases, and security vulnerabilities like prompt injection that only surface after a user finds them. Giskard is an open-source Python library designed to eliminate this uncertainty by providing a systematic framework for testing and validating AI systems, from traditional tabular models to advanced LLM-based agents. With a strong community presence and extensive integration capabilities, Giskard allows teams to uncover vulnerabilities before they reach the end-user.
What Is Giskard?
Giskard is an open-source Python library that automatically detects performance, bias, and security issues in AI applications. It is designed for ML engineers, data scientists, and security teams who need to ensure their models are robust, fair, and secure. The project is licensed under the Apache License 2.0 and is maintained by Giskard AI.
The framework has evolved into a modular architecture in version 3, moving away from heavy dependencies to focused packages like giskard-checks for evaluation and giskard-scan for vulnerability scanning. This allows developers to wrap any AI system—whether it is a black-box agent, a multi-step pipeline, or a standalone LLM—and apply a rigorous suite of tests to its behavior.
Why Giskard Matters
Traditional software testing relies on assertions where a specific input always produces a specific output. However, AI systems are non-deterministic; the same prompt can produce different valid responses. Giskard fills this gap by introducing “evals”—evaluations that are designed for non-deterministic outputs, allowing developers to verify that a system behaves correctly without requiring a pixel-perfect match.
As enterprises move from simple chatbots to agentic workflows, the surface area for failure increases. Giskard provides the tools to red-team these systems automatically, detecting prompt injections, data leakage, and hallucinations. By automating the detection of these “edge cases,” Giskard reduces the manual effort required for QA and prevents costly reputational damage caused by AI failures in production.
Key Features
- Automated Vulnerability Scanning: Giskard can automatically scan models to identify issues such as hallucinations, harmful content generation, prompt injection, and sensitive information disclosure.
- RAG Evaluation Toolkit (RAGET): A specialized tool for Retrieval Augmented Generation systems that automatically generates evaluation datasets (questions, reference answers, and context) from a knowledge base to assess accuracy and groundedness.
- LLM-as-a-Judge: Leverages other LLMs to evaluate the quality of responses, enabling the assessment of non-deterministic outputs through a set of defined checks.
- Scenario-Based Testing: Allows developers to create complex, multi-turn testing scenarios using a fluent API to simulate real-world user interactions.
- Bias and Fairness Detection: Identifies performance biases across different demographic or categorical groups to ensure equitable model performance.
- CI/CD Integration: Giskard tests can be integrated into automated pipelines, ensuring that any change to the model or prompt results in a regression test that prevents faulty models from being deployed.
- Hugging Face Integration: Through the Giskard bot, the framework can automatically publish vulnerability reports on the Hugging Face Hub every time a new model is pushed.
How Giskard Compares
| Feature | Giskard | Deepchecks | Promptfoo |
|---|---|---|---|
| Open Source | Yes | Yes | Yes |
| Automated Red Teaming | High | Medium | High |
| RAG Evaluation | Dedicated Toolkit | General | Prompt-based |
| Tabular Model Support | Yes | Yes | No |
| CI/CD Integration | Yes | Yes | Yes |
Giskard differentiates itself by offering a unified approach to both traditional ML (tabular) and modern GenAI (LLMs/Agents). While tools like Promptfoo focus heavily on prompt engineering and output validation, Giskard provides a more comprehensive “health check” for the entire AI system, including automated vulnerability scanning that mimics an attacker’s mindset. Deepchecks is a strong competitor in the tabular space, but Giskard’s dedicated RAGET toolkit makes it a superior choice for developers building knowledge-based AI agents.
Getting Started: Installation
Giskard requires Python 3.12 or higher for its latest v3 releases. Depending on your needs, you can install the core library or specific focused packages.
Install Giskard Core
pip install giskard
Install Giskard Checks (for Agent Evaluation)
pip install giskard-checks
Install with LLM Support
pip install "giskard[llm]" -U
Prerequisites: To use LLM-based checks or the vulnerability scanner, you must configure an LLM provider. Giskard supports any LiteLLM-compatible provider (Azure, Anthropic, OpenAI, etc.). For example, to use OpenAI, set the following environment variable:
export OPENAI_API_KEY="your-api-key"How to Use Giskard
The basic workflow in Giskard involves wrapping your existing model or AI system in a Giskard wrapper, creating a dataset for testing, and then running a scan or a test suite. This allows Giskard to interact with your model without requiring you to rewrite your application logic.
First, you define a prediction function that takes a pandas DataFrame and returns a list of outputs. Then, you wrap this function using giskard.Model. Once wrapped, you can run a scan to automatically detect vulnerabilities like hallucinations or bias.
If you are using RAG, you can use the RAGET toolkit to generate a synthetic test set from your documents, which you can then use to evaluate the groundedness of your agent’s responses.
Code Examples
Basic Model Scanning
This example shows how to wrap a simple LLM function and run a vulnerability scan to detect issues like hallucinations and prompt injection.
import giskard
import pandas as pd
# 1. Define the prediction function
def model_predict(df: pd.DataFrame):
# Replace this with your actual LLM call
return ["Answer" for _ in df["question"]]
# 2. Wrap the model
giskard_model = giskard.Model(
model=model_predict,
model_type="text_generation",
name="My AI Assistant",
description="A helpful assistant",
feature_names=["question"]
)
# 3. Run the scan
scan_results = giskard.scan(giskard_model)
# Display results in a notebook
display(scan_results)
RAG Evaluation with RAGET
This example demonstrates how to generate a test set from a knowledge base and use it to evaluate a RAG pipeline.
from giskard.rag import generate_testset, KnowledgeBase
import pandas as pd
# Load your knowledge base
df = pd.read_csv("knowledge_base.csv")
knowledge_base = KnowledgeBase.from_pandas(df, columns=["text"])
# Generate synthetic questions and answers
testset = generate_testset(
knowledge_base,
num_questions=60,
language='en',
agent_description="A customer support chatbot for company X"
)
# Run evaluations against the testset
# (Assuming giskard_model is already wrapped as above)
predictions = giskard_model.predict(testset)
print(predictions.prediction)Real-World Use Cases
- Customer Support Chatbots: Companies use Giskard to ensure their bots don’t provide incorrect guidance or hallucinate product features, preventing customer frustration and legal risk.
- Financial Services Compliance: Banks use Giskard’s bias detection to ensure that loan approval AI doesn’t discriminate based on demographic data, meeting strict regulatory requirements.
- Healthcare AI Diagnostics: Medical AI teams use Giskard to red-team their diagnostic tools to ensure they are robust against adversarial inputs that could lead to incorrect medical advice.
- Enterprise Knowledge Bases: Teams building RAG systems use RAGET to automatically validate that their retrieved context is actually being used to answer questions, preventing “knowledge leakage” or hallucinations.
Contributing to Giskard
Giskard is an open-source project that welcomes contributions from the AI community. You can contribute by submitting bug reports, enhancing documentation, or implementing new checks and evaluation scenarios for LLM-based systems. If you are a developer, you can use the @Check.register("kind") decorator to build and contribute new custom checks to the library.
All contributors are expected to follow the project’s Code of Conduct. For those using coding agents to contribute, the project provides a specific AGENTS.md guide to ensure PRs are maintained correctly.
Community and Support
Giskard maintains a strong ecosystem for support and collaboration. The primary channel for technical discussions and real-time help is the official Discord community. For bug reports and feature requests, the GitHub Discussions and Issues tabs are the best place to start. Detailed technical documentation is available at docs.giskard.ai, which includes comprehensive guides on using the vulnerability scanner and the RAG evaluation toolkit.
Conclusion
Giskard provides a critical layer of safety and reliability for the modern AI stack. By moving beyond simple spot-checks and introducing automated red-teaming and structured evaluations, it allows developers to build AI agents that are actually production-ready. While the transition to v3 has introduced a modular architecture, the core value remains the same: uncovering the hidden failures of AI systems before they do.
If you are building an AI agent or a RAG pipeline, Giskard is the right choice when you need a verifiable way to prove your system is safe and secure. Star the repo, try the quickstart, and join the community to help define the AI quality standards of the future.
What is Giskard and what problem does it solve?
Giskard is an open-source Python library for testing and validating AI models and agents. It solves the problem of non-deterministic AI outputs by providing automated vulnerability scanning and structured evaluations (evals) to detect hallucinations, bias, and security risks like prompt injection.
How do I install Giskard?
You can install Giskard using pip. For the core library, use pip install giskard. For agent evaluation specifically, use pip install giskard-checks. For full LLM support, use pip install "giskard[llm]" -U.
Can I use Giskard for tabular data models?
Yes, Giskard supports both traditional machine learning models for tabular data and modern Large Language Models (LLMs). It can scan for performance biases and data leakage in tabular models as well as hallucinations in LLM agents.
How does Giskard compare to Deepchecks?
While both provide ML validation, Giskard focuses more heavily on adversarial red-teaming and LLM-specific evaluations, particularly through its RAGET toolkit for RAG systems, whereas Deepchecks has deep roots in traditional ML validation.
Does Giskard require an LLM API key?
Yes, for many of its advanced checks and the vulnerability scanner, Giskard uses an LLM-as-a-judge approach. You can configure any LiteLLM-compatible provider (such as OpenAI, Anthropic, or Azure) by setting the appropriate environment variable, such as OPENAI_API_KEY.
Can I use Giskard for RAG evaluation?
Yes, Giskard provides a dedicated RAG Evaluation Toolkit (RAGET) that can automatically generate synthetic test sets from your knowledge base to evaluate groundedness and accuracy.
What license does Giskard use?
Giskard is licensed under the Apache License 2.0, which allows for wide usage, modification, and redistribution of the open-source library.
