Inspiration

After looking at the problem statement, we realized that non-profit organizations often miss out on vital funding simply because the "OurSG Grants" portal is vast, constantly changing, and difficult to navigate. Manually clicking through hundreds of listings, downloading attachments, and cross-referencing eligibility criteria against specific internal initiatives was a massive drain on resources.

We wanted to build a system that didn't just find data, but understood it. The goal was to transform a passive list of URLs into an active intelligence system that answers one specific question: "How well does this grant align with our specific initiative beyond just grant amounts?"

What it does

The Grants Analyser is an intelligent pipeline that automates the entire grant-seeking lifecycle:

  • Automated Discovery: It autonomously browses the OurSG Grants portal, identifying new and open grant calls.
  • Two-Phase AI Filtering:
    • Phase 1 (The Sieve): A lightweight AI pass filters grants based on a high-level "Preliminary Rating," discarding irrelevant options immediately to save costs and time.
    • Phase 2 (The Deep Dive): For the shortlisted grants, the system visits the detail pages, recursively scrapes sub-links, and downloads all attachments (PDFs, DOCX).
  • Smart Analysis: It uses Google Gemini to read through complex documentation and generates a "Match Rating" (how well it fits) and an "Uncertainty Rating" (how vague the criteria are) along with explanations for each rating.
  • Dashboarding: It presents the results in a clean Next.js dashboard, allowing users to focus only on high-potential opportunities.

How we built it

We architected a decoupled system to leverage the best tools for each job:

  • Backend: Built with FastAPI and Python. We used Playwright for the heavy-duty browsing because simple HTML parsers fail on dynamic government portals.
  • Database: We used Supabase (PostgreSQL), managed via Alembic migrations for robust schema control.
  • AI Engine: We integrated Google Gemini 3 Pro via structured JSON output to ensure our data is always machine-readable.
  • Frontend: A reactive Next.js application using Tailwind CSS and Shadcn UI for a professional, accessible interface.
  • File Processing: We containerized a headless version of LibreOffice to auto-convert legacy .doc and .docx grant files into PDFs that the AI could easily ingest.

Challenges we ran into

  • Deciphering "Good Match" Ambiguity: Translating human intuition into logic was difficult. We had to break the vague concept of a "match" into concrete dimensions—financial eligibility, grant intent, etc.—to create precise prompts that turned a vague recommender into an accurate matcher.
  • The "Organization vs. Initiative" Trap: Early tests failed because the AI focused too much on the Organization's general mission rather than the specific Initiative. We had to rigorously refine our prompts to ensure the Initiative's goals were the primary constraint, preventing generic matches that didn't fit the specific project.

Accomplishments that we're proud of

  • Recursive Deep Scraping: Our scraper doesn't just look at the landing page; it recursively dives N levels deep into links found within the grant description, ensuring we capture context buried in sub-pages. This in turn boosts our accuracy in finding grants that truly aligned the organization's mission and its initiatives, but also in identifying grants that have requirements that the organizations' specific initiatives are well-suited to meet.
  • The "Uncertainty" Metric: We moved beyond simple "match percentages" to provide a trust score, giving users confidence in the AI's output.

What we learned

  • Context is King: We learned that passing the Organization's Mission alongside the Initiative's Goals drastically improved the AI's matching accuracy compared to passing the Initiative details alone.

What's next for Chefs

The following are some of the ideas we have in mind for the future:

  • Automated Application Drafting: Since the system already knows the Grant's questions and the Initiative's details, the next logical step is to have the AI draft the actual grant proposal document.
  • Email Alerts: Implementing a "Watchlist" feature where users get notified instantly when a new grant matching their specific criteria is published.

Built With

Share this project:

Updates