AI Wisdom
Case Studies

Case studies, and what they cost

Real architecture calls made building this platform — the problem, every option weighed, what got picked, and what it committed us to. Written so you can borrow the reasoning, not just the answer.

13 case studies recorded

ADR-013proposed20 Apr 2026

Multi-Tenant Data Isolation Strategy for RAG Pipelines

ProblemOptionsDecision

The problem

As we expand from a single-tenant learning platform to supporting teams and organisations, we need to isolate content data between tenants in our RAG pipeline. A data leak where…

3 options weighed

Row-Level Security (RLS) with tenant_id filterCollection-per-tenant (separate vector namespace)Schema-per-tenant (separate PostgreSQL schema)
Read the full case →
ADR-012accepted15 Apr 2026

Content Database Migration — Legacy PostgreSQL to Neon

ProblemOptionsDecision

The problem

Our platform content (topics, domains, glossary terms, patterns, decisions) had been stored in a legacy PostgreSQL setup. As our content grows and we add AI features requiring…

3 options weighed

Stay with the existing PostgreSQL setupNeon (Serverless PostgreSQL)PlanetScale (MySQL)
Read the full case →
ADR-011accepted8 Apr 2026

Testing Strategy for LLM-Powered Features

ProblemOptionsDecision

The problem

Traditional unit and integration tests are insufficient for AI features because LLM outputs are non-deterministic. We need a testing strategy that gives us confidence in AI…

4 options weighed

Manual Testing OnlyAutomated Evals with LLM-as-JudgeSnapshot Testing for PromptsHybrid: Unit + Evals + Production Sampling
Read the full case →
ADR-010accepted1 Apr 2026

Tool Integration Protocol — MCP vs Custom Tool Calling

ProblemOptionsDecision

The problem

Our AI agents need to call external tools — content search, user data lookup, web scraping, code execution. We must decide whether to build custom tool integrations using OpenAI…

2 options weighed

Custom Tool Definitions (OpenAI Function Calling / Vercel AI SDK)Model Context Protocol (MCP)
Read the full case →
ADR-009accepted20 Mar 2026

Agent Memory Architecture — In-Context vs External Memory

ProblemOptionsDecision

The problem

Our AI agents need memory to maintain context across multi-step tasks and across user sessions. We need to decide how to implement short-term (within session) and long-term…

3 options weighed

In-Context Only (no external memory)Vector Database External MemoryStructured Database + Summarisation
Read the full case →
ADR-008accepted12 Mar 2026

AI Observability Platform — LangSmith vs Phoenix vs Custom OpenTelemetry

ProblemOptionsDecision

The problem

We need an observability platform to trace LLM calls, evaluate output quality, debug RAG retrieval, and monitor production AI quality over time. Without observability, we are…

3 options weighed

LangSmith (LangChain)Arize Phoenix (open-source)Custom OpenTelemetry + Grafana
Read the full case →
ADR-007accepted5 Mar 2026

LLM Streaming Architecture — SSE vs WebSocket vs Polling

ProblemOptionsDecision

The problem

Our AI chat and content generation features need to stream LLM responses to users rather than waiting for full completion. We need to choose between Server-Sent Events (SSE),…

3 options weighed

Server-Sent Events (SSE) via Vercel AI SDKWebSocketLong-polling
Read the full case →
ADR-006accepted28 Feb 2026

Agentic Workflow Framework — LangGraph vs Direct Implementation

ProblemOptionsDecision

The problem

We are building agentic features — multi-step AI workflows that plan, use tools, and iterate. We need to decide whether to use LangGraph (stateful graph-based orchestration),…

3 options weighed

LangGraphAutoGen (Microsoft)Direct SDK calls with Vercel AI SDK
Read the full case →
ADR-005accepted15 Feb 2026

Embedding Model Selection

ProblemOptionsDecision

The problem

We need an embedding model for our RAG pipeline. The model determines retrieval quality, vector dimensions (affects storage), and API cost.

4 options weighed

OpenAI text-embedding-3-small (1536d)OpenAI text-embedding-3-large (3072d)Cohere embed-v3BGE-large-en-v1.5 (open source)
Read the full case →
ADR-004accepted10 Feb 2026

Orchestration Framework — LangChain vs Semantic Kernel

ProblemOptionsDecision

The problem

We need an orchestration framework for building RAG pipelines, agent workflows, and tool-calling chains. The two leading options are LangChain (Python/JS) and Semantic Kernel…

3 options weighed

LangChain / LangGraphSemantic KernelDirect SDK calls (no framework)
Read the full case →
ADR-003accepted1 Feb 2026

Primary LLM Selection — GPT-4.1 vs Claude 3.5

ProblemOptionsDecision

The problem

We need to select a primary LLM for our platform's AI features (article assistance, search, code generation). The choice affects cost, quality, and vendor dependency.

3 options weighed

GPT-4.1 (OpenAI)Claude 3.5 Sonnet (Anthropic)Multi-Model with AI Gateway
Read the full case →
ADR-002accepted15 Jan 2026

Vector Database Selection

ProblemOptionsDecision

The problem

We need a vector database for our RAG pipeline. Options range from managed services (Pinecone, Weaviate Cloud) to integrated solutions (pgvector in our existing PostgreSQL).

3 options weighed

Pineconepgvector (Neon)Qdrant
Read the full case →
ADR-001accepted10 Jan 2026

RAG vs Fine-Tuning for Domain Knowledge

ProblemOptionsDecision

The problem

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…

3 options weighed

RAG (Retrieval-Augmented Generation)Fine-TuningHybrid (RAG + Fine-Tuned)
Read the full case →