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.
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.
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.
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.
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?
> 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
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.
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!!
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.