$ ls index/

engineering / backend

LLM Architectures Guide

$cat engineering/backend/llm-architectures.md

8 specialized LLM architecture types, each optimized for different agent tasks. Useful when choosing the right model class for a feature.

Note: Model names in this guide reflect the landscape as of mid-2026. Specific models evolve quickly — use this as a framework, not a definitive model list.


The 8 Architecture Types

ArchitectureBest ForRepresentative ModelsWhen to Use
VLM (Vision-Language)Multimodal — vision + textGPT-5, Gemini 3.5 Pro, Claude Opus 4.7Image analysis, document processing, visual reasoning
LRM (Large Reasoning)Deep problem-solvingOpenAI o3, Claude Opus (extended thinking), Gemini 3.5 Pro (Deep Think)Math, coding challenges, strategic planning
SLM (Small Language)Fast, efficient, cheapPhi-4, Gemma 3, Qwen 3, Claude Haiku 4.5Edge devices, real-time apps, cost-sensitive uses
LCM (Large Context)Processing massive textGemini 3.5 Pro (2M), Claude Opus/Sonnet 4.x (1M)Document analysis, long conversations, research
HLM (Hierarchical)Complex multi-step planningCustom implementationsProject management, workflow automation
DLM (Domain Language)Specialized expertiseMed-PaLM (medical), BloombergGPT (finance)Industry-specific tasks requiring accuracy
ALM (Action Language)Tool use + real-world actionsTool-augmented Claude/GPT/Gemini, MCP-based agentsWeb scraping, API calls, external integrations
RLM (Retrieval Language)Fact-based responses with sourcesPerplexity Pro, RAG systemsResearch, fact-checking, cited information

Gemini Feature Overview

Gemini is Google's multimodal AI family. Key strengths: massive context windows (up to 2M tokens on 3.5 Pro), strong multimodality, tight integration with Google tools (Search, Workspace).

Deep Think Mode

  • Adaptive reasoning (similar to OpenAI o3 / Claude extended thinking)
  • Iterates internally before outputting
  • Uses chain-of-thought + self-verification
  • Lower hallucination rates on complex problems
  • Best for: coding, research, strategic analysis

Deep Research

  • Plans research by outlining steps first
  • Retrieves and synthesizes across sources
  • Delivers detailed cited reports
  • Maintains consistency across long sessions

Canvas

  • Collaborative workspace for interactive content
  • Build docs, code apps, infographics together
  • Turns research into quizzes, web pages, games
  • Integrates with Deep Research

Cost Comparison: API Providers (as of mid-2026)

Prices change frequently — verify before building.

ProviderModelInput / 1M tokensOutput / 1M tokensBest For
GroqLlama 3.3 70B~$0.59~$0.79Lightning-fast inference
Together AILlama 3.1 405B~$3.50~$4.00High-quality at scale
GoogleGemini 3.5 Flashlow (sub-$1)low (sub-$1)Multimodal tasks, generous free tier
GoogleGemini 2.5 Pro (≤200k ctx)$1.25$10.00Long-context, top-tier reasoning
xAIGrok 4.3$1.25$2.50Reasoning + real-time data via X
AnthropicClaude Haiku 4.5lowlowFast, quality responses
AnthropicClaude Sonnet 4.6 (1M ctx)midmidCoding, long-context analysis

Pro tip: Route requests — start with cheap/fast (Gemini Flash, Haiku), escalate to a stronger model only if confidence is low or the task is complex.


AI Model Selection by Use Case

Use CaseRecommendedCostSpeed
Simple chatbotGemini 3.5 Flash, Claude Haiku 4.5LowFast
Complex reasoningGPT-5, Claude Opus 4.7, Gemini 3.5 Pro (Deep Think)HighMedium
Code generationClaude Sonnet 4.6, GPT-5, Gemini 3.5 ProHighMedium
Image analysisGPT-5, Gemini 3.5 Pro, Claude Opus 4.7MediumMedium
Long documentsClaude Sonnet/Opus 4.x (1M), Gemini 2.5/3.5 Pro (1–2M)HighSlow
Real-time chatGroq Llama, Gemini 3.5 FlashLowVery Fast
Research tasksPerplexity, Grok 4.3 with X search, Gemini Deep ResearchMediumMedium
Creative writingClaude Opus 4.7, GPT-5HighMedium

Free and Low-Cost Options

Fully free:

  • OpenRouter.ai — routes to free models (Llama variants)
  • Hugging Face Inference API — free tier for many models
  • Google Gemini Flash — generous free tier
  • DeepSeek API — often free/unlimited

Self-hosted:

  • Platforms: RunPod, Vast.ai ($0.20–0.50/hr GPU)
  • VPS: Hetzner, DigitalOcean GPU ($50–150/month)
  • Models: Llama 3.3 8B/70B, Qwen 3, Phi-4, Gemma 3
  • Tools: Ollama, vLLM, LocalAI, TGI
  • Example: 70B model on $100/month server → ~$0.001/query

Quick start:

  • Prototyping → OpenRouter free model
  • Production/low cost → Self-host Llama 3.3 8B via Ollama
  • Managed → Gemini 3.5 Flash or Claude Haiku 4.5

Let's build something impactful together.

ertughaskan@gmail.com Find me online
Availability
WorkAvailable
RelocationOpen
FreelanceClosed
© 2026 Ertugrul Alex Haskan /cookiesVancouver, BC 🇨🇦

This site uses one optional Google Analytics cookie to see which pages get read. Nothing is set until you choose — cookie details.