Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Resume Coach Pack #15980

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
153 changes: 153 additions & 0 deletions llama-index-packs/llama-index-packs-resume-coach-pack/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
llama_index/_static
.DS_Store
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
bin/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
etc/
include/
lib/
lib64/
parts/
sdist/
share/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
.ruff_cache

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints
notebooks/

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
pyvenv.cfg

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# Jetbrains
.idea
modules/
*.swp

# VsCode
.vscode

# pipenv
Pipfile
Pipfile.lock

# pyright
pyrightconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
python_sources()
17 changes: 17 additions & 0 deletions llama-index-packs/llama-index-packs-resume-coach-pack/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
GIT_ROOT ?= $(shell git rev-parse --show-toplevel)

help: ## Show all Makefile targets.
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[33m%-30s\033[0m %s\n", $$1, $$2}'

format: ## Run code autoformatters (black).
pre-commit install
git ls-files | xargs pre-commit run black --files

lint: ## Run linters: pre-commit (black, ruff, codespell) and mypy
pre-commit install && git ls-files | xargs pre-commit run --show-diff-on-failure --files

test: ## Run tests via pytest.
pytest tests

watch-docs: ## Build and watch documentation.
sphinx-autobuild docs/ docs/_build/html --open-browser --watch $(GIT_ROOT)/llama_index/
61 changes: 61 additions & 0 deletions llama-index-packs/llama-index-packs-resume-coach-pack/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# LlamaIndex Packs Integration: Resume Coach Pack

This LLamaIndex pack takes a resume, a job description, a LLM, an embedding model, and optionally a Reader and a list of queries and returns the answer for each query by using the job description, job criterions and job keywords to evaluate the resume.

The purpose of this pack is to help job candidates match and improve their resumes to reach the job requirements with the default queries or anything else by passing custom queries.

## Code Usage

You can download the pack to a `./resume_coach_pack` directory:

```python
from llama_index.core.llama_pack import download_llama_pack

# download and install dependencies
ResumeCoachPack = download_llama_pack(
"ResumeCoachPack", "./resume_coach_pack"
)
```

From here, you can use the pack, or inspect and modify the pack in `./resume_coach_pack`.

Then, you can set up the pack like so:

```python
# create the pack
resume_coach = ResumeCoachPack(
job_description_path='job_description.txt',
resume_path='CV.pdf',
embed_model=embed_model,
llm=llm
)
```

In this example, `embed_model` has the type BaseEmbedding and `llm` has the type LLM.

Two additional parameters can be passed to the pack:
* reader: a Reader object that has the 'load_data' method
* queries: a Dictionary containing a key that describes each query and a value that contains the query itself



You can get the response from the pack by running the following code:

```python
response = resume_match_pack.run()
```


```python
response = resume_screener.run(resume_path="resume.pdf")
print(response.overall_decision)
```

The `response` will be dictionary that can be displayed as follows:

```python
for key, value in response.items():
display(Markdown(f"<b>{key}</b>"))
display(Markdown(f"{value}"))
display(Markdown(f"---"))
```
Loading
Loading