YC Idea Matcher
Submit your idea and get a list of similar ideas that YCombinator has invested in before.
This project uses semantic search, an advanced search technique that aims to understand the intent and context behind a search query instead of just matching keywords.
The first step was to collect company data from the YCombinator public API: https://api.ycombinator.com/v0.1/companies
Next, for each company description we generated an embedding, which is a vector (list) of floating-point numbers. For example, the word “Car” can be represented using the following vector: [0.3, 0.8, -0.9].
We then used Neon with pgvector, which makes it possible to store and retrieve vector embeddings in Postgres.
When a user submits a query, we convert it into a vector embedding and find the 5 most similar results. Here is an example query:
SELECT * FROM companies ORDER BY embedding <=> '[0.3, 0.8, -0.9]' LIMIT 5;
You can find the source code on GitHub.