RSSAmplifier

Blog

Saeed Esmaili

Recent content on Saeed Esmaili

saeedesmaili.comRSS feed ↗50 posts

Latest posts

Save an audio file into your Spotify account via CLI

I have added several long conversational youtube videos into a playlist, hoping I’ll come back to the them some day, but in reality I never do that. Recently I found out that Spotify has released a new save-to-spotify CLI tool that lets you upload any audio file into your Spotify account as a private podcast episode. This is perfect for me, as I can download those youtube videos as audio…

Treat your morning ritual like an opening chess move

I quite liked this metaphoric view of the morning ritual from Herbert Lui: A good morning ritual needs to be flexible enough to adapt to these shifts. In order to do this, treat it like an opening chess move. On your ideal mornings, you’re going first. You get to decide which move to take. An opening move may be to make your usual breakfast, and doing something creative before you handle your…

Taming Claude Code: Taking Back Control

I started using Claude Code in July last year. I was a Cursor user looking for something better, and I was skeptical at first. Claude Code is a terminal-based tool, and I was used to IDEs. With Cursor, reviewing AI-generated changes was straightforward, you see the diff, you accept or reject. How would that work in a terminal? It took me a while to adapt. The breakthrough was realizing I could run…

Playing Tennis in the Netherlands: A Guide for Newcomers

Welcome to the Netherlands! If you’re a newcomer like me and love tennis, or even if you’re looking to pick up a racket for the first time, you’re in luck. Tennis is popular here, and there are plenty of ways to play. However, figuring out the local tennis scene can be a bit of a puzzle when you’re new. When I moved here in 2022, one of the very first things I bought was a…

Pure Independence

When you’re independent you feel less desire to impress strangers, which can be an enormous financial and psychological cost. The wild thing about all this effort is how easy it is to overestimate how much other people are thinking about you. No one is thinking about you as much as you are. They are too busy thinking about themselves. Even when people are thinking about you, they often do it just…

Never Been Easier to Learn

In a discussion about LLMs and their impact on learning, gchamonlive writes on Hackernews: We can finally just take a photo of a textbook problem that has no answer reference and no discussion about it and prompt an LLM to help us understand what’s missing in our understanding of the problem, if our solution is plausible and how we could verify it. LLM changed nothing though. It’s just…

Released a new tool: llm-url-markdown

Recently I started using Simon Willison ’s CLI tool which is conveniently called llm . He introduced a particularly useful fragments feature in a recent version of the tool, that allows the user to provide extra information to the llm when working with long context models. Simon himself developed a llm-hacker-news plugin that fetches all the comments in a HackerNews discussion and provides…

Comparing local large language models for alt-text generation

I’m always interested in reading how people use language models for automating boring tasks or performing what they wouldn’t be able to do manually. In his post, Dries explores using several local language models for generating alt text for 10,000 photos! This is double-interesting topic to me, since I also love photography . I recommend reading the original post if you’re…

Could That Meeting Be An Email?

I liked this post’s rules of thumbs for when to avoid scheduling meetings at work: Before calling a meeting, ask yourself: What’s the goal? If it’s just to convey information—like a status update—then yes, this meeting can (and should) be an email. Meetings should be dialogues, not monologues. If all you’re doing is delivering information that doesn’t require…

Building a Personal Content Recommendation System, Part Two: Data Processing and Cleaning

In part one of this blog series , I explored the motivation behind developing a personal recommendation system. The main goals are to learn how recommendation systems work and to build a tool that helps me find interesting blog posts and articles from feeds where only 1 in 20 posts might match my content interests. If you are interested in the technical implementation, the complete codebase is…

Lessons in creating family photos that people want to keep

I love taking photos , taking my Sony A7cii wherever I travel. Although it’s a relatively small camera, I recently got a Ricoh gr iii to be able to carry a good camera with me everywhere, even when I don’t travel. Documenting my own life and the events influencing me and the people close to me is one of the main reasons I love photography, but I haven’t spent enough effort on…

Enhancing Text-to-SQL With Synthetic Summaries

LLMs are being experimented with to do so many things today, and one of the use cases that sound compelling is getting their help to generate insights from data. What if you could find the answer to your data question without begging a data analyst in your company? But this is easier said than done. To perform this task properly, LLMs need to know about your datasets, the tables, their schemas,…

