An AI-powered tool for processing unstructured nonprofit communications into structured entity data, relationship maps, and actionable follow-ups. Built for the hackNY Public Interest Lab, a pro bono program that matches technologists with civic organizations.
Nonprofits drown in unstructured communication: emails from potential partners, intake forms, meeting notes, grant reports. The information trapped in these documents (who works where, who referred whom, what they need, what the timeline is) is exactly what organizations need to manage relationships effectively, but extracting it requires hours of manual data entry.
This is a language problem, and language problems are where AI tools have become genuinely useful.
Paste raw unstructured text (an email, intake form, or meeting notes) and the system:
- Extracts entities (people, organizations, locations, dates, dollar amounts) using local NLP
- Infers relationships (who works where, who referred whom, partnership connections)
- Categorizes the communication (partnership inquiry, funding, technical assistance, etc.)
- Suggests follow-ups (specific next actions based on the content)
The core design principle is backend independence. The system has two processing stages:
+------------------+
| Raw Text |
| (email, form, |
| notes) |
+--------+---------+
|
Stage 1: Local NER
(spaCy, always runs,
free, no data leaves
the machine)
|
+--------+---------+
| Entities |
| {people, orgs, |
| dates, ...} |
+--------+---------+
|
Stage 2: LLM Enhancement (optional)
|
+-------------------+-------------------+
| | |
+------+------+ +------+------+ +-------+-----+
| Claude | | GPT | | Local |
| (Anthropic)| | (OpenAI) | | (spaCy) |
+------+------+ +------+------+ +-------+-----+
| | |
+-------------------+-------------------+
|
+--------+---------+
| Structured |
| Output: |
| relationships, |
| follow-ups, |
| categories |
+------------------+
Why modular? Nonprofits have constraints that tech companies don't:
- Data sensitivity: Client data may require on-premise processing. The local backend never sends data anywhere.
- Budget: API costs matter when you're grant-funded. spaCy is free.
- Vendor independence: Institutional agreements may require specific providers. Swap backends without changing a line of application code.
- Auditability: The ABC pattern means each backend's behavior is testable and inspectable independently.
# Clone
git clone https://github.com/hackNY/pil-intake.git
cd pil-intake
# Install dependencies
pip install -r requirements.txt
python3 -m spacy download en_core_web_sm
# Run (works immediately with local backend, no API keys needed)
streamlit run app.pyTo use Claude or GPT backends, set environment variables:
export ANTHROPIC_API_KEY=sk-ant-... # for Claude
export OPENAI_API_KEY=sk-... # for GPTOr enter API keys in the sidebar at runtime.
pil-intake/
app.py # Streamlit UI
backend/
base.py # LLMBackend abstract base class
claude_backend.py # Anthropic Claude implementation
openai_backend.py # OpenAI GPT implementation
local_backend.py # spaCy-only fallback (no API key needed)
processor/
extractor.py # spaCy NER + entity extraction
pipeline.py # Two-stage orchestration pipeline
examples/
nonprofit_email.txt # Sample partnership inquiry
intake_form.txt # Sample intake form response
meeting_notes.txt # Sample scoping call notes
The hackNY Public Interest Lab connects skilled technologists with civic organizations for focused, finite engagements. This intake processor is infrastructure for that mission: it helps PIL staff and fellows quickly understand incoming nonprofit communications, map the relationship landscape, and identify actionable next steps.
The modular AI architecture reflects PIL's values:
- Nonprofit-first design: Works offline, works free, works without vendor lock-in
- Transparency: Every extraction is inspectable; raw JSON output is always available
- Practical scope: Solves a real workflow problem (intake processing) rather than promising a general-purpose AI platform
MIT
- hackNY: https://hackny.org
- hackNY Public Interest Lab announcement: https://hackny.org/blog/hackny-public-interest-lab