# Mckay Wrigley - Paul Graham GPT (Highlights) ![rw-book-cover|256](https://opengraph.githubassets.com/f1b9b714e12810a601d07bf5d9d3ace8dfd783a085e351eb9097b6d87228e1a4/mckaywrigley/paul-graham-gpt) ## Highlights ### Search - Search was created with [OpenAI Embeddings](https://platform.openai.com/docs/guides/embeddings) (`text-embedding-ada-002`). First, we loop over the essays and generate embeddings for each chunk of text. Then in the app we take the user's search query, generate an embedding, and use the result to find the most similar passages from the book. ([View Highlight](https://read.readwise.io/read/01gtkx3qdf9dqf5ec0xvwebk3a)) ^575278577 See the tool [gpt-index](https://github.com/jerryjliu/gpt_index) ### Chat - Chat builds on top of search. It uses search results to create a prompt that is fed into GPT-3.5-turbo. ([View Highlight](https://read.readwise.io/read/01gtkx47ev1smgsfgamn9p5zb4)) ^575278579