Inspiration

Mckay Wrigley open sourced a Paul Graham Q&A website. I found it useful but wanted it to be more conversational, with access to experts in other fields. I also work remote a lot and miss being around people who have deep knowledge in certain fields. A lot of times I'll want to dive deep into a topic with someone, but finding that 'someone' can be elusive.

What it does

Enables anyone to have (text) conversations with world-class experts.

How we built it

  1. Scrape published data from a world renowned expert
  2. Embed data as vectors in a vector database
  3. When a user converses, embed the conversation as vectors and perform a vector search for related excerpts from (2)
  4. Receive results of excerpts, pass data along with a specific prompt into GPT-4
  5. Receive synthesised answer with relevant source information
  6. Parse answer data as messages to be sent to user (via Telegram)
  7. When user replies to a specific message, use short term memory to give more context to the user's reply

Challenges we ran into

  • getting the right responses and format from GPT-4
  • receiving streamed response, chunking it into sentences, then sending it in order as messages
  • enabling context/short term memory for direct replies
  • hitting rate-limits
  • creating a 'generalisable' scraper and parser as much as possible
  • learning how to scrape the web
  • learning how to set up a Telegram bot

Accomplishments that we're proud of

  • relatively generalised scraper
  • question + response flow works quite well and progresses like a natural conversation
  • prompting + context window works surprisingly well

What we learned

  • how to use Pinecone
  • how to iterate GPT4 responses
  • how to scrape
  • how to set up Telegram bot

What's next for MentorAI

  • Generalising everything (scraping, bot creation)
  • Ingestion of other data forms (video, podcasts, PDFs)
  • Different conversation modes (voice, video, mixed reality)
  • Allowing anyone to create ExpertAgents
  • Agent AppStore?

Built With

Share this project:

Updates