Learning from Giants #57
An introduction to Vector Databases, Defending and defining Good Strategy, and How to get useful answers to your questions.
👋 Hi, this is Mathias, back from holidays 😎 with your weekly drop of the 1% best, most actionable, and timeless resources to grow as an engineering or product leader. Handpicked from the best authors and companies. Guaranteed 100% GPT-free content.
Did a friend send this to you? Subscribe to get these weekly drops directly in your inbox. Read the archive for even more great content. Also: I share these articles daily on LinkedIn.
What is a Vector Database
The infrastructure behind the LLM revolution.
"All of these new applications rely on vector embeddings, a type of data representation that carries within it semantic information that's critical for the AI to gain understanding and maintain a long-term memory they can draw upon when executing complex tasks."
What are embeddings exactly? They're large vectors representing a model's understanding of a data point.
"Embeddings are generated by AI models (such as Large Language Models) and have a large number of attributes or features."
LLMs associate a vector representation: embeddings for every piece of data of our world. Adding long-term memory to a model is just that: storing a database of past conversations and allowing the model to query that database freely. But traditional relational databases don't shine at managing and indexing embeddings. That's because the default operation is not an exact query; it's a similarity search.
"In vector databases, we apply a similarity metric to find a vector that is the most similar to our query. A vector database uses a combination of different algorithms that all participate in Approximate Nearest Neighbor (ANN) search."
So vector databases are just this: databases specialized in doing that similarity search query on a lot of data very efficiently. They can also query both the embeddings and the actual data in case filtering should happen on both. Approximate Nearest Neighbour search on large datasets is not simple and usually combines many techniques and tricks. Here are some examples:
Random Projection
"The basic idea behind random projection is to project the high-dimensional vectors to a lower-dimensional space using a random projection matrix."
Locality-sensitive hashing
"LSH maps similar vectors into "buckets" using a set of hashing functions. The query vector is hashed to a particular table and then compared with the other vectors in that same table to find the closest matches."
📗 Roie Schwaber-Cohen's What is a Vector Database introduces this new breed of databases, why they're needed, and how they work. Considering they're everywhere and used in most LLM applications, it's an excellent time to jump on the train. Beyond marketing and shiny new databases, I also hear Postgres has a pgvector extension that gives everyone's favorite database vector search superpowers! Once dropped, operators will stow the pallet to a fixed pallet location.
In Defense of Strategy
"There's a belief in tech that execution is all that matters, that strategy is for wimpy MBAs."
And it's easy to pride ourselves on having the best execution! Everything feels so fast!
"The better you are at execution, the faster you can run in any direction. A good strategy helps you run fast in the right direction."
Early-stage startups are often protected in the first months because they're so small and unsuccessful that no one will attempt to compete with them. That time is precious, and founders must focus on digging their moat.
"If startups need to dig moats before their uncertainty runs out, strategy is how they do it. If moats are the what, strategy is the how."
If the above is so obvious, why are startups struggling with strategy? I would say that most fall into two buckets:
Startups that get too busy with execution and think it'll be enough.
Startups that have Bad Strategy.
Packy's first advice is to read Good Strategy, Bad Strategy by Richard Rumelt.
"It's my favorite strategy book because it was so easy to put into practice, and because I recognized so many of the characteristics of bad strategy."
Then, the author explains what "Good Strategy" is.
"A strategy is a high-level plan to achieve one or more goals under conditions of uncertainty, designed through recognizing the challenge (diagnosis), setting a direction to overcome it (guiding policy), and detailing steps to implement the policy (coherent actions)."
"The best time to craft a strategy is before you start the company; the second best time is now."
📗 Packy McCormick's In Defense of Strategy then goes deeper into the three core elements of a strategy: diagnosis, guiding policy, and coherent actions, and ends with the practical example of a past startup. Beyond being a reminder that strategy is not just a big empty word, the article is also a guide to thinking about your strategy and a call to action to keep refining it.
How to get useful answers to your questions
"Often when I ask a vague or underspecified question, what happens is one of:
the person starts by explaining a bunch of stuff I already know
the person explains some things which I don't know, but which I don't think are relevant to my problem
the person starts giving a relevant explanation, but using terminology that I don't understand, so I still end up being confused"
And it takes a lot of confidence to stand up to the person, interrupt them, and ask a clarifying question, especially in a junior-to-senior conversation.
So here's a framework to solve that:
You can get more useful answers if you optimize your first question.
"My favourite tactic is to ask a yes/no question. What I love about this is that there's a much lower chance that the person answering will go off on an irrelevant tangent."
"My second favourite tactic is to state my understanding of how the system works." This way, your coworker will be able to identify where your gaps are and specify their answer.
Do not be afraid of following-up.
While it takes some confidence, never accept responses that don't answer your question or that you don't understand. Interrupt, clarify your initial question, and reflect on whether you understand the answers before closing the conversation.
📗 Julia Evans' How to get useful answers to your questions is an impacting read to recommend to anyone, especially in their early or late careers. I found that junior people tend not to be confident enough to ask questions, and very senior ones do not because they don't want to show gaps and weaknesses.
While some articles will teach you something new, others' power is to put concepts and ideas you already know in a novel way. The latter is sometimes even more powerful because human brains love patterns and structure. This article is an excellent example.