graphrag icon indicating copy to clipboard operation
graphrag copied to clipboard

[Issue]: how to calculate the cost of each workflow

Open EntropyLix opened this issue 1 year ago • 1 comments

Describe the issue

I print the response in graph_extractor.py, however it didn't print the cost. response = await self._llm( self._extraction_prompt, variables={ **prompt_variables, self._input_text_key: text, }, )

Steps to reproduce

No response

GraphRAG Config Used

No response

Logs and screenshots

No response

Additional Information

  • GraphRAG Version:
  • Operating System:
  • Python Version:
  • Related Issues:

EntropyLix avatar Jul 23 '24 08:07 EntropyLix

I have intergrate the graphRAG with prompt flow trace function, and get the total token count. The LLM call count is :

chunk Number * 3 + coummunity Number + entity Number + ( option: Claim Number)

huqianghui avatar Aug 02 '24 06:08 huqianghui

We are working on an injectable logger to help assess costs. In the meantime, here is a new article discussing GraphRAG costs: https://techcommunity.microsoft.com/t5/ai-azure-ai-services-blog/graphrag-costs-explained-what-you-need-to-know/ba-p/4207978

natoverse avatar Aug 09 '24 00:08 natoverse

Closing this as a duplicate of #581

natoverse avatar Aug 09 '24 00:08 natoverse