50 Comments
User's avatar
Barely Thinking's avatar

Wauw that's great!

I am actually working on a product that let's Product Managers use GPT to help them with product discovery!

Really interesting to see this different approach.

Expand full comment
Dan Shipper's avatar

amazing!!

Expand full comment
Barely Thinking's avatar

Dan, I have been thinking about how great it would be to combine the Lenny Bot with the ordinary createCompletion endpoint.

As you demonstrate in the article, it can give great answers by providing some context in the start of the prompt.

Imagine that the LennyBot would generate the context, for the prompt, and then use createCompletion to provide an answer. In that way, it can combine both the knowledge from Lenny's database of newsletters, and the power of GPT-3 to elaborate, follow up and more. For example you would be able to ask: "Can you elaborate on this and relating to product management first principles?"

Expand full comment
Barely Thinking's avatar

If anyone is interested, follow me on Twitter. I recently posted a GIF of how it works. It's pretty cool I think

Expand full comment
Andrew L's avatar

I got a type error when I tried to construct the index.

Line43

__init__() got an unexpected keyword argument 'verbose'

Any thoughts what might have gone wrong? I have little or no coding background.

Expand full comment
Shaunak Das's avatar

I got the same error while implementing this.

I fixed it by fixing syntax for installing gpt-index.

!pip install "gpt-index<0.4.0"

Expand full comment
Andrew L's avatar

Thanks. That fixed it.

Expand full comment
Michael Gackstatter's avatar

Same here, has to do with the Python version?

Expand full comment
Nick Markman's avatar

Such great stuff! Thank you. The colab notebook is gold.

QQ: any tips on how you were able to get the referenced articles/URLs included in the bot responses for https://www.lennybot.com/? Would love to pattern match off this.

Expand full comment
Dan Shipper's avatar

That is a bit more advanced! Might release that as a followup!

Expand full comment
Nick Markman's avatar

Figured as much :)

Would be super interested in learning more.

Expand full comment
Liran's avatar

That would be great. or if you can just give us some guidelines how to approach it?

Expand full comment
Josh Dance's avatar

This is awesome!

There are already a few companies popping up that will do this for you.

https://www.docuchat.io/

https://www.chatbase.co/

https://www.humata.ai/

I am going to be talking about how to train your own chatbot in my weekly newsletter. https://mythicalai.substack.com/

Expand full comment
Olivia's avatar

Hi Dan, I successfully followed all the code and have the chatbot created. How can I make it into a website like the LennyBot is? I guess I am asking how to get the code into a prettier, more user-friendly resource.

Expand full comment
Reina bean's avatar

Incredible

Expand full comment
Peter Moreno's avatar

What’s the cost associated with building a chatbot using these tools, if a business wanted to take advantage of this process?

Expand full comment
Dan Shipper's avatar

It's very cheap for embeddings, probably less than $10 depending on your corpus. Then each request is $0.02 / 1000 tokens—so depending on your usage it probably won't be that expensive.

Expand full comment
Peter Moreno's avatar

Appreciate that Dan, exploring the application for something like this.

Expand full comment
Kade's avatar

Okay but can I hire Dan for a chatbot build?

Expand full comment
Dan Shipper's avatar

DM me on Twitter!

Expand full comment
Kade's avatar

I did! @NascentNuance

Expand full comment
Stavan Mehta's avatar

Hey Dan,

Thanks for sharing really amazing article on GPT3 use.

Can you please update the colab notebook access? Because I am getting error message "Notebook loading error

There was an error loading this notebook. Ensure that the file is accessible and try again.

Invalid Credentials

https://drive.google.com/drive/?action=locate&id=1p2AablavDkSXly6H-XNLoSylMtoz7NDG&authuser=1".

Expand full comment
Dan Shipper's avatar

Hey!! Can you tell me more? What browser and device are you using? Can you try loading in incognito?

Expand full comment
Kevin Holland's avatar

@dan - running into this same issue as well with the Colab link.

looks like the link should be updated to remove the 'authuser'

Expand full comment
Dan Shipper's avatar

Ahhh! Okay can fix

Expand full comment
Lenny Rachitsky's avatar

Fixed!

Expand full comment
Stavan Mehta's avatar

Thanks Lenny!

Expand full comment
Stavan Mehta's avatar

Thanks Dan, really appreciate it!

Expand full comment
Vindiw Wijesooriya's avatar

Hey Dan,

Really cool guide on building our own chatbot with GPT-3!

Coincidentally, we recently launched an MVP product which allows a similar concept to what you've used but where people can talk with their data.

Here's a short video demo - https://youtu.be/QxgKcvpu5UM

Expand full comment
Dan Shipper's avatar

awesome!! thanks for sharing :)

Expand full comment
Teach Your Kids's avatar

I tried it and it worked really well for me! Here's what I got.

Hi! How do i come up with good prompts for my online community?

The best way to come up with good prompts for your online community is to talk to your potential members and identify their needs and motivations. Ask them what topics they would be interested in discussing, what challenges they are facing, and what kind of content they would like to see. You can also look at what topics are trending in your industry and use those as prompts. Additionally, you can look at what other successful online communities are doing and use their prompts as inspiration.

For more information see: A founder’s guide to community

Could you give me some specific examples of good prompts for my online community?

Sure! Here are some examples of good prompts for an online community: - What tips do you have for staying productive while working from home? - What are your favorite online tools for collaboration? - What strategies have you used to stay connected with your team while working remotely? - What advice do you have for managing stress during this time? - What have been the biggest challenges you've faced while working from home? - What tips do you have for staying motivated while working remotely? - What strategies have you used to stay organized while working from home? - What advice do you have for staying focused while working remotely? - What have been the biggest successes you've had while working from home?

For more information see: 🤩 Community wisdom – Issue 2

Expand full comment
Dan Shipper's avatar

Amazing, I'm so glad to hear that!!

Expand full comment
Teach Your Kids's avatar

I would really like to find someone who could build this for our newsletter. Would you know anyone who might be able to help? This would obviously be paid work.

https://joinmodulo.substack.com/

Expand full comment
Teach Your Kids's avatar

One question it wasn't able to answer was whether Lenny will be using the questions from this bot to inspire future newsletters. I was curious about that, and if the responses were recorded.

Expand full comment
Dan Shipper's avatar

we aren't currently recording the responses, but I think that could be a cool next step if there's a lot of usage!

Expand full comment
Teach Your Kids's avatar

I think this will definitely help Lenny save time. I dug a little deeper and asked very specific questions such as who produced his podcast and was able to get answers.

Expand full comment
Roel's avatar

Looks good. I'm looking to do something similar for my company's website. I see that you're using davinci-003. According to the OpenAi website, the only more advanced model for embedding is text-embedding-ada-002. How did you make this work?

Expand full comment
Rajat Agarwal's avatar

@Dan thanks for this! I was able to replicate building this for a different corpus of data. However, I'm trying to figure out how to get the responses to include the URL of the relevant post for more information. Could you help clarify how you did that?

Expand full comment
vincent vandegans's avatar

Thank you, this is master piece. I managed to use the collab successfully in a python environnement. I would really appreciate if you could help me with this extra question : how to make the bot answer with a link/url ? I tried to add URL's in the dataset, but it keeps on answering things from the openAI original dataset.

Thank you in advance,

vincent

Expand full comment
Mesut Felat's avatar

great article, is it possible to use the trained model (on the data you provided) without openAI as it will cost money for every question asked I'd assume?

Expand full comment
Tobin Harris's avatar

What an awesome article, thanks!

A shame you can't build the index offline, rather than using OpenAI tokens. Is there a reason for this?

Expand full comment