🔍 Measure every request
cost = (p_toks*IN_RATE + c_toks*OUT_RATE)/1000
Track token cost per endpoint →
Find your most expensive flows →
Optimize.
11
🧠 Cache before you call.
If a task is deterministic (like summarizing, parsing, or classification),
cache it.
Even a 10% cache hit saves 10% of your cost 💾
8
🔹 Control model output
Limit max_tokens
Add stop sequences
Output JSON (no fluff)
Lower temperature
Prevent run-on responses that double your bill 💰
12
🔹 Trim your prompts
Shorter system instructions
Don’t resend static context
Summarize chat history
Use 1–2 examples max
Cut prompt tokens → cut 20–40% of cost instantly.
9
🧩 A token ≈ a piece of a word.
1K tokens ≈ 750 words
1 token ≈ 4 characters
Your prompts aren’t words — they’re invoices.
4
🎯 AI Cost = Tokens × Model Rate
Cost = (prompt_tokens × input_rate/1K)
+ (completion_tokens × output_rate/1K)
Example (GPT-4o):
700 input + 150 output → $0.00575/request
100K/day = $575/day 😬
14
Under Subhash chowk flyover
#MCD #Gurgaon #subhashChowk #Gurugram #munc #MCG #gmda #swachhbharat #cleaning
Manish retweeted
Do not listen to rich boys, eating at home is a healthy practice. One that can prevent many diseases, lead to sharing between communities, and deepen bond of love and security. Learn to cook. Practice it often. Irrespective of gender, age or income. #gharkakhana
Manish retweeted
The problem of high school fee is not going anywhere.
[1] Most people don't want to send their kids to government schools.
[2] India has a growing population. And, our population will peak by around 2065.
[3] Supply of schools is controlled by business people, politicians, builders etc. The nexus is strong.
Some really dumb education policies like right to education has simply killed 'average' schools.
Thereby reducing the supply of average private schools that used to charge okay fees.
So welcome to the world of private schools controlled by elitists, who will charge a bomb to average tax paying citizens, who will not send their kids to government schools.
Manish retweeted
While I could probably refactor #ReactQuery to use middleware too and get the meat-and-potatoes bundle down to around where SWR is, it would ultimately require users to add a bunch of middleware to get it back to today's 💯 functionality, bringing it right back up where it is 🤷♂️
Manish retweeted
just set up the first email for my course on Interactive React applications :)
It's a Framer Motion mini-course for free, as an introduction to both framer motion and your instructor :)
interactive-react.com
.
Manish retweeted
Replying to @BeerBicepsGuy
Wealth is what you don't see,
Luxury and Cars is not real wealth, Wealth is what you don't see
Souce : amzn.to/3iAb05f
Manish retweeted
Replying to @naval
The source of wisdom is curiosity.
The source of curiosity is desire.
The source of desire is pain.
Manish retweeted
Good tips on code reviews focused on the reviewer: https://teapawt.net/t.co/NI0QlWUPnk by @deliberatecoder
- Review your code yourself 1st
- Break up large changelists
- Automate the easy stuff
- Narrowly scope changes
- Respond graciously to critique
- Minimize lag between rounds of review
Manish retweeted
The Google Chrome team wrote a RFC for an image components built into Next.js:
◆ Aims to improve performance (LCP and CLS)
◆ Built-in image optimization
◆ Automatic srcset
◆ lazy-loading
github.com/vercel/next.js/is…
Manish retweeted
Got questions on getting started with Docker? We have answers. Join for our latest live Docker Talk today at 10 AM Pacific. https://teapawt.net/t.co/RfNEo3N7yt #Docker #Containers #DevLife #AskAway
Replying to @Airtel_Presence
@Airtel_Presence @airtelindia only doing message was a priority. email or call yet
3
@airtelindia @Airtel_Presence : not a single call after sending so many messages #shit #service. no one picks in customer care too


















