42

Just today, the AI question draft editor / formatting assistant experiment went live. From fiddling with it, it seems clear that it's just ChatGPT / a related OpenAI LLM with a prompt designed for revising question drafts. The ChatGPT API isn't free, which led me to wonder about the scale of costs that such a feature might have.

Working data:

(Conservative) Assumptions:

  • (very conservative) there are no blocked or cancelled questions.
  • The AI suggestions feature is used on average once per new question (weak assumption, but I need something to work with- I think it would be more)
  • The cheapest API pricing for ChatGPT is used, and pricing doesn't change in the future
  • Even if question rate is in decline, the average length of questions will remain largely unaffected
  • The number of characters of output of the AI question draft edit output is roughly the same as the number of characters of input

Rough calculations based on the (conservative) assumptions:

  • The average number of characters per (non-deleted) question:
    1,369,837,836 ÷ 693,335
    = 1,976
  • Tokens of input per question (including the prompt):
    (1,976 + 2,639) ÷ 4
    = 1,154
  • Tokens of output per question:
    1,976 ÷ 4
    = 494
  • Cost per question:
    (1,154 × $0.0015 ÷ 1,000) + (494 × $0.002 ÷ 1,000)
    = $0.002719
  • If we take a naïve average and ignore that question influx rate is declining, and just use the average in the [2022-12-01 to 2023-06-11) period, then with (968,660 ÷ 192 =) 5,045 questions per day, that would cost approximately $13.72 per day.
  • If we take what's reported on https://stackexchange.com/sites, which is 3,423 questions per day today, that's approximately $9.31 per day.

(I've made enough ghastly calculation errors that I don't trust myself to have done the above right. Please don't take what I've written as if I did it right).


Questions to Stack Exchange Inc.:

  • Is this estimate accurate? Is this sustainable if you start using the API more?
  • What will you do if the pricing of the ChatGPT API increases?
  • How do these AI features bring revenue / how do you think they will bring revenue?
  • Is this really worth the opportunity costs of whatever else you could be doing with that money? Or whatever you decided to cut off to do this instead?
  • Why aren't other options being taken? For example, instead of AI formatting, you could probably get a lot of mileage out of simple heuristics for common basic mistakes like capitalization of the word "I", wrapping code in code fences, and by using open source code formatters.
  • Or have I gotten this all wrong and you have some sort of "I'll show you mine if you show me yours" agreement with OpenAI to get free or discounted API access if you give them our content for free or discounted for their model training purposes? If so, will you still deliver on your promise to make sure we stop "being denied [our] rightful attribution"? (or was saying that just a way to pacify us?) And if so, what was the point of turning off the data dumps?
