AI That Plays Nice: Building a Privacy-First Grant Review Tool in Django
Speaker: Lionel Jouvet
How do you actually bring LLM-powered analysis into a Django app without giving up control, privacy, or trust? We built a real production tool for university research administrators, and this talk walks through how we did it: dedicated worker processes for long analysis jobs, Server-Sent Events for live progress updates, LLM integration that works with local or or EU providers (Mistral), solid PDF section detection, and AI output that’s editable, not gospel. It’s a practical look at pairing Django’s strengths with modern AI tooling, the responsible way.
Abstract
At SDU, we built a Proposal Feedback Tool to help research-support staff and scientists get fast, consistent AI-assisted feedback on grant proposals. The catch? We didn’t want to lose human judgment, institutional context, or control over where the data lives. This talk is about the Django architecture that made that balance possible.
Here’s what we’ll dig into:
-
Web/worker separation. Long-running LLM analysis doesn’t belong in a web request; it’ll just time out or lock things up. So we run it in a dedicated Django management-command worker instead. When someone reloads the page or comes back later, the browser reattaches to the in-progress job via Server-Sent Events. No duplicate work, no lost progress.
-
Provider abstraction. Not every analysis needs the same horsepower. Sometimes local Ollama inference makes sense for privacy or cost. Sometimes you need the Mistral cloud API for better OCR or speed. We built it so each analysis can pick the right tool for the job.
-
Resilient document processing. Grant proposals come in all shapes: some well-structured, some a mess. We combined section-detection heuristics with configurable pattern matching, added a verification UI so humans can double-check the machine’s work, and built a full-document fallback for shorter proposals that don’t need fancy parsing.
-
Structured LLM outputs. AI-generated prompts, personas, and configs are only useful if they’re predictable. JSON mode and validation keep things from going sideways.
-
Human-in-the-loop design. This is the part we care about most. AI output stays fully editable, but we always preserve the original result. Trust isn’t something you assume, it’s something you earn, one transparent interaction at a time.
-
Schema-portable persistence. We built custom dump/load tooling on top of Django fixtures and natural keys, so backup and restore stays safe even as the schema evolves.
You’ll walk away with patterns you can actually reuse, whether you’re building for grant proposals, legal docs, or anything else where AI needs to assist, not replace, human judgment.
About Lionel
TBD