RSSAmplifier

Blog

About me

Recent content on About me

steffenhaeussler.github.ioRSS feed ↗26 posts

Latest posts

Engineering with AI agents II

Hi, Four weeks ago , I looked into Temporal.io as a platform for building and orchestration reliable workflows. I looked at it through the lens of distributed systems, combining it with concepts from Martin Kleppmann’s Designing Data-Intensive Applications (for reference, DDIA) . In this post, I team up with Claude Code and Codex to rebuild these core architectural ideas using LangGraph and…

Engineering with AI agents

Hi, For more than a year, I have been using coding agents, mostly Claude Code. During that time, I have barely written code myself. Instead, my role has shifted toward planning, reviewing and understanding code. I also use these agents for studying, brainstorming and problem-solving. I definitely struggle with the blurred boundary of my own work and orchestrated LLM work. I feel like a Code DJ by…

Overview of Agentic AI

Hi, In this post I want to outline Agentic AI. I’ve spent the last two years building AI agents and I want to share an overview of what I’ve learned. I originally meant to start this series a year ago, but finding the time was tough. While this field is moving incredibly fast, I’m going to ignore the latest hype and focus strictly on the fundamentals. Nowadays, the term…

Agentic Design Patterns

Hi, This post is written by AI as an experiment. I put much effort into guidelines and specified several rounds of improvements, but the result is still not very graspable. It’s not bad, but also not really good. I see this as a proxy for the current state of agentic coding. Everyone uses it, but if you look at the outcome it is often shallow. If you mention your concerns about quality,…

Fine-tuning the generative part of a RAG

Hi, this is the final post in my series about RAG systems. Here I will look into fine-tuning the generative part of a RAG system. Here is the notebook . But mostly this is for me a method to understand LLM fine-tuning in a superficial and general way. For the records, I looked into search , ANN Algorithms , fine-tuning embedding models , fine-tuning a reranker and evaluation of RAG systems in my…

Fine-tuning a ReRanker

Hi, Based on my previous post , I looked into fine-tuning a bi-encoder via self-supervised learning. As a logical next step, I now want to fine-tune a cross-encoder for my specific task. This is not as easy as fine-tuning a bi-encoder, because cross-encoders are not designed to be trained with contrastive learning. Therefor I looked into four different approaches to fine-tune a cross-encoder for…

Training an embedding model

Hi, Based on my previous post , I need to write a correction. I was wrong. I previously suggested using embeddings directly from pre-trained models. That turns out to be a bad idea, because the training objectives are fundamentally different. As an alternative, I have now explored training an embedding model using Contrastive Learning. Please look at my notebook for the full code and details. The…

This year's recap v2

Hi, I decided to add another post to this year’s recap. After I described my three key learnings from my failed startup endeavor, I wasn’t feeling finished or satisfied. Overall I’m not satisfied with what I learned this year. It feels very shallow without any hard skills behind it. In every year of my life, I learned a lot, independent of the later usefulness, but at least I can…

This year's recap

Hi, This year was an interesting learning experience. I tried to commercialize a product, which in the end was much harder than expected. As a short summary, the first attempt failed, because I couldn’t figure out how to sell the product. The pivot failed, because multiple big corporates released a similar product. Also the goal was to get 1-2 customers to build a MVP before looking for…

Building Agents & LLM Workflows

Hi, Over the last three months, I’ve been working on Agents and LLM workflows. I had the opportunity to do this as part of a residency program at Merantix . I’m deeply thankful for the opportunity and would highly recommend the program to others. Being surrounded by people with shared goals was incredibly motivating and inspiring. I already miss the discussions and the knowledge…

Evaluation of RAG Systems

Hi, The implementation of this article is here . RAGs are complex systems. This is obvious, when you try to evaluate them. There are multiple aspects, which need to be checked. Here, I try to look into different approaches to get a better understanding and problems, when facing RAG systems. RAG system evaluation involves two distinct parts: retrieval and generation part. For retrieval, context…

Understanding approximate nearest neighbor algorithm

Hi, This post is about the approximate nearest neighbor (ANN) algorithm. The code for this post is here , where I provide an example of using a framework and a python implementation. Most python implementation were written with the help of a LLM. I’m amazed, how helpful they are for learning new things. I see them like a drunken professor, which with the right approach will be a very helpful…

Short example of Information Retrieval

Hi, Some time ago, I did a small project on information retrieval. I think, it\s a good idea to share it with all its shortcomings. Here is the code . Sadly, the LLM part doesn’t work with the quantized model, so I commented it out. The project is a small information retrieval of a FAQ, where I want to map the correct answer to a question. In my example, it’s a 1:1 mapping between…

