How to Reduce LLM API Costs: 12 Proven Techniques
Learn how to reduce LLM API costs with 12 proven techniques, from prompt caching and model routing to batching, semantic caching, and token monitoring.
WRITING / NOTES FROM THE FORGE
In-depth tech articles on system design, DSA, AI engineering, data engineering, and building software that lasts.
Learn how to reduce LLM API costs with 12 proven techniques, from prompt caching and model routing to batching, semantic caching, and token monitoring.
Big O notation explained with real code: how to read O(1), O(log n), O(n log n) and O(n²), drop constants correctly, and reason about space as well as time.
A practical system design interview framework: clarify requirements, estimate scale, define APIs and data, sketch the design, then go deep on trade-offs.
What is a large language model? A plain-English guide for developers covering tokens, transformers, training, context windows, and how to use LLMs well.
Change data capture explained: log-based vs query-based vs trigger-based CDC, how connectors stream changes, ordering, schema changes, and the outbox pattern.
What is dbt? Learn how models, ref(), sources, tests, materializations, incremental models, and lineage docs help you transform warehouse data with SQL.
An Apache Airflow tutorial for data pipeline orchestration: DAGs, tasks, operators, the scheduler, retries, backfills, and idempotent tasks with TaskFlow.
Build KPI dashboards people trust with a semantic metrics layer: define metrics once, pick north star and input metrics, design clear views, and govern change.
Apache Spark explained for beginners: how the driver, executors, partitions, lazy evaluation, and shuffles work, plus a practical PySpark DataFrame example.
Slowly changing dimensions explained: SCD Type 1, 2, and 3 with a SQL MERGE example, surrogate keys, effective dates, and current flags for accurate history.
Star schema vs snowflake schema explained with facts, dimensions, grain, SQL examples, and clear guidance on which data model fits your analytics warehouse.
A/B testing explained for product teams: hypotheses, sample size and power, what p-values and confidence intervals really mean, peeking, SRM, and Python code.