Skip to content

maxschmaltz/Hirer

Repository files navigation

Hirer: A Simple LLM-Powered Hiring Plan Creator.

This repo contains a solution to a test task for an NLP Engineer position. The coding took about 1 h 15 min including testing, setting up the repo and writing the README. An update took about 20 min more afterwards.


Table of Contents


Quick Start

from prepare import get_model
from hiring_plan import hiring_plan

params_path = '<path_to_your_params>'
llm = get_model(params_path)

desc = '<Your description>'
response = hiring_plan(llm, desc)
print(response)

Input Parameters:

llm : langchain.llms.base.BaseLLM

    the LLM to generate the hiring plan with

desc : str

    the description of the hiring plan you want to get

Returns:

hiring_plan : dict

    hiring plan; consists of the following fields:

    "positions" : list[dict]

      list of positions encoded in dict each; each position includes title (field "name"), yearly salary ("salary") and bonus ("bonus")


    "total_annual_salary" : int

      summed annual salary for all proposed positions


    "total_annual_bonus" : int

      summed annual bonus for all proposed positions


    "total_annual_cost" : int

      summed annual salary + bonus for all proposed positions

Example:

This example is available in example.py

from prepare import get_model
from hiring_plan import hiring_plan

params_path = './params.json'
llm = get_model(params_path)

# The description is generated with ChatGPT
desc = '''
    I need a hiring plan for a following team:
    
    1. Innovation Catalyst: Sparks creative ideas and guides exploration of new opportunities.
    2. Execution Maestro: Plans, coordinates, and ensures smooth project implementation.
    3. Analytics Guru: Analyzes data to provide actionable insights for decision-making.
    4. Relationship Orchestrator: Builds and maintains strong relationships with stakeholders.
'''
plan = hiring_plan(llm, desc)
print(plan)

Output (manually prettied):

{
    "positions": [
        {
            "name": "Innovation Catalyst",
            "salary": 70000,
            "bonus": 5000
        },
        {
            "name": "Execution Maestro",
            "salary": 720000,
            "bonus": 180000
        },
        {
            "name": "Analytics Guru",
            "salary": 80000,
            "bonus": 10000
        },
        {
            "name": "Relationship Orchestrator",
            "salary": 80000,
            "bonus": 10000
        }
    ],
    "total_annual_salary": 950000,
    "total_annual_bonus": 205000,
    "total_annual_cost": 1155000
}

About

A Simple LLM-Powered Hiring Plan Creator.

Topics

Resources

Stars

Watchers

Forks

Languages