DEV Community

Cover image for A professor couldn't find the right AI tool. So I built a model that isn't allowed to guess.
Hiya Lukka
Hiya Lukka

Posted on AI-assisted

A professor couldn't find the right AI tool. So I built a model that isn't allowed to guess.

Hacktoberfest Weekend Challenge: Build for a Friend Submission 🤝

This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend

What I Built

A tool-finder for a friend of mine who teaches economics and commerce. She needs AI tools for research, note-taking and managing her academic work. The last time she went looking for help with a research paper, she came away confused.

My read is that "research paper" isn't one job. It's finding papers, reading them, managing references, running the numbers and writing, and each of those has different tools. So she types her goal in her own words, and the tool gives her the kinds of work involved, with tools for each.

The key design choice is that the model never names a tool. Asking a language model "which AI tool should I use?" is risky: its memory of tools is dated, and it can name products that don't exist. Here, Gemma 4 only decides which of seven fixed task types her goal involves:

  • Find papers
  • Read
  • References
  • Analyze data
  • Write
  • Notes
  • Teaching and admin

Plain code then looks up tools for those types in a catalog of 21 tools that I wrote by hand.

Demo

It runs on a local model, so there is no hosted link. Screenshots are below.

Code

GitHub logo hiyalukka / ai-tool-guide

Local, open-model helper that tells a non-technical professor which AI tools to use. Runs on Gemma 4 through Ollama.

Which AI tool should I use?

A small local tool built for a professor friend who found it hard to pick AI tools for research, notes and teaching.

She describes her goal in plain words. A local open model (Gemma 4, through Ollama) decides which kinds of work the goal involves. The page then lists tools for each step from a hand-written catalog. The model never names tools itself, so it cannot invent one. Nothing she types leaves her laptop.

demo

Run it

You need Ollama and Python installed.

  1. ollama pull gemma4:e2b
  2. In one terminal: ollama serve
  3. In another terminal, in this folder: python serve.py
  4. Open http://localhost:8000/ai-tool-guide.html

Switch to gemma4:e4b with the dropdown for better answers, but slower.

Limits

  • The tool catalog is written by hand and covers 21 tools, aimed at economics research and teaching. Tool descriptions may go out of date.
  • I did not run a formal evaluation, so…

How I Built It

  • Model: Gemma 4 E2B, run locally through Ollama on a 12 GB student laptop.
  • Structured output: the model's reply is constrained to a JSON schema whose only allowed values are the seven task ids, at temperature 0. That is what makes an invented tool impossible.
  • Catalog: a hand-written array in the page, where each tool is tagged with the task types it serves.
  • Front end: one HTML file.
  • Server: a small Python script that serves the page and forwards requests to Ollama, because browsers blocked the page from calling Ollama directly.
  • Setup: ollama pull gemma4:e2b, then ollama serve, then python serve.py. The repo README has the details.

Why Does Open Innovation Matter?

  • Her data stays with her. Unpublished drafts and student work never go to an API.
  • No internet needed. [Result of your offline test, for example "I turned off wifi and it still worked." If you didn't test it, delete this bullet.]
  • Costs nothing to run. No key and no billing.
  • Swappable and editable. The page has a model dropdown, and the behaviour lives in two things she can change: the task list and the catalog. No vendor decides what gets recommended.
  • Gemma 4 is Apache 2.0. That makes it open-source in the plain sense.

What it cost me

I asked Gemini (Flash, in the Gemini app) for help running a regression on survey data from 300 households in Excel. It suggested Excel's built-in Data Analysis ToolPak, a practical answer that needs no code.

I gave my tool the same question.

My catalog has no Excel entry, so it could not give Gemini's answer. The restriction that stops it from inventing products also stops it from knowing the obvious one. For a non-coder with spreadsheet data, that is a real cost, and it's the main thing I learned.

What I saw

I did not run a formal evaluation, so I won't give accuracy numbers.

For "120 answer sheets to grade this weekend and it's taking forever", it chose one category, teaching and admin, and returned Gradescope and Notion. The model made a single decision: the category. Tools within a category are not ranked, so both appear. That run took 56.4 seconds on E2B, probably including model loading, and I did not measure warm runs.

What's next

  • Add tools she already has, like Excel, alongside the AI tools.
  • Rank tools within a category.
  • Have my friend write 15 of her real requests and label the right answers, then measure it properly.
  • Compare E2B with E4B.

Prize Categories

Best Use of Gemma. Gemma 4 E2B running locally through Ollama.

Top comments (1)

Collapse
 
yashrajrastogi7 profile image
Yashraj Rastogi •

Appreciable idea, will suggest it to me professors