Spaces:
Sleeping
Sleeping
| def explainability_report(results): | |
| agencies = {r["agency"] for r in results} | |
| exemptions = set() | |
| for r in results: | |
| exemptions |= set(classify_exemptions(r["snippet"])["codes"]) | |
| return f""" | |
| ## System Explainability Report | |
| **Purpose:** Public FOIA document discovery | |
| **Data Sources:** Public electronic reading rooms | |
| **Agencies Covered:** {', '.join(agencies)} | |
| ### Safety Controls | |
| - Robots.txt enforcement | |
| - Per-agency kill switches | |
| - Redaction detection | |
| - Exemption surfacing | |
| ### FOIA Exemptions Detected | |
| {', '.join(exemptions) or 'None'} | |
| """ |