Get embeddings for multiple data sources

DISCLAIMER: This is wrong. Please ignore this post. Hi, Following my first short post about RAGs , I would like to provide a brief overview about embeddings, which are used to find similiar objects in a vector database. To better understand how various transformer models handle different input data types, I created this notebook . I explore therefor, text, image, audio and video data. I’ve chosen…

Overview of RAG (Retrieval-Augmented Generation) systems

Hi, It’s been a while since my last post, mostly because of my own laziness. Over the past year, I’ve been working on several projects, one of which is a small RAG (Retrieval-Augmented Generation) system. I implemented it to combine external knowledge (in this case internal safety documents) with a large language model (LLM). This approach allows the use of data that the LLM wasn’t trained…

Deep Learning model explainability

Hi, In my first post , I looked into the explainability of classical machine learning models. As a next step, I’m interested in the explainability of neural networks. Model explainability is easy for simple models (linear regression, decision trees), and some tools exist for more complex algorithms (ensemble trees). Therefore, I highly recommend the book Interpretable Machine Learning by…

Model explainability

Hi, Some months have passed since my last post. Model explainability is easy for simple models (linear regression, decision trees), and some tools exist for more complex algorithms (ensemble trees). I want to dig into the tools to interpret more complex models with this post. Therefore, I highly recommend the book Interpretable Machine Learning by Christoph Molnar for a deeper theoretical…

Implementing a Transformer Network from scratch

Hi, This post is about my implementation of an encoder transformer network from scratch as a follow-up of understanding the attention layer together with the colab implementation . I use a simplified dataset, where I don’t expect great results. My approach is building something from scratch to understand it in depth. I faced many challenges during my implementation, so I aligned my code to…

Learning about time-series analysis

Hi, Recently, I had to work on a simple time-series analysis. I performed poorly since I never worked with time-series before. I believe in a deterministic world, and in general, I prefer to find the causality of a specific data behavior prior to a simple way of empiristic modeling. However, I understand the need for time-series analysis as not enough data available, the underlying processes…

Endpoint validation

Hi, In my previous job, I spent hours debugging internal data transformations to figure out the received data from an external API was faulty. This issue would not appeared with schema validation. My fault was that I trusted the incoming data and didn’t check for data consistency. Learning from mistakes and saving time, I would set up a small example for JSON validation via Pydantic. FastAPI…

Fast data transfer to or from s3

Hi, This post is an homage to a stackoverflow post copying data from s3. This shared work saved me a lot of time. I believe that individuals who share their work do not receive sufficient recognition. The problem is that I have multiple Gb of data separated into thousands of files. Those files are selected for download by the semi-automated pipeline for model training. So the number of files to…

Training a language model from scratch

Hi, This post is a short overview over a work project , where I trained a language model for invoices. This so-called base model is then fine-tuned for text classification on customer data. Due to data privacy, a non-disclosure agreement, ISO 27001 and SOAP2, I’m not allowed to publish any results. Believe me, it works like 🚀✨🪐. A language model is trained on large amounts of textual data…

Cookie-cutter Problems

Hi, Recently, I started to put some scripts together and run them against a Kaggle dataset. I decided to train my skills on an unseen dataset. Training keeps me sharp, and I need it to complement my skill set. For the last 2,5 years, I struggled in a small team with NLP problems, where I worked mostly on engineering tasks. My understanding in this area is not where I wanted to be. And on top, I…

Stratified multi-label split

Hi, This post is a short overview of a stratified multi-label train-test split. Please look at the colab implementation for a step through guide. Sometimes you step into work problems, which justify a small post. I already saw colleagues struggling to balance the train-test split for multi-label classification. In classification problems, we have often a dataset with an imbalanced number of…

Understanding scaled-dot product attention and multi-head attention

Hi, This post is a summary of my implementation of the scaled-dot product attention and multi-head attention. Please have a look at the colab implementation for a step through guide. Even though this post is five years too late, the best way of reviving knowledge is to write about it. Transformers are in transforming the world via ChatGPT, Bart, or LLama. The core of the transformer architecture…

The importance of building things by yourself

Hi, In this initial post, I want to draft the development of my FastAPI skeleton . At the beginning of my career as a Data Scientist, I ran into the typical problem of model deployment to production. In a team of two scientists, I had the chance to write a micro-service with Flask from scratch out of necessity. My first service followed strongly the example of Miguel Grinbergs great tutorial . The…