AI Wisdom
accepted2026-01-10

ADR-001: RAG vs Fine-Tuning for Domain Knowledge

In this article

Context

We need to give our LLM domain-specific knowledge about AI engineering tools, patterns, and best practices. The model must provide accurate, up-to-date answers grounded in our curated content.

Options Evaluated

RAG (Retrieval-Augmented Generation)

Pros
  • +No training required โ€” content updates are instant
  • +Responses are grounded in cited sources
  • +Works with any foundation model
  • +Lower cost for content updates
Cons
  • โˆ’Retrieval quality is a bottleneck
  • โˆ’Added latency for embedding + search
  • โˆ’Requires vector database infrastructure

Fine-Tuning

Pros
  • +Model internalises domain vocabulary and reasoning
  • +No retrieval latency at inference time
  • +Better for style/tone adaptation
Cons
  • โˆ’Expensive to retrain on content updates
  • โˆ’Risk of hallucination (no source citations)
  • โˆ’Vendor lock-in to specific model families
  • โˆ’Months of data curation before training

Hybrid (RAG + Fine-Tuned)

Pros
  • +Best accuracy: model understands domain + retrieves specifics
  • +Citations available from RAG layer
Cons
  • โˆ’Highest complexity and cost
  • โˆ’Overkill for our current content volume

Decision

We chose RAG as the primary approach. Our content updates weekly, making fine-tuning impractical. RAG provides source citations which align with our editorial transparency values. We will revisit Hybrid when content volume exceeds 1000 articles.

Consequences

  • โ€ขMust invest in chunking strategy and embedding pipeline
  • โ€ขNeed vector database (chose pgvector via Supabase for simplicity)
  • โ€ขRetrieval quality must be monitored and improved continuously
  • โ€ขSystem prompt must instruct model to only use retrieved context

Related Articles

designing rag systems that actually scale

Discussion

Sign in to share your feedback and join the discussion.