Easy Letters is a Python library that provides the basic building blocks for creating a naive retrieval augmented generation (or RAG) pipeline to generate application letter drafts. The main idea is to speed up the process of writing application letters by not starting from scratch. Instead, an applicant could generate a draft letter that can be used as a starting point and customized as needed to make the final letter.
The diagram below shows the workflow of the naive RAG pipeline that the current version of Easy Letters can be used to implement.
Note
At the moment, Easy Letters only supports text generation and text embedding models from OpenAI. However, the library is designed to be extensible, so more features and models can be added in the future versions.
pip install easy-letters
You can also install Easy Letters from the source code in this repository. The main benefit of this approach is that you might find it easier to run the sample notebooks and modify the code as you wish this way.
After cloning this repository, you can navigate to the directory where you cloned the repository and install the dependencies using Poetry:
git clone https://github.com/habedi/easy-letters.git && cd easy-letters
# Install the dependencies using Poetry
poetry install --with dev
Easy Letters gets the API key for supported services (like OpenAI) from the environment variables. So you need to set the following environment variables to be able to use Easy Letters:
OPENAI_API_KEY
: The OpenAI API key (required)
You can find Jupyter notebooks with example code in the notebooks directory. The notebooks demonstrate how to use Easy Letters to generate application letter drafts.
Easy Letters currently supports the following models:
Model | Type | Company |
---|---|---|
GPT-3.5 Turbo | Text Generation | OpenAI |
GPT-4 Turbo | Text Generation | OpenAI |
GPT-4o | Text Generation | OpenAI |
GPT-4o Mini | Text Generation | OpenAI |
Text Embedding 3 (Small Variant) | Text Embedding | OpenAI |
Text Embedding 3 (Large Variant) | Text Embedding | OpenAI |
Easy Letters is available under the MIT license (LICENSE).