Project Story: The Journey of Konya

What Inspired Us

Public and social support systems are meant to be lifelines. However, for an individual navigating a personal or financial crisis, the very systems designed to help them often feel like a maze. Crucial eligibility criteria are routinely buried inside long, confusing PDFs or fragmented across government web pages written in dense legal prose. People miss out on support they legally qualify for simply because the application entry barrier is too high.

Living and working in contexts where community support is vibrant but formalized social infrastructure is confusing, we wanted to build a tool that gives power back to the individual. This inspired Konya—a web-based Bring Your Own Policy (BYOP) social-policy navigator. We didn’t want to build just another rigid, out-of-date resource directory. We wanted an empathetic, localized companion that reads the exact policy a user finds, translates it, and breaks it down into a clear, dignified path from confusion to action.


How We Built It

We engineered Konya using a multi-agent, phased pipeline architecture rather than relying on a single, unpredictable chatbot loop.

  • The Core Stack: The platform is built on Django 5.2 paired with SQLite for lightweight, robust local development. The user interface utilizes Tailwind CSS for a clean, minimalist, and responsive user flow.
  • The AI Intelligence Layer: We integrated Featherless AI using the OpenAI-compatible chat completions API to power our reasoning models. Our default engine is meta-llama/Meta-Llama-3.1-8B-Instruct.
  • The Pipeline Architecture: To ensure high reliability, we isolated tasks into discrete agents:
  • Phase 1 (Gatekeeper): Evaluates user-submitted URLs or documents via Python parsing tools (pypdf, python-docx, BeautifulSoup4) to ensure topical relevance before any processing happens.
  • Phase 2a (Planner): Extracts strict eligibility conditions into a structural JSON state.
  • Phase 2b & 2c (Extractor & Interviewer): A non-LLM, fully translatable Speaker asks focused questions. As the user replies in plain language, the Extractor LLM updates the underlying checklist.
  • Phase 2d (Guide Generator): Once the checklist is resolved, it compiles a beautifully structured Action Blueprint in Markdown, breaking down the final conclusion, preparation lists, and immediate next steps.

Local Authenticity & Inclusion

A key pillar of our build was localization. Konya features full internationalization (Django gettext), translating both the web interface UI and the AI-generated responses into English, Kiswahili, and Sheng (Kenyan urban mixed language). This brings essential policy understanding straight to the communities that need it most, in the exact language they speak.


Challenges We Faced

Building a reliable system under strict real-world constraints forced us to tackle several distinct hurdles:

  1. Managing Hallucination in High-Stakes Contexts: Letting an LLM read open-ended text and give eligibility advice runs a massive risk of misinformation. We solved this by implementing an uncompromising BYOP Grounding Guardrail. The AI is strictly sandboxed via system prompts to only reason using the cached text of the user's uploaded document. If a user asks a follow-up question outside the scope of that document, the system triggers a localized, safe refusal.

  2. Deterministic UX vs. Stochastic AI: We noticed early on that letting an LLM generate conversational follow-up questions led to erratic, shifting user experiences. Our breakthrough was decoupling the Speaker from the Extractor. By using traditional code logic to loop through the missing JSON checklist points and feed them into pre-translated templates, we kept the interface completely predictable and stable while leveraging the AI purely for data parsing.

  3. Handling Rejection Gracefully: If a user uploaded an incorrect or corrupt document, generic error screens caused frustration. We designed an escalating Rejection UX workflow that keeps the conversation active, presenting custom resubmit cards with specific, contextual guidance on how to find a better policy page rather than trapping the user in a broken loop.


What We Learned

This hackathon was an incredible masterclass in engineering for user stress and designing around real-world constraints.

  • The Power of Multi-Agent Specialization: We learned that chaining smaller, low-temperature LLM tasks together with strict JSON constraints ($T \in [0.1, 0.3]$) yields vastly superior accuracy and system debuggability compared to single, broad-prompt chat systems.
  • Responsible AI is a Core Design Choice: Guardrails are not something you slap onto an application at the very end. Designing the human-in-the-loop architecture—ensuring that Konya acts purely as an assistive interpreter while leaving final verification and application control strictly in human hands—fundamentally shaped how our entire backend state machine was built.

Konya proves that when you give people clarity and break down overwhelming walls of text into structured, actionable blueprints, you transform confusion directly into confident real-world action.

Built With

Share this project:

Updates