Shamim Shams Search

Tag

#ai-fine-tuning

AI Cost Optimization: How to Reduce API Bills Without Losing Quality
· 8 min read

AI Cost Optimization: How to Reduce API Bills Without Losing Quality

A weekend project I built last spring cost me $140 in API fees before it saw a single real user. The code worked. The model responses were good. But I'd written every prompt like money was no object — long system prompts, GPT-4 for every request, no caching, no batching. The bill fixed that habit fast.

Token Limits Explained: How to Chunk and Process Large Documents
· 8 min read

Token Limits Explained: How to Chunk and Process Large Documents

Your 500-page contract review just threw a context length error. The model has a 200k token context window, and you've still managed to overflow it. Welcome to the practical side of token limits. Most introductions to this topic start with "tokens are pieces of text." That's true, but it's the wrong thing to know first. What matters is this: every LLM call has a ceiling, you'll hit it more often than you expect, and the strategy you use when you do determines whether your application returns useful output or quietly fails.

Fine-Tuning vs Prompt Engineering: When to Use Which Approach
· 7 min read

Fine-Tuning vs Prompt Engineering: When to Use Which Approach

Both approaches solve the same problem: getting an LLM to do exactly what you want. They solve it in completely different ways, at completely different costs, and one of them is almost always the wrong choice for what you're actually trying to do.