21
  • 17
    I'm also curious as to how much benefit there is on running a LLM across a question as compared to something a lot simpler like a simple grammar checker.
    – Shorn
    Commented Jun 16, 2023 at 1:42
  • @Shorn yeah. on the general theme of applications of AI to problems, see also my posts here, here, here, and here
    – starball
    Commented Jun 16, 2023 at 1:46
  • 2
    I would expect there to be some filtering, e.g. to only run it on questions from relatively new users who need help with the site. I don't have a good off-the-cuff estimate for what percentage of questions come from low-rep users or where to apply the threshold for cutting off, but I suppose these parameters could be tweaked to try to find a sweet spot if costs are too high. To prevent abuse, I would expect that users need to be properly registered before they are given access to this route, which could improve registration rates for new users actually.
    – tripleee
    Commented Jun 16, 2023 at 3:56
  • 11
    I wouldn't be surprised if Prosus ends up with an API discount
    – QHarr
    Commented Jun 16, 2023 at 5:44
  • I'd take the current question rate to calculate this which is 3.4k question per day on SO. And you can add some tokens on top of each answer, SE also has to pay for the prompt they use to configure this feature every time it is used. Commented Jun 16, 2023 at 5:49
  • @markalex thanks. fixed now I think. If you find more errors, you can feel free to just fix them. or you can call me out too (it's appreciated :))
    – starball
    Commented Jun 16, 2023 at 6:16
  • 5
    @starball, if we include that cost $0.0035 is not per token, but per 1K tokens, price per post will be somewhere around $0.0017, guestimate per date between 5.91 and 8.93, and price per year around 2160-3260. Even if we multiply this by 2.5 to account for deleted posts, it doesn't sound that bad in the scope of company.
    – markalex
    Commented Jun 16, 2023 at 8:02
  • 3
    Do we even know if they are paying at all? They could have a discount or getting it for free based on some sort of agreement.
    – Joe W
    Commented Jun 16, 2023 at 13:15
  • 1
    I'd guesstimate it's far below the actual cost. There's regeneration (and regeneration following edits), and the prompt itself adds 2700-2800 characters of extra overhead (prior to any patches by SE anyway). Rounding up to 3k for convenience, that's 3.8 USD (3423 questions * 0.0015 per 1k tokens * 0.75 1k blocks of tokens at best (3000 chr/4 characters per token)) in overhead.
    – Zoe
    Commented Jul 13, 2023 at 1:29
  • 1
    In the best case of exactly 4 characters per token, and using the total of 5045 questions per day with deleted, that's 5 / 4 * 0.0015 * 5045 + 2 / 4 * 0.002 * 5045 = 14.5 USD/day. The 5 comes from an estimate of roughly 5000 characters per question (the average (rounded) 2000 characters per question + ~3000 characters in the prompt). The prompt itself isn't part of the output (in an optimal scenario anyway), so I'm using a split calculation. This still doesn't account for cancelled/blocked questions.
    – Zoe
    Commented Jul 13, 2023 at 1:29
  • 1
    There may also be additional costs involved because corporate pricing. This also assumes they aren't using GPT-4, which is 0.03/1k (0.06 per 1k tokens of output), and sounds more reasonable (given that GPT 3.5 turbo is optimised for dialogue, which isn't the intended use-case. Allegedly.). If we look at GPT-4... 5 / 4 * 0.03 * 5045 + 2 / 4 * 0.06 * 5045 is a casual 340 USD per day. It's more or less impossible to tell which applies (because SE doesn't understand the meaning of transparency), but the pricing ranges from okay-ish to expensive.
    – Zoe
    Commented Jul 13, 2023 at 1:29
  • 1
    Realistically, people are also going to use and jailbreak the endpoint and use it as a chatbot or problem solver. Calculating with 5000 questions per day is probably going to be a gross underestimation - even if the number is doubled to account for stuff that's blocked and cancelled before being posted. Between regeneration, scripts, people borrowing the link for use elsewhere, etc., I'd guesstimate they'd land with at least 1-200 USD on GPT 3.5 Turbo, and at least 3k if they're using GPT 4. Again, assuming no special deals that add more to the price, and is only for SO.
    – Zoe
    Commented Jul 13, 2023 at 1:30
  • 1
    I don't really see any scenario where it's sustainable. The only sustainable scenario is where GPT behaves perfectly on the first try, no one regenerates (or edits in a way that requires or makes people want to regenerate), and no one abuses the endpoint for other stuff. However, that's not the world we live in. The question is probably not if it's sustainable, but rather how _un_sustainable it is. If it was allowed to scale, the question would've been how little time it takes before various unexpected uses appear that get to inflate the bill.
    – Zoe
    Commented Jul 13, 2023 at 1:30
  • 1
    There's also more fun when you account for the (fortunately) discontinued title editor. A title is max 150 characters, but the prompt for it involves both the question (~2k characters), and a presumably equally sized prompt. The title is so small in comparison that it can basically fit into rounding errors. The best case scenario would effectively mean 10k characters per question if both were released, and assuming neither prompt continued growing. Double the 340 for GPT-4, and you have the best-case cost of operating both the title assistant and formatting assistant
    – Zoe
    Commented Jul 13, 2023 at 1:33
  • 1
    And it gets even more fun if SE is planning more AI integration options. If we're unlucky and the formatting assistant graduates, there's always the chance it could spread to answers as well, and you add at least 5000 more posts per day. If they decide to expand the wizard with not just formatting, but general guidance, double the token count again, etc. I doubt there's much to gain from specific numbers, but the more AI they add in places that don't need genAI, the faster it becomes a trainwreck dumpster fire
    – Zoe
    Commented Jul 13, 2023 at 1:38

3 Answers 3

17

Regarding your concerns about the API pricing, I would argue that we know nothing.

Consider this: Stack Exchange management has been so enthusiastic about "AI" lately that I would not exclude the possibility of some benefit exchanges going on under the hood. Are you really sure that Stack Exchange is really paying the prices you assume? We can't really exclude this is not part of some sort of "partnership" with OpenAI.

A banner "Stack Exchange uses OpenAI" somewhere on the site would be a decent form of advertising, and the company could also provide some useful data dumps to make the trade even more interesting.

Alas, the actual issue is that the model used is generic enough that it will indeed catch poor grammar and formatting. To be fair it will even try to format code correctly.
But it is still unable to catch many other common issues.

enter image description here

I wrote this fake poor question to see what the model would suggest. As you can notice the suggested edit does indeed improve the question somehow, but does not address some of the network specific common issues like signatures and salutations in the post.

All around this is a decent idea that could do some good to the network if the cost is actually worth the effort. But it needs more fine tuning to our specific needs.

UPDATE: Forget everything I said about this being a good idea. This is simply too easy to abuse to be safe and can produce a plethora of horrible results. Please refer to this post instead: link.

Short version: it is trivial to use the tool to generate entire questions (that can also be used to trick people into using malware packages), providing answers, writing fictional stories and poetry, playing chess games, searching and linking content on the internet (I could get the tool to provide me the picture of a cat) and even have the network itself generate spam advertising for you...