Building a Personal Content Recommendation System, Part One: Introduction

Every morning, my RSS reader greets me with hundreds of new posts. Tech blogs, indie developers’ journals, photography content - they all compete for attention. While I’ve gotten good at quickly scanning through these feeds , I keep wondering about all the great content I might be missing from sources I’ve had to ignore simply because their signal-to-noise ratio doesn’t…

Add Logprobs to Openai Structured Output

When working with LLMs sometimes you want to know if the response you’re getting from the model is the one that at least the model itself is sort of confident about. For example, I recently worked on classifying pull requests into categories like “feature”, “bugfix”, “infrastructure”, etc with LLMs, and as part of the process we wanted to know how many…

Adding new entries to a Supabase postgres table via REST API

I read this blog post from Jordan on how he created a simple feature request form on his iOS app using Supabase’s Swift library. I wanted to try this out on Python to see how easy would be to implement this when I need a quick way to add a form functionality in a backend service. Here is what I did: Created a free Supabase account . Created a new project. Created a new table in the project…

Ten Favorite Photos I Captured in 2024

I purchased a Sony a7ii in 2023, while having zero understanding of the basics of cameras and photography. I recall being particularly confused about the exposure triangle , especially how aperture affects the sharpness and the depth of field of an image. After learning the basics and taking around 3500 photos with that camera, I realized its aging technology was limiting my beginner skills. I had…

Label-Studio: Annotate Text and Image Data for AI and ML training

A few months ago I used streamlit to build a simple UI, so I can collect manually labeled data for a LLM fine-tuning task at work. Streamlit is fine, but the full process of creating a nice UI with required functionalities for data annotation and data storage management wasn’t trivial. Today I found out about label-studio which is an easy to use framework (backend and frontend) for data…

Quickly Filter and Aggregate Python Lists

Today I came across this brilliant python library called leopards which allows you to do some basic but frequently used filters and aggregations on python lists. I"ve always used pandas for any quick and adhoc work with large lists or CSV files, but leopards sounds a quick and performant alternative when you don"t need to do any fancy data analysis work. Leopards provides following filters: eq :…

Pydantic Logfire for LLM and API Observability

I’ve been using sentry for automatically logging the errors and exceptions of my python projects. A few months ago I needed to log some information if a specific condition is true in my side project’s backend, but I wasn’t able to do this with sentry. It apparently can only work when something fails, and you can’t capture log messages if there’s no failure or…

Build a search engine, not a vector DB

If you want to make a good RAG tool that uses your documentation, you should start by making a search engine over those documents that would be good enough for a human to use themselves. This is exactly what I’ve been trying to communicate in my org in the past few months. It’s 2024 and we still can’t have a proper search engine in organizations to find relevant information from…

Access Google Gemini LLM via OpenAI Python Library

Google Gemini now can be accessed via OpenAI python library: from openai import OpenAI client = OpenAI( api_key = "GEMINI_API_KEY" , base_url = "https://generativelanguage.googleapis.com/v1beta/openai/" ) ## rest of the code as you would use openai It support basic text generation, image input, function calling, structured output, and embeddings. More info and code examples can be found on Gemini…

I Have Two Friends an Introverts Guide to Not Chasing Friendships

This excellent essay from Karolina was the best I’ve read this year. I can related with many of her point on why friendship muscle looks different for every person. Abroad, I meet local people who don’t hang out with expats because they have their Martas. Every time I hear a Dutch or British person say “we’ve known each other since we were little”, I can’t help…

Goodbye Microsoft Hello Facebook

