159 points · by ibizabear · 3y ago · 132 comments
I'm an HN user for 5-6 years but I wanted to use an alt for this as it's a bit sensitive.
Last week I created a ChatGPT clone for my city. It's basically a laravel app hooked up to GPT3.5-turbo with a custom prompt that makes local references and talks in the way that people in my city talk.
It's been a surprise hit and now I've had 20,000 chats coming through in one day - people where I live really seem to love it
The problem is that I likely can't afford to keep hosting this. It's cost me $50/day for one day, and Adsense doesn't allow 'chat apps', so I'm at a loss at how to cover the bill for this app. I've already optimised the prompt and reduced the number of tokens I'm sending
The app a joke really, but it's a local joke that seems to be quite popular and connecting with my city. Should I try to raise donations? Is there an advertising provider I could use that would potentially cover the costs? Is there an alternative to OpenAI that is comparable to GPT-3.5 that I could self-host cheaper?
Any and all advice appreciated. I don't care about profit - I just want to keep the app online so people can enjoy it.
Call them up one by one and say "hey I run [project] that everyone has been using lately, would you be interested in having your business name listed as a sponsor? It'll be shown on 1/4 page loads which is currently 5000 times a day. $500/month".
You'll know in like an hour if there's any advertising potential.
One day two salespeople contacted me and suggested taking over ad sales, and managed to sell thousands (I think it was somewhere between $5k-$10k/month, but it was a long time ago) a month in ads for the site. This was for a city with a population of 200k.
Don’t think just because you are very smart you can do sales. This is like business people trying to “learn coding” so they can put together some huge product. It doesn’t work well and isn’t scalable.
Try a little, see if you can grow.
OP can totally give some basic marketing a go. The product isn't turning even creating revenue - hiring marketing now, without at-least testing the water himself would be silly.
Lots of devs start in sales because those jobs/careers are incredibly prevalent. Think basic sales jobs like retail, call centers, etc.
Lots of business people unironically "learn coding" to great success. Some even build "huge products" that solve big problems.
---
Anecdotally, I know people who fall into all of these categories. I don't think we should condemn people to one function/talent... and, I don't think we need to talk down to cross-functional devs or business people.
You could also sell advertising the old-fashioned way -- ask local businesses or perhaps a local university if they'd like the model to mention them in certain prompts.
But your best bet is probably to treat this as a loss leader and put up a small banner offering "In-Person Generative AI Consulting" in your metro area.
$50/day is pretty small relatively speaking, so just finding a local corporate sponsor and running an ad for them would probably work.
If the project is really becoming a local hit then you're bound to get contacted.
Alternativly or additionally you can ask for donations on that banner. And a link where OP explains his situation, no profit, just costs, but like to keep the thing running.
You could also compute embeddings for the questions (don’t have to be OpenAI embeddings), and reuse the answer if the question is sufficiently similar to a prevously asked question.
Wouldn't it be almost impossible to hit a duplicate when the users each form their own question?
Another issue I see is that these chat AIs usually have "history", so the question might be the same, but the context is different: the app might have received "when was he born", but in one context, the user talks about Obama and in another, she talks about Tom Brady.
If there are ways around these issues, I'd love to hear it, but it sounds like this will just increase costs via cache hardware costs and any dedup logic instead of saving money.
The embeddings approach would increase the likelyhood of finding the same question, even if phrased slightly differently.
Regarding context, that should be a part of the input for the embeddings.
I assume only a small percentage of users would put in the same prompt twice, and even then, why would they be upset at getting the same response?
If your lucky and it’s still going strong after that time you’ve got something worth more than your hosting bills.
"## eyes see this space every day; rent this ad space. contact ..."
As for what to charge or how to structure the ad sale, do a little research or hire someone who knows that business (and give them a cut of ad revenue or some other attractive compensation).
But the donations route could also be a fun way to lean into the local element of it if the cost remains high. Could have a simple line of text when the page loads that thanks one of the donors for that day.
What you can do is to use caching and embeddings. Embeddings are like X,Y coordinates (except with OpenAI it's 1500 dimensions not just two). You use embeddings on any type of text. Here you would embed user prompts and store answers. And what this means is, you would be able to get X,Y for "best restaurants close to the museum", "best places to eat" etc.. If a new user comes along and mentions food and museum, it's likely to rank highest for "best restaurants close to the museum". I haven't done this and idk if possible, but you could try to then check if this is "close enough". If it is, then you can probably return the same generated answer for this user. You can also embed answers and see if that has better result.
Process: 1. When user asks a question, you embed it and search with it. 2. If similar prompts exist; return the answer from the most "relevant" prompt. 3. If no similar prompt exists; generate a new answer, and store it to be associated with the prompt.
This might decrease quality, but maybe in "enough" cases, it does just fine.
I'm developing tzap.io that uses some of these techniques, join our discord if you want to get in touch: https://discord.gg/88xDVYbPVB
> I've already optimised the prompt and reduced the number of tokens I'm sending
Lets assume you've found, or will find, all possible technical optimizations for your AI spend on ChatGPT.
You can:
* Ask for donations
* Accept a $50/day cost for X days as a market research budget to find a monetization plan
* Have some "first 5 questions are free, next are paid (or whatever)" to rate limit cost while maybe raising revenue
* Look for a common pattern of questions to see if there's some value / insight into your users that can be used as a source of revenue
* Find a cheaper LLM that supports your needs while being serviceable
* Pull the plug because its a joke, claim credit for it, and take the learnings onto the next thing
edit: grammar & formatting
One option to get the costs down would be to use a local LLM. It isn't likely to be as fast/good as GPT-3.5 but at least would give you a fixed cost per month (hosting).
If you had local hardware, given that traffic is going to be pretty low, if you have decent bandwidth at home and some hardware, you could even host there.
It's not that cheaper if you want similar level quality and inference speed. For commercial usage, OP will require training his own model since no good commercial alternative exists.
As opposed to API based where you pay more per use.
Remember this isn't a commercial service that OP is creating, it's an amusing Chatbot, they have no revenue, so fixed costs are likely to be a better model.
Could be a feature rather than a bug? :)
Not impossible, but tricky.
I bet you could find local sponsors who can pay you on a monthly basis
Also because internet, expect 90% of cost to be from abuse, and likewise 90% of your dev time devoted to fighting it.
Either way, there's definitely an opportunity for funding. In the case of Glasgow, there's a huge populous out there that are descendants of folk from the city/country taking pride in it (arguably more than a bunch of us that live here!) and like to get in on the banter.
That's certainly an avenue worth exploring if there's a similar relationship with folks or families of folks that emigrated away, but feel a strong connection.
Edit: You'll have to excuse my unfamiliarity with LLMs, but if you're storing messages and responses, and if there's a way to check that a message has already been asked, would it be possible to replay that (at least on the first message) instead of running a new query against the API? If they then engage further, then it would send the job out?
https://thetab.com/uk/glasgow/2023/02/15/glasgow-uni-working...
> The problem is that I likely can't afford to keep hosting this. It's cost me $50/day for one day
If your traffic continues to increase at a rapid clip, you may want to look into investors for your project. You could still keep it mostly nonprofit if you think it is adding a lot of value for people.
Alternatively you could try swapping out an open source model like llama on the back end (possible licensing issues here).
Another option would be to seek out ads for local companies directly since it is an explicitly local product. Cold calling would probably be the best place to start. You could also pay attention to who is paying for billboards in your area and try contacting them.
I've decided to go with a big old banner ad for now as I think there are some local businesses who might go for it. Whatever happens, it's been a fun 2 week ride! Awrabest
And you could try some alternatives to AdSense like:
Ezoic, MediaVine, or Adthrive
Another online possibility: throw up some Amazon (or similar) affiliate links to products and services, maybe even based on what people type (if that's accessible).
And next to them "opt out of the ads" link that goes to a donations website, to get fancy. Helps clear the conscience about having the ads in the first place.
If done right, it won't even be adblocked (because you can do it with no tracking at all).
Depending on the size of the city, and the queries, you should have a good idea where to look. If not, check the local church bulletins, the local softball/school fields, and anywhere else you find local business advertisements.
Sell it as a 'Google ads back in 2002', frame it in terms of high risk high reward. Sure its unproven, but back in those days, a lucrative click may have only costed $1,$2. When search ads got fully proven, they started costing $100/$200.
It might be hard to implement it in a week but a hastily put AWS & stripe solution might work.
If you do ever implement it, do mention it on HN, I would definitely buy couple of slots.
Hugging face and others should help verify if anything can, or how close it is.
Tell them you’ve proven the hypothesis and achieved product market fit by showing the data from this one city and say you’re raising capital to take it to the next step.
Good luck!!
Regarding regret, missed opportunities can also lead to regrets, especially if someone were to take OP's concept and create a clone and it actually becomes big.
We all need to pay bills at one time or the other.
The smarter way would be to open up sponsor opportunities for certain categories, for example: restaurants, retail (tire shops, hardware stores, clothing stores), common service industries (plumbers, electricians, landscaping, website design, general contractors, computer/cellphone repair)- then sell those placements for $200-500/mo to whoever wants to have the placement for that.
Replicate this for other cities and you have a healthy business - you can hire people to sell these ad spots in their respective regions and you can actually scale it up. Billboards work in the same way. Those billboard companies might even be interested in selling their placements to your viewers.
Switch out the backend, there are open source alternatives, and the results could be "good enough".
Get a list of local sponsors, offer them 1k ad placements for X dollars/euros/etc... , and inject them into your prompts.
As it is a joke site, I don't believe people will mind if the chat has ads, especially if you mention somewhere that it's financially hard to keep the site up.
Look for resellers or programmatic direct services to get started.
If someone wants to do a SaaS for this kind of thing, that would be great too.
Make users to be able to use X tokens per month for free and offer them to buy tokens that would keep your business going.
You'll divide your audience and current traction. You'll loose many but also have a way to make your business sustainable.
If it persists or you think it will, reach out to me at parham@bearly.ai and we'd be interested to sponsoring it or helping how we can :)
You get a few free uses each week and then you need to buy credits/sign up and unlock more?
Also, maybe you can use sometime kind of caching combined with some mbeddongd search to serve the previous response, if the input is similar above a certain threshold.
Convert your server cost to a pay as you go model. You are currently paying even for time when your server is idle. Containerise your app and run on something like AWS Lambda which has a pay for what you use model.
- s3 is cheap for storing your model data and as long as you are just reading that should be fine.
- AWS Lambda has 1 million free invocations per month in free tier.
- Post that you pay $0.60 per 1 million requests
- AWS stack is just an example, you can easily use GCP Cloud run or any other equivalent service.
Can you cache some of the interactions and serve the cached version for the most common ones?
The whole thing is trivial to make. The system prompt is trivial. I would even say it was harder to make a geocities page in the 90s than to make a chatbot like this.
3.5 turbo is great to play with but at scale it is brutal cost wise.
The real issue though is anyone who already has a working 3.5 turbo chatbot can knock this off in the next 5 minutes by just changing the system prompt.
I think this is the future though. The labor is pretty much trivial, the capital for tokens at scale is what matters.