5
  • 1
    The partnership idea is compelling, but then I wonder why they went to the trouble of turning off the data dumps.
    – starball
    Commented Jun 16, 2023 at 7:58
  • 7
    To dissuade other AI firms from trying to harvest information?
    – tripleee
    Commented Jun 16, 2023 at 8:39
  • 1
    This is a valid point, they could have a data sharing agreement that is being used to help train the model which would explain why they want to prevent other models from getting the data for free.
    – Joe W
    Commented Jun 16, 2023 at 13:16
  • 1
    @JoeW the fact the tool can hallucinate full questions could indicate that some training was indeed made, but personally I think we don't have enough proof. Even if the model has SO data, we don't know when it was acquired.
    – SPArcheon
    Commented Jun 16, 2023 at 13:33
  • Correct, we don't know either way and I think it is wrong to be focusing on what it could be costing the company instead of the impact that this new tool could have on question quality.
    – Joe W
    Commented Jun 16, 2023 at 14:47
4

I'm really not sure how much this says about sustainability actually, but from the 2023 WAD fireside chat with Joel and Prashanth, at 41:28, according to Prashanth, the plan is the cover the costs of OverflowAI using earnings from Stack Overflow for Teams, and from "pricing all these additional capability on top of what we sell with Stack Overflow for Teams".

-2

It is not monetarily sustainable now. Nor does it need to be for an indefinite period, so long as it helps retain the platforms status as the Q&A place with the highest quality & user base.

  1. My estimate is even more tokens than that are needed to make this more than just an expensive new toy. New questions may be an easy place to walk first steps. But the bulk of the useful edit suggestions it can do is not in new questions. New questions, particularly those by new users, are most meaningfully impacted by problems outside of what LLMs can assist with (logic, OP knowing not knowing the goal yet either, misunderstandings). It is maintaining existing, still-relevant questions where tiny changes end up with huge impact. That is where the accompanying human reviews are justified.

    I am somewhat optimistic a lot more human review could happen (even wildly exceeding current rates new Q&A) if only the tooling to keep side-effects in check is finally well-integrated and well-understood.

  2. But for the near future, we can just consider that one-time investment. The matter of sustainability is not decided by how expensive generating all suggestions are, merely how long they compare that badly against recurring costs that remain about the same.

    Any increase in productivity of equally paid humans is going to be offset by increase in productivity of more advanced hostile application of LLM. But number crunching? Current COTS offers are bound to get orders of magnitude cheaper in the near future. Who knows, maybe killing off a few of the industries currently competing for GPU power will make that price drop happen even faster.

  3. Of course, those new integrations would need to be tuned for the right goals. Even just the decision of whether to suggest changes inside of code/quotes changes what the integration will accomplish. The lack of low-hanging fruits (automatic code formatting & canonicalization) so far does not inspire confidence that LLM integrations are going to be configured to maximize the metrics I care about (high-quality, accessible library of knowledge).

If a fraction of a cent in LLM output buys an hour of humans updating, merging and improving old answers, that I can imagine as sustainable. If that is the direction SO wants to go after finally accepting that new and fresh Q&A should be expected to lose relevance in comparison to working on "old" content.

5
  • 3
    "The best application is maintaining old, still-relevant questions" uh... more explanation needed. But if we want to go that route, money isn't the only massive cost. If there's human oversight (and there should be), that's a huge cost of (the community's) time and effort, and if there isn't human oversight (bad), that's the huge potential cost of vandalizing existing content (Ex. changing semantics- whether subtly or not).
    – starball
    Commented Jun 16, 2023 at 2:09
  • 1
    @starball I am comparing the sum of the impact of capitalizing all the right I's for the entirety of three people who vote to close.. against the sum of the impact of 8000 people reading the question while researching the same problem and saving a minute of their life each for not having tried to decipher the contextually irrelevant, lost-in-translation reference in the introductory remark.
    – anx
    Commented Jun 16, 2023 at 2:20
  • 1
    I am still puzzling over what you are trying to say. You seem to be suggesting that the model will be made available whenever a question is edited, too; but why would SO choose to do that? If someone opts to edit a question, surely they already have an idea of what needs to be fixed.
    – tripleee
    Commented Jun 16, 2023 at 6:29
  • ... Or are you assuming that the LLM would fire each time a question is visited for the first time? Needs details or clarity.
    – tripleee
    Commented Jun 16, 2023 at 6:33
  • @tripleee They would do so because it aligns well with short-term investment capital. If they offer their still massive user base better invitations (better than current review queues) to work on old/other peoples contributions, they have bought themselves measurable short-term interaction for measurable short-term expenses. If the site has a few suggestions already prepared for me before I even chose which edit to begin, and uses my screen space to show me related (of the kind only a word-cruncher would spot so well) answers, that is a major edge over less spending-happy other Q&A sites.
    – anx
    Commented Jun 16, 2023 at 8:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .