# Expected Input Format for evaluator.py in InterviewStreet's Hiring Agent

> Learn the expected input format for evaluator.py in InterviewStreet's Hiring Agent. Understand how to pass candidate resume text to the evaluate_resume() method.

- Repository: [HackerRank/hiring-agent](https://github.com/interviewstreet/hiring-agent)
- Tags: api-reference
- Published: 2026-07-15

---

**The [`evaluator.py`](https://github.com/interviewstreet/hiring-agent/blob/main/evaluator.py) module expects a single plain-text string containing the full content of a candidate's resume, passed to the `evaluate_resume()` method as the `resume_text` argument.**

The [`evaluator.py`](https://github.com/interviewstreet/hiring-agent/blob/main/evaluator.py) file in the `interviewstreet/hiring-agent` repository defines the `ResumeEvaluator` class, which powers AI-driven resume screening. Understanding the expected input format for [`evaluator.py`](https://github.com/interviewstreet/hiring-agent/blob/main/evaluator.py) is essential for integrating this component into your hiring pipeline, as the system processes raw textual data rather than structured documents or binary files.

## The Core Input: Plain Text Resume

The primary entry point for resume evaluation is the **`evaluate_resume`** method in [`evaluator.py`](https://github.com/interviewstreet/hiring-agent/blob/main/evaluator.py). This method accepts exactly one required positional argument:

- **`resume_text`** (`str`): The complete textual content of the candidate's resume.

When you call `evaluate_resume(resume_text)`, the implementation immediately stores the raw string in `self._last_resume_text` for internal reference. This string is then injected into the prompt templates without modification, which means the system expects clean, extractable text—such as content you would copy-paste from a PDF or Word document—rather than file paths, base64-encoded data, or JSON objects.

No additional structure, markup, or metadata wrappers are required. The LLM handles the unstructured text and extracts relevant evaluation criteria based on the rendered prompts.

## Optional Configuration Parameters

While the resume content itself must be a plain string, the **`ResumeEvaluator`** class accepts optional initialization parameters that control the underlying LLM behavior. These are defined in the class constructor and referenced from [`prompt.py`](https://github.com/interviewstreet/hiring-agent/blob/main/prompt.py):

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `model_name` | `str` | `DEFAULT_MODEL` (imported from [`prompt.py`](https://github.com/interviewstreet/hiring-agent/blob/main/prompt.py)) | Specifies the LLM identifier (e.g., `"gpt-4o"`, `"gemini-1.5-flash"`) used for evaluation. |
| `model_params` | `dict` | `MODEL_PARAMETERS[model_name]` or `{"temperature": 0.5, "top_p": 0.9}` | Dictionary of inference settings including temperature and sampling parameters. |

These parameters affect how the resume text is processed by the model but do not change the input format of the resume itself.

## How the Input is Processed

Once you pass the resume text to `evaluate_resume`, the method executes a structured pipeline defined across several modules:

1. **Storage**: The raw `resume_text` is cached in `self._last_resume_text`.

2. **Prompt Rendering**: The method calls the template manager from [`prompts/template_manager.py`](https://github.com/interviewstreet/hiring-agent/blob/main/prompts/template_manager.py) to render the `resume_evaluation_criteria` template, substituting the resume text into the prompt.

3. **System Context**: It retrieves the `resume_evaluation_system_message` template to establish the LLM's evaluation persona.

4. **LLM Invocation**: The code in [`evaluator.py`](https://github.com/interviewstreet/hiring-agent/blob/main/evaluator.py) constructs a chat payload containing the system message, the user prompt (with embedded resume text), and the `model_params`. This is sent via `initialize_llm_provider` from [`llm_utils.py`](https://github.com/interviewstreet/hiring-agent/blob/main/llm_utils.py).

5. **Response Parsing**: The method expects a JSON-encoded string representing an **`EvaluationData`** object (defined in [`models.py`](https://github.com/interviewstreet/hiring-agent/blob/main/models.py)), which it parses and returns as a structured Pydantic model.

## Complete Working Example

Below is a runnable example demonstrating the expected input format and class instantiation:

```python
from evaluator import ResumeEvaluator

# 1️⃣ Create the evaluator (optional model customization)

evaluator = ResumeEvaluator(
    model_name="gpt-4o-mini",        # any supported model name

    model_params={"temperature": 0.3, "top_p": 0.95}
)

# 2️⃣ Prepare the resume text (plain string)

resume_text = """
John Doe
Software Engineer
Experience:
- Developed microservices in Python and Go
- Led a team of 5 engineers
Education:
- B.Sc. Computer Science, XYZ University
Skills: Docker, Kubernetes, AWS, REST APIs
"""

# 3️⃣ Run the evaluation

evaluation = evaluator.evaluate_resume(resume_text)

# 4️⃣ Access the structured result

print(evaluation.json())

```

## Summary

- **Input Type**: [`evaluator.py`](https://github.com/interviewstreet/hiring-agent/blob/main/evaluator.py) requires a single Python string (`resume_text`) containing the full plain-text content of the resume.
- **No Preprocessing Needed**: File paths, binary PDFs, or Word documents must be converted to text before passing to `evaluate_resume()`.
- **Configuration**: Initialize `ResumeEvaluator` with optional `model_name` and `model_params` to customize LLM behavior without changing input format.
- **Output**: The method returns a parsed `EvaluationData` Pydantic model from [`models.py`](https://github.com/interviewstreet/hiring-agent/blob/main/models.py), derived from JSON output by the LLM.
- **Key Files**: [`evaluator.py`](https://github.com/interviewstreet/hiring-agent/blob/main/evaluator.py) (core logic), [`prompt.py`](https://github.com/interviewstreet/hiring-agent/blob/main/prompt.py) (default models), [`prompts/template_manager.py`](https://github.com/interviewstreet/hiring-agent/blob/main/prompts/template_manager.py) (template rendering), [`models.py`](https://github.com/interviewstreet/hiring-agent/blob/main/models.py) (output schema), and [`llm_utils.py`](https://github.com/interviewstreet/hiring-agent/blob/main/llm_utils.py) (provider initialization).

## Frequently Asked Questions

### Can evaluator.py process PDF or Word documents directly?

No. The `evaluate_resume` method in [`evaluator.py`](https://github.com/interviewstreet/hiring-agent/blob/main/evaluator.py) accepts only Python strings. You must extract text from PDF, DOCX, or other binary formats using external libraries (such as PyPDF2 or python-docx) before passing the content as the `resume_text` argument.

### What structure should the resume text follow?

The input should be raw, unstructured plain text without special markup requirements. The `ResumeEvaluator` class sends this text to the LLM within predefined prompt templates from [`prompts/template_manager.py`](https://github.com/interviewstreet/hiring-agent/blob/main/prompts/template_manager.py), so standard resume formatting with line breaks and bullet points works optimally.

### Is there a maximum length limit for the resume text?

The effective limit depends on the `model_name` you specify during initialization and its associated context window constraints defined in [`prompt.py`](https://github.com/interviewstreet/hiring-agent/blob/main/prompt.py). If the resume exceeds the model's token limit, the LLM provider call will fail, so you should verify the context length for your chosen model (e.g., GPT-4o, Gemini-1.5-Flash).

### What does the evaluate_resume method return?

According to the implementation in [`evaluator.py`](https://github.com/interviewstreet/hiring-agent/blob/main/evaluator.py), the method returns an `EvaluationData` object as defined in [`models.py`](https://github.com/interviewstreet/hiring-agent/blob/main/models.py). This Pydantic model parses the JSON response from the LLM, providing structured access to evaluation scores, criteria matches, and candidate assessments.