Skip to content

yashusavyminds/Gen-AI-demo

Repository files navigation

Cost Estimation for Report Summarization Using Google Gemini Pro

Scenario Assumptions:

  • Input: 10-page PDF containing mostly numerical tables.
  • Output: Summarized form with commentary, around 3-4 pages.
  • Context Size Considerations:
    • 1K tokens ≈ 750 words.
    • A full-page of dense tabular data likely contains 500-750 words.
    • So, 10 pages of tabular data5,000 - 7,500 words.
    • Converted to tokens: 6,700 - 10,000 tokens.
    • The summarization output (3-4 pages) ≈ 1,500 - 3,000 words2,000 - 4,000 tokens.
    • Total token usage per summarization query:
      • Input Tokens: ~ 8,000 tokens.
      • Output Tokens: ~ 3,000 tokens.
      • Total Tokens per query: 11,000 tokens.

Cost Calculation:

From the image, the cost for Google Gemini Pro:

  • Input Token Cost: $0.000125 per 1K tokens.
  • Output Token Cost: $0.000375 per 1K tokens.

Cost per summarization run:

  • Input Token Cost:
    • (8,000 / 1,000) × 0.000125 = $0.001
  • Output Token Cost:
    • (3,000 / 1,000) × 0.000375 = $0.001125
  • Total cost per summarization: $0.002125 per run

Monthly Cost (Running Once per Day)

  • Runs per month: 30
  • Total monthly cost:
    • 30 × 0.002125 = $0.063756.4 cents

This is a very low cost (~$0.06 per month) because the number of tokens used per query is not excessive compared to large-scale chatbot use cases.


Scaling Considerations

If scaled up for 100 reports per day, the cost would be:

  • Daily Cost:
    • 100 × 0.002125 = $0.2125
  • Monthly Cost:
    • 0.2125 × 30 = $6.38

So, running 100 reports per day for a month would cost $6.38 per month.


Final Summary

  • Single report summarization (10 input pages, 3-4 output pages) costs ~ $0.0021 per run.
  • Running this once per day for a month costs ~ $0.064 (6.4 cents).
  • Scaling up to 100 reports per day costs ~ $6.38 per month.

This is a cost-effective implementation for automated LLM-based summarization. Would you like to tweak these numbers for different use cases or add additional complexity like multi-document processing?

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors