The TokenRex Blog

Writing from TokenRex

Guides for developers, honest cost comparisons across frontier models, and product notes from the team.

Multi-turn memory patterns for chatbotsInsights

Multi-turn memory patterns for chatbots

Window, summary, and hybrid memory — with sample code.

Aug 28, 2026 8 min
Read post
Testing prompts with golden datasetsInsights

Testing prompts with golden datasets

The lightweight eval process that catches regressions before your users do.

Aug 26, 2026 9 min
Read post
Observability for LLM apps — what to log, what to alert onInsights

Observability for LLM apps — what to log, what to alert on

The five metrics every production LLM feature should track.

Aug 25, 2026 8 min
Read post
Streaming JSON with partial parsingInsights

Streaming JSON with partial parsing

Render fields into your UI as the model streams them, not after the whole object arrives.

Aug 24, 2026 8 min
Read post
Batch inference at scaleInsights

Batch inference at scale

Semaphores, backpressure, and how to run 100K completions overnight.

Aug 23, 2026 9 min
Read post
Long context — when to use 1M tokens (and when not to)Insights

Long context — when to use 1M tokens (and when not to)

Long context isn't a substitute for RAG. Here's the framework.

Aug 16, 2026 8 min
Read post
Reranking for better RAG — cheaper than a bigger LLMInsights

Reranking for better RAG — cheaper than a bigger LLM

Retrieve 50, rerank to top 5, feed to the model. The 20% effort that gets 80% of the gain.

Aug 15, 2026 8 min
Read post
Chunking strategies for RAGInsights

Chunking strategies for RAG

Fixed-size, semantic, and recursive chunking — with the tradeoffs.

Aug 14, 2026 9 min
Read post
Embeddings and semantic search — a builder's guideInsights

Embeddings and semantic search — a builder's guide

Model choice, dimensions, and vector DB pairing for practical RAG.

Aug 13, 2026 11 min
Read post
Error handling patterns for LLM APIsInsights

Error handling patterns for LLM APIs

The five error classes you'll see in production and what to do about each.

Aug 3, 2026 8 min
Read post
Rate limits and how to handle themInsights

Rate limits and how to handle them

Backoff, jitter, queueing, and the difference between provider limits and TokenRex limits.

Aug 2, 2026 7 min
Read post
Prompt caching — save 50% on repeated contextInsights

Prompt caching — save 50% on repeated context

How cache hits work, when they trigger, and how to structure your prompts to maximize savings.

Aug 1, 2026 8 min
Read post
JSON mode and structured outputs — a field guideInsights

JSON mode and structured outputs — a field guide

Response format, JSON schema, and the tradeoffs between them.

Jul 25, 2026 7 min
Read post
Function calling in 2026 — patterns that actually workInsights

Function calling in 2026 — patterns that actually work

Tool use has matured. Here is what teams shipping production agents are doing today.

Jul 24, 2026 11 min
Read post
Streaming responses with SSE — a practical guideInsights

Streaming responses with SSE — a practical guide

Everything you need to know about server-sent events, chunk parsing, and cancellation.

Jul 22, 2026 9 min
Read post
How OpenAI-compatible endpoints actually workInsights

How OpenAI-compatible endpoints actually work

Under the hood of the base_url swap: how a single URL change routes your request through any provider.

Jul 5, 2026 7 min
Read post