Philip writes about how small cost saving policies at Microsoft irritated him as an employee: We used to get Dove Bars and beers all the time. It felt like free food was on offer at least once a week, usually with a pretense of some small milestone to celebrate. Why did we cut stuff like this? (I know the boring fiscal reasons why. I’m asking the deeper why , as in, “Was it worth the…

Country Specific Consent Requirements for Photographing People

I’m an aspiring photographer , and I love taking photos of moments of life on streets. Since I take my camera wherever I go, it was important to me to know the legal requirements of taking and publishing of such photos. I recently came across this nice table on Wikimedia, which categorizes countries on if a consent is required to take photos of identifiable people, and to publish them, and…

Understanding Input Masking in LLM Finetuning

I’ve been using conversational alpaca or sharegpt formats for fine-tuning LLMs with Axolotl , but it always felt unnecessary to limit the model on a conversational format when the use-case doesn’t require so. I’m currently working on a project to classify pull requests in my company’s code repositories. The model needs to look at the PR title, description, and code changes,…

Control a smart light with multiple motion sensors in Home Assistant

I’ve been using Home Assistant to control many things at my smart home, including a couple of lights which are toggled on and off with motion sensors. I have one of these in the bathroom, so the motion sensor detects when I enter the bathroom and its light turns on, and the light turns back off if the motion sensor doesn’t detect any motion in a specific period (60 seconds). Setting…

Upstream Productivity

I like this emphasis on the impact of health on productivity: Biological health is upstream of mental health and mental health is upstream of productivity. Adding to this, I believe engaging in physical activities and working on improving one’s fitness has tremendous effect on productivity in long term. I play tennis regularly, the fact that I make progress in the court and I improve and…

Evidence That You Should Take Your Content Diet More Seriously

Interesting point about various types of content a creator can focus on: A surprising learning is that content funnels do not work. In theory, you produce entertaining, shortform content to get attention. Then once people are hooked they start consuming your deeper, educational, longform content. Except that this doesn’t happen. People who consume entertaining, shortform content are not…

To Chunk or Not to Chunk With the Long Context Single Embedding Models

In his excellent write up on state of the art embedding models, Aapo Tanskanen compares the retrieval score for when the source documents are split into chunks and when they’re not: Transformer-based single embedding models have traditionally had 512 token context windows because of the usage of the original BERT encoder. Newer models, like the BGE-M3, have expanded the token window to much…

Excuse Me Is There a Problem

Do you have an idea for a new business or product? In his excellent blog post, Jason provides a useful diagram for differentiating between ideas and problems that worth pursuing vs the ones that don’t: He explains each part of the diagram in details in the post. I highly recommend reading it. source

Lessons After a Half Billion Gpt Tokens

Ken writes about the lessons they’ve learned building new LLM-based features into their product. When it comes to prompts, less is more Not enumerating an exact list or instructions in the prompt produces better results, if that thing was already common knowledge. GPT is not dumb, and it actually gets confused if you over-specify. This has been my experience as well. For a recent project, I…

Lucky vs Repeatable

“Luck” is one of the most interesting topics to me, and I always find myself paying extra attention to anyone talking about what “luck” is and how it can be somehow controlled. Morgen makes a useful distinction between “lucky” and “repeatable” traits: … a better way to frame luck is by asking: what isn’t repeatable? Did Jeff Bezos get…

Running Python on a serverless GPU instance for machine learning inference

I was experimenting with some speech-to-text work using OpenAI’s Whisper models today, and transcribing a 15-minute audio file with Whisper tiny model on AWS Lambda (3 vcpu) took 120 seconds. I was curious how faster this could be if I ran the same transcription model on a GPU instance, and with a quick search, modal.com seemed like a nice option to spin up a GPU machine, run the code, and…

Prove It

This is a fantastic reminder from Herbert: If you want to do something, like really want to do it, you need to prove it. That starts with you proving it to yourself. In difficult circumstances, do you make excuses? Or do you face your problem head on? Are you willing to make difficult decisions to do what you’ve committed to? Are you willing to put out bad work in order to improve? Are you open to…

Can You Just Quickly Pull This Data for Me

Them: Can you just quickly pull this data for me? Me: Sure, let me just: SELECT * FROM some_ideal_clean_and_pristine.table_that_you_think_exists source

An Introvert's Guide to Visibility in the Workplace

Melody is basically describing me: Many introverts value depth and thoughtfulness in their work over noise and showmanship. They’re content to contribute without constant recognition or the spotlight. And the consequences part also checks out: While this tendency is admirable, it comes with pitfalls, especially in the modern, remote-first work world where being “out of sight”…

Dealing With Surprising Human Emotions: Desk Moves

After reading this post from Lara, I finally understand why I’ve been feeling strangely uncomfortable whenever my work desks have been moved in the past. Here are humans’ core needs in the BICEPS model: Belonging Community: A feeling of friendship and closeness with a group, or being part of a tight community of any size. Community well-being: People are cared for, the whole group…

LLMs Shouldn't Write SQL

Every day a new tools pops out claiming “Throw the data analysts and data scientists of your company away, you don’t need to write SQL anymore, everyone can use data with our groundbreaking ’talk to your data’ tool”, and Benn discusses this: There are thousands of computational devils in details like how to handle nulls. For analysts, describing these specifics in…

Effective Ways of Dealing With Spammers

From a hackernews thread on dealing with spammers on your platform: … one of the most effective ways of dealing with spammers is to “shadowban” them. Allow them to use your service, but don’t indicate to them that you’ve identified them as malicious. For instance, when dealing with chat spammers, allow them to chat, but do not show their chats to other users. Another…

Thinking Fast by Preparing Well

A few days ago a question was asked on Hackernews on how slow thinkers compensate for their lack of quick-wittedness . Some people have responded that preparation is key : Sometimes what people think is quickness is actually extensive prep. I had a 30 minute meeting the other day to ask a team to do something I didn’t think they would want to do. It ended up going really smoothly and they…

Optimizing Technical Docs for LLMs

Many companies are integrating LLM question answering tools into their DevEx toolchain. If you’re writing documentation and you’d like to assist these tools to serve people with proper responses to the questions related to what you own, kapa.ai has a few practical tips on optimizing the technical docs for LLMs: A clear hierarchy of headings and subheadings on a page helps LLMs…

Willingness to Look Stupid

This post from Dan is one of the best reads in the past few months for me. He openly talks about instances that he might look like a stupid person, and how it’s benefiting him. I highly recommend reading the full blog post . … I frequently ask questions when there’s something I don’t understand or know, from basic stuff, “what does [some word] mean?” to more…

Alfred vs Raycast

If you’re into either Alfred or Raycast , Josh has a nice comparison of these tools from his experience using them: … for me, in the era of paid subscription software overtaking everything, I don’t need yet another $8–10/month siphon on my bank account. By the time you’ve paid for Raycast Pro for a year, you could’ve paid for Alfred for a lifetime. I absolutely…

Fuck You Show Me the Prompt

Hamel dives deep into how LLM frameworks like langchain , instructor , and guidance perform tasks like formatting the response in a valid JSON output. He intercepts the API calls from these Python libraries to shed some light on how many API calls (to OpenAI’s GPT services) they make and what prompt they use. I’ve always been skeptic of the usefulness of many of the LLM…

GROUP BY ALL in Bigquery

I came across this Linkedin post from a Google engineer, on a new (in preview) and very interesting BigQuery syntax: GROUP BY ALL . This will save time when writing and specially modifying complex SQL queries on BigQuery. The GROUP BY ALL clause groups rows by inferring grouping keys from the SELECT items. It will exclude expressions with aggregate and window functions, constants, and query…

Classless Css Libraries

For small web projects that you don’t want to get large CSS frameworks like Tailwind to be involved, the classless CSS libraries can be very handy. You just 1-2 lines into the head of the html and get beautifully styled pages. Here are a few classless CSS libraries you can use: concrete.css water.css pico css simple css classless.de mvp.css NES.css drop-in minimal css Oat : HTML components…

My RSS-based Content Consumption Workflow

TLDR : Here is a simplified diagram of how I keep reading articles, books, and other materials without overwhelming myself or having a never-ending pile of to-read items. In this blog post, I will go into the details of each part of the workflow, the tools I currently use, the alternatives I have tried, why they work for me, and what I can improve in the process. Feel free to use the above table…

Color Palette Generators

I stumbled upon a hackernews thread where people have recommended many interesting tools to help with generating color palettes for various use cases. I’m creating this list for my future self, and will add other options whenever I come across one. uicolors.app : I’ve used this one when working on redesigning the user interface for my latest side project. The nice feature of…

There Is a Huge Gap in Generative Ai

There is a huge gap in generative AI between the quality you observe when you’re playing with it open endedly, and the quality you observe when you try to use it for a task where you have a specific end goal in mind. This is I think where most of the hype/reality mismatch occurs. This accurately sums up my experience using generating AI in a daily base and building products with this…

Office Politics

If you need another reason to hate office politics, Dave Anderson shares some awful advice on how to join office politics, one of them is: Slow down other teams If other teams move quickly, your team can become a bottleneck. That never looks good. When a wild animal is chasing you, you need to not be the slowest. Slow down your peer teams by asking for info, or starting processes. As a bonus, you…