- Blog/
Using RAG when writing job applications
Imagine applying for a job.
You have your CV, of course.
But you just know that you know so much more.
If you are in luck, some of what you know is written down somewhere. Maybe in a blog, maybe in documentation, maybe in articles.
And as soon is knowledge is written down, it is accessible to RAG - Retrieval-Augmented Generation
RAG is a method in natural language processing that combines retrieval and generation strategies to improve the quality and relevance of generated text.
It is also very handy for finding specific details relevant to some practical task at hand, such as writing a job application.
I have built custom RAGs in Nushell and in Python with LangChain, I’ve even built one on top of Simon Willison’s llm-rag
.
But today I will use the RAG built-in to one of my favorite LLM command line tools, namely the rust-based aichat
.
Let’s get to it:
First I start aichat
in RAG-mode, naming the RAG-session simply job
like so:
aichat -R job
My aichat
is currently set up with OpenAI - so aichat
will ask me to choose from these embedding models:
? Select embedding model:
> openai:text-embedding-3-large (max-tokens:8191;max-batch:100;price:0.13)
openai:text-embedding-3-small (max-tokens:8191;max-batch:100;price:0.02)
[↑↓ to move, enter to select, type to filter]
In this case the external dataset (my blog) is rather small, and I like really snappy responses, so I will go with the smaller model.
aichat
will then ask for chunk size and chunk overlay. I will go with the defaults.
Then it asks for the documents:
? Add documents:
[e.g. file;dir/;dir/**/*.{md,mdx};solo-url;site-url/**]
I will provide the English language blog here at Kiils.dk:
? Add documents: https://www.kiils.dk/en/blog/**
The two asterix at the end of the url are a wild-card, telling aichat
to get all blog posts.
I then get this reply from aichat
Load https://www.kiils.dk/en/blog/** [1/1]
Start crawling url=https://www.kiils.dk/en/blog/ exclude= extract=
Crawled https://www.kiils.dk/en/blog/
Crawled https://www.kiils.dk/en/blog/2024-09-19-inspecting-yaml-frontmatter-in-markdown-files-with-nushell/
Crawled https://www.kiils.dk/en/blog/chatgpt-glorified-markov-chain/
Crawled https://www.kiils.dk/en/blog/2024-07-20-the-2-basic-workflows-for-ai-assisted-content-generation/
Crawled https://www.kiils.dk/en/blog/2024-06-03-get-items-from-rss-feed-with-nushell/
Crawled https://www.kiils.dk/en/blog/2024-07-23-creating-pdf-tables-from-data-files-with-groff/
Crawled https://www.kiils.dk/en/blog/2024-05-31-how-programming-can-help-reduce-mental-load/
Crawled https://www.kiils.dk/en/blog/making-taskwarrior-better-with-nushell/
Crawled https://www.kiils.dk/en/blog/servicebot-is-great/
Crawled https://www.kiils.dk/en/blog/2024-06-22-using-nushell-in-neovim/
Crawled https://www.kiils.dk/en/blog/humans-should-also-be-prompted-properly/
Crawled https://www.kiils.dk/en/blog/2024-06-04-tuc-as-a-basic-ai-data-structure/
Crawled https://www.kiils.dk/en/blog/2024-06-11-working-with-tuc-in-nushell/
Crawled https://www.kiils.dk/en/blog/2024-07-21-should-i-keep-input-and-output-separate-when-doing-ai-assisted-content-generation-in-nushell/
Crawled https://www.kiils.dk/en/blog/2024-07-31-using-nushell-and-polars-on-weather-data-from-open-meteo/
Crawled https://www.kiils.dk/en/blog/2024-06-30-deleting-lines-with-nushell/
Crawled https://www.kiils.dk/en/blog/2024-06-24-using-nushell-to-make-sense-of-my-nushell-scripts/
Crawled https://www.kiils.dk/en/blog/using-nushell-with-generative-artificial-intelligence/
Crawled https://www.kiils.dk/en/blog/2024-07-22-easy-way-to-get-full-width-latex-tables-in-pandoc/
Crawled https://www.kiils.dk/en/blog/2024-07-16-creating-listicles-with-nushell-and-aichat/
Crawled https://www.kiils.dk/en/blog/2024-07-15-speeding-up-ai-assisted-content-generation-with-nushell-par-each/
Crawled https://www.kiils.dk/en/blog/how-chatgpt-made-my-surly-son-laugh/
Crawled https://www.kiils.dk/en/blog/merging-an-emoji-font-into-a-text-font/
Crawled https://www.kiils.dk/en/blog/2024-07-24-why-nushell-is-so-brilliant-for-working-with-ai/
Crawled https://www.kiils.dk/en/blog/2024-07-14-the-secret-behind-good-ai-generated-content/
Crawled https://www.kiils.dk/en/blog/2024-10-03-analysing-the-holy-bible-with-nushell-in-under-a-second/
✨ Saved rag to '/home/lk/.config/aichat/rags/job.yaml'.
Welcome to aichat 0.23.0
Type ".help" for additional help.
@job>
Now, all of my blog posts in English at Kiils are stored as embeddings in this small knowledge database I just made.
And this means I can now do semantic search and find relevant information. I can simply search for content relevant to, in our example here, a specific job offer - and I can even write the search query in natural language, explaining the context carefully:
@job> I am applying for a job as an AI engineer with a focus on generative artificial intelligene, please give me relevant examples from the blog postings - you may elaborate on how exactly these are relevant for an AI engineer position at a company
Then the RAG comes up with this answer:
—————— Here are some relevant examples from the blog postings that could be useful for an AI engineer position, particularly focused on generative artificial intelligence:
-
Marvin Library for AI Integration:
- The blog discusses Marvin, a library for integrating AI into software, which can be likened to building various bots with unique AI personalities. For an AI engineer, understanding how to implement such libraries to integrate AI systems into codebases is critical, as it often involves creating efficient and effective solutions for utilizing large language models (LLMs).
-
Embodying Humor in AI:
- Another example is the challenge of making AI produce humor, tested through different emoji combinations and themes. This reflects the endeavor of creating generative AI models that can mimic human-like creativity and understand context, which is a valuable skill for fine-tuning and training models to fit specific human interactions or entertainment applications.
-
Content Generation Workflows:
- The blog mentions workflows in AI-assisted content creation, such as semi-automatic (LLM -> editor -> publication) and fully automatic (LLM -> publication) processes. An AI engineer should understand these workflows, their advantages and disadvantages, and how they are constructed and modified to enhance content quality and efficiency while leveraging LLM technology.
-
BER Approach for AI Content:
- The recipe of starting from a RAG-enhanced base, enriching with knowledge from LLMs, and then manually editing is significant. It shows the iterative process of enhancing AI-generated content, which is crucial for AI engineers who aim to optimize and personalize AI outputs.
These examples highlight practical applications and challenges in using generative AI, which are highly relevant to the responsibilities of an AI engineer working in the field. Being able to understand, implement, and improve such systems is key to contributing effectively to a company that develops or utilizes generative AI technologies. ——————
Not bad.
I remember writing about workflows.
I remember coming up with the Base-Enrich-Reduce method, that I even helped to implement for a large Danish company in the car leasing industry.
I remember working with the MarvinAI Python library from Prefect, good stuff.
But what is “Embodying Humor in AI” about?
Let’s find out:
@job> In what blog posting did I employ humor with AI?
—————— You employed humor with AI in the blog post titled “🦶 + 🥔 = Potato foot 🤣 - and other examples of how ChatGPT made my son laugh. And why it is important,” published on 22 May 2023. ——————
Ah yes, I remember now. We had such a good laugh. LLM’s can write extremely silly stuff humans would have a hard time coming up with :)
Anyway, as you can see, RAG can be used on your very own information. It can be very useful for doing what embeddings basically do, mapping semantic relations and giving meaningful answers.
In this case, to “resurface” what I have written of relevance to a particular job offering. And with the more general power of LLMs, to present this in a hopefully clear and convincing way in an application for the job.
And, as you can probably imagine, there are endless other ways to make use of this technology.