Create a Code Interviewer with Gemma and Ollama
Job to be done: Create a mock technical interviewer that analyzes a user's code and asks relevant questions
🇳🇬 Ways to use this in Nigeria
Ideas to get you started, adapt to your situation.
- Student
Practice for a coding interview by having Gemma analyze your Rust or TypeScript project and ask targeted questions.
- 9-5 employee
Prepare for a technical interview by using Gemma to quiz you on your specific project code, not generic concepts.
What you’ll get
You’ll get a personalized technical mock interviewer that runs on your own computer. This tool reads your actual code (specifically Rust or TypeScript), identifies tricky parts, and asks specific questions about them. This approach helps you practice for real-world senior interviews that often focus on your projects, rather than generic textbook questions.
Tools you need
- Ollama (free): A tool that lets you run large AI models directly on your computer, without needing an internet connection after the initial download.
- Gemma (free): An “open-weight” AI model from Google, meaning its core components are publicly available for anyone to use and run locally. It powers the interview questions in this workflow.
- Git (free): A system for tracking changes in computer code and for downloading projects from online platforms like GitHub.
- Node.js (free): A software environment that allows you to run JavaScript code on your computer, which is needed for the
grillapplication. - npm (free): The package manager for Node.js, used to install all the necessary parts (dependencies) for the
grillproject. - Mastra (free): An open-source framework built with TypeScript that helps create AI agents. The
grilltool uses this framework.
Steps
To follow these steps, you will need to use a “terminal” (also called a command prompt or shell) on your computer. This is a program where you type commands instead of clicking buttons.
-
Install Git: Download and install Git from its official website. This tool is essential for downloading the
grillproject code.- What to do: Go to
https://git-scm.com/downloadsand follow the instructions for your operating system (Windows, macOS, or Linux). - What you should see: After installation, open your terminal and type
git --version. You should see the installed Git version number.
- What to do: Go to
-
Install Node.js and npm: Download and install Node.js, which includes npm, from its official website. This is required to run the
grillapplication.- What to do: Go to
https://nodejs.org/en/downloadand download the recommended LTS (Long Term Support) version for your operating system. Run the installer and follow the prompts. - What you should see: Open your terminal and type
node -vand thennpm -v. You should see the version numbers for Node.js and npm.
- What to do: Go to
-
Install Ollama: Download and install Ollama, which will run the Gemma AI model locally on your computer.
- What to do: Go to
https://ollama.com/downloadand download the installer for your operating system. Run the installer and follow the prompts. - What you should see: After installation, open your terminal and type
ollama --version. You should see the installed Ollama version number.
- What to do: Go to
-
Download the Gemma AI model: Use Ollama to download the specific Gemma model needed for
grill.- What to do: In your terminal, type the following command:
ollama pull gemma:2b- What you should see: Ollama will show progress as it downloads the model. Once complete, it will say something like “success”. (Note: The source mentions
gemma3:4b, butgemma:2bis a more common and smaller model that is easier to run on most laptops. If you have a powerful computer, you can trygemma:7binstead.)
-
Clone the
grillproject: Download thegrillapplication code from GitHub using Git.- What to do: In your terminal, type:
git clone https://github.com/yashksaini-coder/grill- What you should see: Git will download the project files into a new folder named
grillin your current directory.
-
Navigate to the project folder: Change your current location in the terminal to the
grillproject folder.- What to do: Type:
cd grill- What you should see: Your terminal prompt will change to show that you are now inside the
grilldirectory.
-
Install project dependencies: Install all the additional software packages that
grillneeds to run.- What to do: Type:
npm install- What you should see: npm will download and install many packages. This may take a few minutes. You should see a message indicating successful installation, possibly with some warnings.
-
Build the project: Compile the
grillapplication so it’s ready to run.- What to do: Type:
npm run build- What you should see: The build process will run, and you should see messages indicating that the project was successfully built.
-
Link
grillglobally: Make thegrillcommand available from any folder in your terminal.- What to do: Type:
npm link grill- What you should see: A message confirming that
grillhas been linked, making it accessible as a command.
-
Ingest your code repositories: Tell
grillwhich of your GitHub projects to analyze for interview questions. Replace[your-github-username]/[repo-name]with your actual GitHub username and repository name.- What to do: Type the command, using a public repository you want to practice with. For example, to ingest the
micclirepository from userAkashJana18:
grill ingest AkashJana18/miccliYou can add more repositories by running
grill ingestagain with different paths.- What you should see:
grillwill process the repository, scanning for lines of code that are likely to be interview topics. It will report how many “spots” (potential question areas) it found.
- What to do: Type the command, using a public repository you want to practice with. For example, to ingest the
-
Start a mock interview session: Begin your practice interview.
- What to do: Type:
grill startBy default, this will ask 5 questions. You can specify the number of questions (
-n) and the language (--lang) if you ingested multiple types of code. For example, to ask 3 Rust-only questions:grill start -n 3 --lang rust- What you should see:
grillwill present a code snippet from your ingested repositories and ask a question about it. You can type your answer, and it will provide a follow-up question and a grade.
-
View your weak spots: After a few sessions,
grillcan show you areas where you struggled.- What to do: Type:
grill report- What you should see:
grillwill display a map of your weak spots, helping you focus your study.
Original source
This workflow was created by yashksaini and shared on the DEV Community blog. It was a submission for the Hacktoberfest Weekend Challenge, built to help a friend prepare for technical interviews by analyzing their actual code.
Notes & variations
- Common mistake: A frequent error is forgetting to install all the prerequisites (Git, Node.js, Ollama) before trying to set up
grill. Make sure each installation step is completed and verified before moving on. Also, ensure you have pulled the Gemma model usingollama pull gemma:2b. - Tip for better results: Start by ingesting one of your smaller, simpler public repositories to get familiar with the process. Once you understand how
grillworks, you can add more complex projects. Pay close attention to thegrill reportto identify patterns in your weak areas and focus your learning there. - Free-tier viability: This entire workflow is designed to run locally on your computer using free, open-source tools. There are no paid tiers or credit systems involved, making it completely free to use after the initial setup.