Ben Borgers

Prototyping an AI-powered note-taking app

May 18, 2023

Greetings from Croatia!

Iā€™m on vacation here with my parents. But in the airport, in the car, and in the evenings, Iā€™ve been tinkering with building a note-taking app.

The idea was for a note-taking app where you can ask an AI assistant questions based on your notes:

How I built it

  • Laravel, React (via Inertia)
  • A background job periodically extracts new paragraphs from your notes and ā€œembedsā€ them using OpenAIā€™s embeddings.
    • How do embeddings work? (Based on Benā€™s very basic understanding) An embedding takes a piece of text and outputs a vector, an array of 1,536 numbers that identifies a point in 1,536-dimensional space (just like 3 numbers identify a point in 3D space).Then you can take any two pieces of text thatā€™ve been ā€œembeddedā€ into a vector and calculate how far apart they are (like you could for two points in 3D).That distance between the two points is how closely related they are ā€”Ā for example, a sentence about ā€œcatsā€ and ā€œpetsā€ would be more closely related than a sentence about ā€œcatsā€ and ā€œmountainsā€.
  • When you ask a question, the app embeds your question and finds the most relevant paragraphs in your notes.
  • It feeds these paragraphs into ChatGPTā€™s API, along with your question, and the AI synthesizes an answer.

meh

I donā€™t think Iā€™m gonna keep building this.

feature parity

Note-taking apps are a fickle thing to build, and despite this I keep trying to build them. But thereā€™s a ton of features that a note-taking app eventually needs to have to be in line with the myriad of note-taking apps out there.

If Iā€™m going to ask people (starting with myself) to use this app, it needs those features. And Iā€™m the one whoā€™s going to have to build them all, and make them nice.

is this useful?

After thinking about it, Iā€™m not convinced that ā€œChatGPT for your notesā€ is a useful concept.

Every use-case I can come up with can be solved by really good search, powered by vector embeddings. But feeding the search results into AI and having it synthesize an answer doesnā€™t seem to add any value, and costs speed and money for each question.

(If you have ideas of common situations where it would be useful, please let me know!)

And at the end of the day, good search is a feature, not a product. Iā€™m sure Notion and all the others are looking into using embeddings to power their search. I look forward to when that happens.

More blog posts

Subscribe to my newsletter for a monthly round-up of new blog posts and projects Iā€™m working on!

Twitter ↗ RSS feed ↗