graphrag icon indicating copy to clipboard operation
graphrag copied to clipboard

huge openai API usage for very small amount of text for indexing

Open hemangjoshi37a opened this issue 1 year ago • 5 comments

it just used $15 for a very small amount of text to index on openai API. Is there any solution to reduce cost for this ? I was just testing initially and it just wiped out $15 with just one indexing command. I believe this is good way to earn money for Microsoft and openai and rob it's users.

hemangjoshi37a avatar Jul 08 '24 10:07 hemangjoshi37a

Adding an additional warning here: https://github.com/microsoft/graphrag/pull/439

stevetru1 avatar Jul 08 '24 14:07 stevetru1

You can also use different models to make things cheaper. currently the default is gpt-4-turbo which is more expensive than gpt-4o. You could also use tools like https://ollama.com to run open source models locally and use them

kdawgwilk avatar Jul 08 '24 19:07 kdawgwilk

it is due to the token of prompt is too large when extracting entity...you can try to delete some examples.

KylinMountain avatar Jul 10 '24 10:07 KylinMountain

it just used $15 for a very small amount of text to index on openai API. Is there any solution to reduce cost for this ? I was just testing initially and it just wiped out $15 with just one indexing command. I believe this is good way to earn money for Microsoft and openai and rob it's users.

They did run a demo showing that they used $12 indexing a book.

ngcheeyuan avatar Jul 12 '24 04:07 ngcheeyuan

@kdawgwilk how to use it with ollama . any documentation or any tips for this ?

hemangjoshi37a avatar Jul 12 '24 09:07 hemangjoshi37a

@kdawgwilk how to use it with ollama . any documentation or any tips for this ?

Lots of conversation going on around ollama, I've been closing issues and pointing to a consolidated issue #657 .

I'm closing this otherwise, given that we've put a warning in that it can be expensive and we strongly recommend starting with a small sample to evaluate the quality and cost before you throw a lot of data at it. You can also run much cheaper models than gpt-4-turbo on OpenAI, as mentioned by @kdawgwilk

natoverse avatar Jul 23 '24 00:07 natoverse