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

