# How to Configure the Hiring Agent for Development

> Learn how to configure the Hiring Agent for development by setting DEVELOPMENT_MODE True, adding LLM credentials, installing dependencies, and running the Python script to generate cached JSON payloads and CSV logs.

- Repository: [HackerRank/hiring-agent](https://github.com/interviewstreet/hiring-agent)
- Tags: how-to-guide
- Published: 2026-06-28

---

**Set `DEVELOPMENT_MODE = True` in [`config.py`](https://github.com/interviewstreet/hiring-agent/blob/main/config.py), configure your `.env` file with LLM credentials, install dependencies from [`requirements.txt`](https://github.com/interviewstreet/hiring-agent/blob/main/requirements.txt), and run `python score.py <pdf>` to generate cached JSON payloads and a `resume_evaluations.csv` log.**

The Hiring Agent from `interviewstreet/hiring-agent` supports a development configuration that preserves intermediate results and caches expensive API calls. This mode accelerates iteration when tuning prompts or switching LLM providers by writing evaluation logs to CSV and storing conversion results in local JSON caches.

## Enable the Development Flag

In [`config.py`](https://github.com/interviewstreet/hiring-agent/blob/main/config.py), set the boolean flag that controls caching and export behavior:

```python

# config.py

DEVELOPMENT_MODE = True  # enables caching and CSV export

```

When active, this flag instructs [`score.py`](https://github.com/interviewstreet/hiring-agent/blob/main/score.py) (lines 95–96 in the source) to write the evaluation CSV and cache JSON results after each run. Disabling it (`False`) removes these artifacts and forces fresh processing on every execution.

## Configure Runtime Environment

Copy the example environment file to define your LLM backend and model parameters:

```bash
cp .env.example .env

```

Edit `.env` to select between **Ollama** or **Gemini** providers:

```bash
LLM_PROVIDER=ollama
DEFAULT_MODEL=gemma3:4b

# GEMINI_API_KEY=your_key_here  # Required only for Gemini

```

The [`models.py`](https://github.com/interviewstreet/hiring-agent/blob/main/models.py) module instantiates the appropriate client based on these variables, allowing you to swap backends without modifying the pipeline code.

## Install Dependencies

Create a virtual environment and install the required packages listed in [`requirements.txt`](https://github.com/interviewstreet/hiring-agent/blob/main/requirements.txt):

```bash
python -m venv .venv
source .venv/bin/activate  # Windows: .venv\Scripts\activate

pip install -r requirements.txt

```

## Execute the Pipeline

Run the scorer against a PDF resume:

```bash
python score.py path/to/resume.pdf

```

When `DEVELOPMENT_MODE` is `True`, the script automatically writes `resume_evaluations.csv` to the project root and populates the `cache/` directory with intermediate JSON files.

## Verify Development Outputs

Inspect the generated artifacts to confirm caching is active and reusable:

- **CSV Log**: `resume_evaluations.csv` contains a timestamped record of every evaluation.
- **JSON Caches**: Files like `cache/resumecache_<basename>.json` and `cache/githubcache_<basename>.json` store PDF-to-Markdown conversions and GitHub API responses.

These caches prevent redundant processing and API calls during iterative development, allowing you to inspect or reuse data without re-hitting external services.

## Summary

- Set **`DEVELOPMENT_MODE = True`** in [`config.py`](https://github.com/interviewstreet/hiring-agent/blob/main/config.py) to toggle caching and CSV export.
- Configure **`.env`** with `LLM_PROVIDER` and model details to select your backend without code changes.
- Install packages via **[`requirements.txt`](https://github.com/interviewstreet/hiring-agent/blob/main/requirements.txt)** before running the pipeline.
- Execute **`python score.py <pdf>`** to generate caches and evaluation logs automatically.
- Review the **`cache/`** directory and **`resume_evaluations.csv`** to verify intermediate results are persisted.

## Frequently Asked Questions

### What is the purpose of DEVELOPMENT_MODE in the Hiring Agent?

When set to `True`, the flag instructs [`score.py`](https://github.com/interviewstreet/hiring-agent/blob/main/score.py) to write a `resume_evaluations.csv` log and cache JSON payloads in the `cache/` directory. This eliminates redundant PDF processing and GitHub API calls, significantly speeding up debugging cycles when iterating on prompts or extraction logic.

### How do I switch between Ollama and Gemini LLM providers?

Edit the `.env` file (copied from `.env.example`) and set `LLM_PROVIDER` to either `ollama` or `gemini`. For Gemini, you must also provide `GEMINI_API_KEY`. The [`models.py`](https://github.com/interviewstreet/hiring-agent/blob/main/models.py) module reads these variables at runtime to instantiate the correct client without requiring changes to the pipeline code.

### Where are the cached files stored during development?

Cached JSON files are written to the `cache/` directory relative to the project root. You will find `resumecache_<basename>.json` for PDF conversions and `githubcache_<basename>.json` for GitHub enrichment data. The CSV log `resume_evaluations.csv` is written to the root directory.

### Can I disable caching once the development configuration is set?

Yes. Change `DEVELOPMENT_MODE = False` in [`config.py`](https://github.com/interviewstreet/hiring-agent/blob/main/config.py) before running [`score.py`](https://github.com/interviewstreet/hiring-agent/blob/main/score.py). When disabled, the pipeline will not write CSV logs or JSON cache files, and it will re-process PDFs and query the GitHub API on every execution.