In case the YouTube embed doesn’t work, here is a link to the loom

Inspiration

The inspiration for delphi came from a conversation that happened at the networking/team-finding event. Credit for the original idea goes to Patrick - he pitched the idea of being able to contextualize news articles as you read them (Patrick if you're reading this, reply to my LinkedIn message 😊).

Inspired by my very long list of books to read (and incredible laziness), I wanted to build something that would allow you to process new information and see the world with all the wisdom that you aspire to have (but didn't have to time to obtain from reading all these books).

What it does

delphi is a chrome extension that allows the user to select a book that they wish they read, and then browse the web with all the insights they would have had if they actually read the book. The user can select a portion of text on a website, and delphi will retrieve passages from the book that are relevant to the text. delphi then uses GPT to draw parallels, insights, and comparisons between the passages in the book and the selected text, and displays them inline on the website.

If the user finds these insights valuable, they may want to purchase the book to actually read in its entirety. delphi will automatically navigate the web and purchase the book through an online merchant if the user clicks the "Buy Book" button.

How we built it

I started with the chrome extension, and made heavy use of ChatGPT to create a basic extension that would be able to read any text selected by the user on a website and pass it to a background worker. That worker could then call a backend service to obtain a GPT generated blurb outlining some relevant insights drawn from a pre-determined corpus of text.

The next step was to build the backend service, which mainly needed to be able to 1) embed a document/set of documents, 2) retrieve relevant extracts, and 3) use GPT to generate insights given the two pieces of text. I knew that there were plenty of open source Q&A-over-a-document projects out there, so I picked one that I thought was good. Then the main change would be to modify the prompts (and hopefully not too much code) to draw parallels/insights/comparisons instead of answering a question.

Finally, I wanted to build towards a product that could generate revenue, so I toyed with offering this as a way for bookstores to sell their books. I also just co-founded Granite - a startup that makes it super easy for developers to make purchases in browser-automation/LLM based workflows - so it was a natural fit to quickly wire up a headless browser (using playwright) and use our granite-js SDK to purchase the book in question from Barnes & Noble's website.

Challenges we ran into

An obvious challenge would be the amount of work I needed to get done given the time limitations I had (unfortunately I also had to work my day job). Another was that I had never made a chrome extension before. Surprisingly, both ended up not being much of a challenge, thanks mostly to how efficient ChatGPT makes programming even in a new domain, as well as the wealth of open source projects out there.

Something that actually was kind of painful was dealing with package dependencies (especially ML projects on a M2 mac)...

Accomplishments that we're proud of

Definitely proud of the amount that got done in about 10 hours, and as always I am awed by the power of building (especially in the 0-1 domain) alongside GPT.

What we learned

I think one of my main takeaways is that there's still almost unimaginable potential out there for AI-powered products. Despite the plethora of document Q&A projects out there, I think delphi tackles a niche that at least fulfills a personal need in a way that no other project does. I have no doubt there are a million other niche applications out there where an AI-powered product can uniquely enrich our daily life.

What's next for delphi - just-in-time knowledge

I think I'll try to develop delphi into a tool for personal use for now. I can see it being incredibly valuable when reading about more academic/scientific topics, and I think it could actually be really insightful to use when actually reading a book.

Some improvements I would make:

  1. UX: Build out a more robust and user-friendly way to select books to include in your library and reference the exact passage(s) that the model is drawing from
  2. Faster (and cheaper): Use gpt-3.5-turbo, a more applicable vector retrieval method, and utilize faster vector storage

Built With

Share this project:

Updates