AI Explainability Card Generator
The AI Explainability Card Generator was a tool designed to create comprehensive, easy-to-understand explanations of AI models and systems. In an era where AI is becoming increasingly prevalent and complex, there's a growing need for clear, accessible explanations of how these systems work, both for technical stakeholders and for end-users. This project aimed to bridge that gap by automatically generating two types of explainability cards: one for customers and another for internal stakeholders.
The Problem: Explaining AI Systems
As AI systems become more complex and prevalent, there's a growing need for clear explanations of how these systems work. The challenge is that AI documentation is often either too technical for non-technical audiences or too simplified for stakeholders who need detailed information. There was no standardized, efficient way to create comprehensive explainability documentation that could serve both audiences.
AI Explainability Cards, inspired by AI Model Cards, aim to bridge the gap between technical complexity and user understanding. They provide a standardized format for communicating key aspects of AI systems to both technical and non-technical audiences. However, creating these cards manually was time-consuming and often inconsistent.
The Solution: Automated Card Generation
By leveraging the power of large language models and document analysis, this tool could take in various sources of information about an AI system - be it GitHub repositories, technical documents, or other uploaded files - and distill that information into concise, tailored explanations. This saved time for AI developers and product managers while ensuring consistency and comprehensiveness in how AI systems were explained and documented.
The system accepted input through GitHub repository URLs or uploaded document files (PDFs, DOCX, etc.). It then used advanced language models to extract and synthesize relevant information, automatically generating two types of cards: a customer-facing explainability card focusing on high-level explanations and user-centric information, and an internal stakeholder explainability card providing more technical details and implementation specifics.
Both cards were displayed in a user-friendly web interface built with Streamlit and could be downloaded as DOCX files for easy sharing and integration into existing documentation workflows.
See It In Action
You can watch a demo of the AI Explainability Card Generator in action in this video:
Want to see the code? You can find it on GitHub.
How It Worked
The AI Explainability Card Generator operated through a series of steps to process input data and generate explainability cards.
Input Collection
The system accepted input in two forms: GitHub repository URLs and uploaded document files (PDFs, DOCX, etc.). This flexibility allowed users to generate cards from their existing codebases or documentation without needing to restructure their information.
Content Extraction and Analysis
For GitHub repositories, the tool used the GitHub API to pull both public and private repositories. It then parsed markdown and transformed it into a format suitable for analysis. For uploaded documents, it used appropriate libraries to extract the content. The extracted content was then analyzed using a large language model to identify key aspects of the AI system, such as its purpose, functionality, data usage, and potential impacts.
Card Generation
Using complex prompts (lines 44-156 of main.py), the system generated consistent outputs that took highly technical documentation and transformed it into something the average person could understand. The prompts were carefully crafted to ensure that customer-facing cards focused on user-centric information while internal stakeholder cards provided the technical depth needed by development teams.
Output and Distribution
The generated cards were displayed in the web interface and could be downloaded as DOCX files. This made it easy to share the cards with stakeholders, integrate them into existing documentation systems, or modify them further if needed.
Key Features
The AI Explainability Card Generator included several key features that made it a powerful tool for AI documentation:
- Dual Card Generation: Created both customer-facing and internal stakeholder explainability cards from a single input source.
- Multiple Input Sources: Accepted GitHub repositories and various document formats, providing flexibility in how information was provided.
- LLM-Powered Analysis: Utilized advanced language models to extract and synthesize relevant information automatically.
- User-Friendly Interface: Built with Streamlit for an intuitive, easy-to-use web application that required no technical expertise to operate.
- Downloadable Outputs: Generated downloadable DOCX files for easy sharing and integration into existing documentation.
- Customizable Templates: Used predefined templates that could be easily modified or expanded based on organizational needs.