August 11, 2023

Submit your idea and get a list of similar ideas that YCombinator has invested in before

YC idea matcher

Screenshot of the app UI

This project allows you Submit your idea and get a list of similar ideas that YCombinator has invested in before.

The project is built using the following technologies:

How the app works

You will find a script called generate-embeddings.ts located in the root directory of this project. After running npm run generate-embeddings, the script does the following:

  1. It creates the database schema and installs the pg_embedding extension
  2. It goes through the YCombinator API 'https://api.ycombinator.com/v0.1/companies?page=1' and gets all the companies
  3. For each company it generates embeddings using the long description and then stores the company data in the database.

Some companies don't have a long description, so we needed to manually remove those from the database by running delete from companies WHERE embedding = ARRAY[]::real[];

The app itself is a Next.js app with an API route located at /api/idea. Whenever a user submits an idea, the following happens:

  1. The idea is sent to the OpenAI API to generate an embedding
  2. We then use pg_embedding to retrieve the top 3 most similar ideas