Skip to content
Ayhan Sipahi Ayhan Sipahi

RAG vs Fine-Tuning vs Off-the-Shelf AI: An Enterprise Decision Framework

A practical 6-level framework for enterprise AI integration: when to use ChatGPT, RAG, MCP agents, or fine-tuning, with a focus on PII and finance compliance.

Enterprise AI adoption follows a predictable pattern: teams reach for sophisticated architectures before validating simpler ones. A six-level ladder, from direct chat at L1 to fine-tuning at L6, lines those options up against the business need behind them. The default sits lower than most roadmaps assume. L2, a system prompt with uploaded knowledge files, covers more internal use cases than it gets credit for, and you climb only when a measured limitation pushes you up.

Two constraints override that default. PII is a hard architectural gate: once personal data enters the flow, L1 and L2 are off the table no matter how well they otherwise fit. Where that gate does not apply, moving up the ladder is a cost and complexity decision you can weigh case by case. Financial services carry the second constraint, adding audit trails, explainability, and human oversight as regulatory obligations on top of GDPR and KVKK.

Six Levels, From a Browser Tab to a Trained Model

Each rung up buys capability and pays for it in complexity, lead time, and operational surface.

L1: SaaS AI Chat ChatGPT/Claude Direct

L2: Custom GPT / Claude Projects System Prompts + Knowledge Files

L3: Automation Tools n8n, Make, Zapier + AI

L4: RAG Infrastructure Vector DB + Embeddings + LLM

L5: Custom Agents with MCP Tool Orchestration + Memory

L6: Fine-tuning / Own Models Custom Training + Self-hosted

The Browser Tab and the Uploaded File (L1 and L2)

L1 is a browser tab: ChatGPT, Claude, or a similar service, used directly. No integration, no customization, context pasted in by hand. It costs $20-60 per user per month with zero development time, which makes it the right home for individual productivity work: writing, brainstorming, code review, research on public information, prototyping prompts, ad-hoc technical questions.

The limits are the flip side of that simplicity. Nothing persists across sessions, there is no audit trail, nothing connects to your business systems, and everything you paste, PII included, lands on a third-party provider’s infrastructure.

// When L1 is sufficient
// Scenario: Developer needs algorithm optimization help

// User simply pastes into Claude:
const prompt = `
Here's my sorting function that's running slowly on large arrays.
Can you suggest optimizations?

function bubbleSort(arr) {
  for (let i = 0; i < arr.length; i++) {
    for (let j = 0; j < arr.length - i - 1; j++) {
      if (arr[j] > arr[j + 1]) {
        [arr[j], arr[j + 1]] = [arr[j + 1], arr[j]];
      }
    }
  }
  return arr;
}
`;

// No API needed, no infrastructure, no development time
// This is the right level for this use case

L2 keeps the same browser tab and adds two things: a custom system prompt and uploaded knowledge files. That turns the generic assistant into a specialized one, in 2-8 hours of setup on a Team or Enterprise tier at $25-60 per user per month. Internal knowledge bases with stable content, public-policy compliance Q&A, onboarding assistants, documentation lookup, and product FAQ systems all fit here.

# Example Claude Project Configuration
Name: "Compliance Policy Assistant"
System Prompt: |
  You are a compliance assistant for our organization.
  Your knowledge is limited to the uploaded policy documents.

  Rules:
  - Only answer questions based on the uploaded documents
  - If information isn't in the documents, say so clearly
  - Always cite the source document and section
  - Never make up policies or procedures
  - For questions outside scope, direct to [email protected]

Knowledge Files:
  - employee-handbook-2025.pdf (150 pages)
  - anti-money-laundering-policy.pdf (80 pages)
  - data-protection-guidelines.pdf (45 pages)

Context Window Usage:
  - System prompt: ~500 tokens
  - Knowledge retrieval: ~50,000 tokens (dynamically loaded)
  - Conversation history: ~20,000 tokens
  - Available for response: ~129,500 tokens (Claude 200K)

L2 Sufficiency Checklist:

  • Content is mostly static (updates less than weekly)
  • No PII or sensitive business data required
  • Knowledge base fits within token limits
  • No need for real-time system integration
  • Team size under 50 users
  • No regulatory audit trail requirements

AI Calls Inside n8n, Make, and Zapier (L3)

At L3, workflow platforms put AI calls inside automations, connecting models to business systems without custom development. Expect $50-600 per month for the platform plus API costs, and one to two weeks of setup.

Platform comparison:

Featuren8nMakeZapier
Self-hostingYesNoNo
SOC 2Yes (Cloud)YesYes
GDPR ComplianceYes (self-host)YesYes
Min Team Cost$25/month$16/month$20/month
Best ForControl, complex flowsBalanceSimplicity

The level earns its keep on high-volume repetitive tasks, multi-system orchestration, and event-driven responses, especially for teams without dedicated AI engineering capacity.

// n8n workflow example: Support ticket classification
const ticketClassificationWorkflow = {
  // Node 1: Webhook receives new Zendesk ticket
  trigger: {
    type: "webhook",
    source: "zendesk"
  },

  // Node 2: AI classification
  aiClassification: {
    prompt: `
      Classify this support ticket into one category:
      - billing: Payment, invoices, subscription issues
      - technical: Product bugs, API errors, integration problems
      - account: Login, permissions, profile updates
      - sales: Pricing questions, upgrades, enterprise inquiries

      Ticket Subject: {{ticket.subject}}
      Ticket Description: {{ticket.description}}

      Return JSON: {"category": "...", "urgency": "low|medium|high"}
    `
  },

  // Node 3: Route based on classification
  routing: {
    billing: { queue: "billing-team", sla: "24h" },
    technical: { queue: "engineering-support", sla: "4h" },
    account: { queue: "customer-success", sla: "12h" },
    sales: { queue: "sales-team", sla: "2h" }
  }
};

// Cost for 5,000 tickets/month:
// n8n Cloud: $25 + OpenAI API ~$10 = $35/month
// vs. manual routing: 2+ hours daily of human time

Building Retrieval Yourself at L4

L4 is the first rung that involves real engineering: retrieval-augmented generation you build yourself, with a vector database, an embedding model, and orchestration code. Full control over the pipeline comes at $500-2000 per month in infrastructure plus 4-8 weeks of development.

Architecture overview:

User Query

Embedding Model

Vector Search

Document Store

Chunking Pipeline

Retrieved Chunks

LLM Generation

Answer + Citations

AWS Bedrock Knowledge Bases implementation:

import {
  BedrockAgentRuntimeClient,
  RetrieveAndGenerateCommand
} from "@aws-sdk/client-bedrock-agent-runtime";

interface RAGResponse {
  answer: string;
  citations: Array<{
    source: string;
    content: string;
    score: number;
  }>;
}

async function queryKnowledgeBase(
  question: string,
  knowledgeBaseId: string
): Promise<RAGResponse> {
  const client = new BedrockAgentRuntimeClient({ region: "eu-west-1" });

  const command = new RetrieveAndGenerateCommand({
    input: { text: question },
    retrieveAndGenerateConfiguration: {
      type: "KNOWLEDGE_BASE",
      knowledgeBaseConfiguration: {
        knowledgeBaseId,
        modelArn: "arn:aws:bedrock:eu-west-1::foundation-model/anthropic.claude-sonnet-4-5-20250929-v1:0",
        retrievalConfiguration: {
          vectorSearchConfiguration: {
            numberOfResults: 10,
            overrideSearchType: "HYBRID"
          }
        },
        generationConfiguration: {
          promptTemplate: {
            textPromptTemplate: `
You are a helpful assistant answering questions based on the provided context.

Context:
$search_results$

Question: $query$

Instructions:
- Answer only based on the provided context
- If the context doesn't contain the answer, say so
- Always cite the source document
- Be concise but thorough
`
          }
        }
      }
    }
  });

  const response = await client.send(command);

  return {
    answer: response.output?.text || "No response generated",
    citations: response.citations?.map(c => ({
      source: c.retrievedReferences?.[0]?.location?.s3Location?.uri || "Unknown",
      content: c.retrievedReferences?.[0]?.content?.text || "",
      score: c.retrievedReferences?.[0]?.score || 0
    })) || []
  };
}

The work becomes necessary once the knowledge base outgrows L2: past 200K tokens or 20 files, documents that change daily, chunking or retrieval logic you need to control yourself. The remaining triggers are compliance-shaped, and any one of them is enough: a mandatory audit trail of queries and responses, data residency you have to prove, or more than a thousand queries a day.

Monthly cost breakdown (100K queries/month):

ComponentServiceCost
Vector DBOpenSearch Serverless (2 OCU)$350
EmbeddingsTitan (100K queries x 500 tokens)$1
LLMClaude Sonnet (100K x 2K tokens)$600
StorageS3 (100GB documents)$3
LambdaQuery processing$20
Total~$980/month

L5 Agents With Tools Over MCP

L5 gives the model hands: agents with tool access over the Model Context Protocol (MCP), able to reason, plan, and act across systems.

Architecture pattern:

Claude Agent Planning + Reasoning

MCP Server 1 Database Tools

MCP Server 2 External APIs

MCP Server 3 File System

Memory System Vector + KV Store

MCP Server implementation example:

// Note: This example uses MCP SDK v1.x patterns
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import { z } from "zod";

const server = new McpServer({
  name: "customer-support-tools",
  version: "1.0.0"
});

// Tool: Look up customer by email (returns non-PII only)
server.tool(
  "lookup_customer",
  {
    email: z.string().email().describe("Customer email address")
  },
  async ({ email }) => {
    const customer = await db.customers.findByEmail(email);

    if (!customer) {
      return {
        content: [{
          type: "text",
          text: JSON.stringify({ found: false })
        }]
      };
    }

    // Return non-sensitive customer info only
    return {
      content: [{
        type: "text",
        text: JSON.stringify({
          found: true,
          customer_id: customer.id,
          tier: customer.subscription_tier,
          account_status: customer.status
          // Note: No PII like full name, address, payment info
        })
      }]
    };
  }
);

// Tool: Create ticket (high-priority requires human approval)
server.tool(
  "create_ticket",
  {
    customer_id: z.string(),
    subject: z.string(),
    description: z.string(),
    category: z.enum(["billing", "technical", "account", "other"]),
    priority: z.enum(["low", "medium", "high"])
  },
  async ({ customer_id, subject, description, category, priority }) => {
    // High priority or billing = require human approval
    if (priority === "high" || category === "billing") {
      return {
        content: [{
          type: "text",
          text: JSON.stringify({
            status: "pending_approval",
            message: "This ticket requires human approval"
          })
        }]
      };
    }

    const ticket = await db.tickets.create({
      customer_id, subject, description, category, priority,
      created_by: "ai-agent"
    });

    // Audit log for compliance
    await auditLog.write({
      action: "ticket_created_by_agent",
      ticket_id: ticket.id,
      timestamp: new Date()
    });

    return {
      content: [{
        type: "text",
        text: JSON.stringify({ status: "created", ticket_id: ticket.id })
      }]
    };
  }
);

async function main() {
  const transport = new StdioServerTransport();
  await server.connect(transport);
}

main();

The signal for L5 is a workflow no single retrieval pass can cover: multi-step plans, tool selection that depends on context, one query touching several systems, conditional decision trees, or a human approval step in the middle of the flow.

Fine-Tuning, and Why L6 Usually Waits

L6 means training on your own data, for behavior that prompting alone cannot produce. It starts around $2000-10000 per month and assumes ML expertise in-house, which is why most of the cases people bring to it belong one rung lower.

When fine-tuning actually makes sense:

ScenarioWhy Fine-tuningTry First
Specialized terminologyModel doesn’t understand jargonFew-shot prompting
Consistent output formatStrict formatting requirementsOutput parsing
Reduced latencySingle inference vs. RAGModel distillation
Cost at scaleHigh volume, per-token expensiveSmaller model
Proprietary knowledgeCan’t use external APIsOn-premises RAG

When to avoid fine-tuning:

  • Problem solvable with better prompting (try few-shot first)
  • Data changes frequently (re-training is expensive)
  • Small dataset (fewer than 1000 examples) - overfitting risk
  • Budget constraints (under $1000/month for AI)
  • Team lacks ML expertise for training data curation

PII: The Hard Architectural Gate

PII (Personally Identifiable Information) changes what the architecture has to do. Every requirement below comes from law, which means missing one leaves you with a compliance failure no matter how well the system performs.

No

Yes

Direct Identifiers Name, SSN, Email

Sensitive PII Health, Financial

Special Categories Biometric, Genetic

Data Classification

Contains PII?

L1-L6 All Options

PII Type?

L4+ Minimum Encryption Required

L4+ with Additional Controls

L6 Required Data Residency

PII handling requirements by level:

L3 with PII (minimum viable):

interface L3PIIConfig {
  platform: "n8n-self-hosted" | "enterprise-tier-with-dpa";

  aiProvider: {
    // Data Processing Agreement required
    dataProcessingAgreement: string;
    dataResidency: "eu" | "us" | "specific-region";
  };

  security: {
    encryptionAtRest: true;
    encryptionInTransit: true;
    auditLogging: true;
  };

  compliance: {
    retentionPolicy: "30-days" | "as-required";
    deletionProcedure: "documented-and-tested";
  };
}

L4 with PII (recommended):

interface L4PIIArchitecture {
  vectorDatabase: {
    // Self-hosted or with appropriate DPA
    provider: "opensearch-self-hosted" | "pgvector" | "qdrant-private";
    encryption: {
      atRest: "AES-256";
      inTransit: "TLS-1.3";
      keyManagement: "AWS-KMS" | "HashiCorp-Vault";
    };
  };

  llmProvider: {
    // AWS Bedrock with VPC endpoint - data doesn't traverse public internet
    type: "aws-bedrock";
    vpcEndpoint: true;
    modelInvocationLogging: true;
  };

  dataHandling: {
    // PII should be tokenized before embedding
    preprocessing: "tokenization";
    tenantIsolation: true;
    rowLevelSecurity: true;
  };
}

When PII is likely but not yet present, design for it anyway: L4-grade infrastructure, audit logging as a core feature, and a data residency decision made up front. Any of those controls can be relaxed later if the classification never changes.

What Finance Adds on Top of GDPR

Financial services carry AI requirements that general GDPR compliance does not cover.

Regulatory framework:

JurisdictionKey RegulationsAI-Specific Requirements
EUGDPR, AI Act, MiFID IIExplainability, human oversight
USGLBA, FCRA, state lawsFair lending, adverse action notices
UKUK GDPR, FCA rulesConsumer Duty, operational resilience
TurkeyKVKK, BDDK regulationsData localization (sector-specific, stricter for banking), special categories

At L1-L2, finance teams can still do internal research on public data, review non-customer code, draft general business writing, and build training material. Customer data analysis, transaction monitoring, credit decisions, and investment advice are generally prohibited at those levels.

Finance-specific L4+ requirements:

interface FinanceAIRequirements {
  auditTrail: {
    inputLogging: true;
    modelVersionLogging: true;
    outputLogging: true;
    retentionPeriod: "7-years"; // Regulatory minimum
  };

  explainability: {
    humanReadableExplanations: true;
    featureImportance: true;
    adverseActionNotices: true; // For credit decisions
  };

  humanOversight: {
    materialThreshold: 10000; // Transactions > $10K
    appealProcess: true;
    escalationPath: true;
  };

  modelRiskManagement: {
    // Per SR 11-7 / OCC 2011-12
    modelValidation: "independent-team";
    ongoingMonitoring: true;
    performanceTesting: "quarterly";
  };
}

GDPR/KVKK Pre-Implementation Checklist:

  • Legal basis identified (consent, contract, legitimate interest)
  • Data Protection Impact Assessment conducted for high-risk processing
  • Technical measures implemented (encryption, access controls, audit logging)
  • Data Processing Agreement signed with AI provider
  • Data subject rights procedures documented (access, deletion, portability)
  • Processing activity recorded in ROPA
  • Privacy notice updated to include AI processing

None of this bolts on after launch. Model risk documentation, designed-in explainability, a human in the loop for material decisions, a seven-year audit trail, and independent validation all have to shape the first design pass.

From Requirement to Level

The PII gate, the finance requirements, and the per-level limits compress into one flowchart:

Yes

No

Yes

No

No

Yes

No

Yes

No

Yes

No

Yes

No

Yes

What are you building?

Contains PII or sensitive data?

L3+ minimum with proper controls

Needs system integration?

L3+

Knowledge base needed?

L1 sufficient

Exceeds 200K tokens or 20 docs?

L2 sufficient

Real-time updates or custom logic?

L2 may work with manual refresh

Multi-step reasoning or tool use?

L4 RAG

High volume repetitive task?

L5 Custom Agents

Consider L6 after validating L5

Level selection matrix:

Use CaseRecommended LevelUpgrade Signal
Personal productivityL1Team needs shared access
Internal FAQ (small)L2Content exceeds limits
Internal FAQ (large)L4Need multi-system data
Support ticket triageL3Complex routing logic
Support agent with actionsL5None - this is the right fit
Compliance document checkL2-L3Audit trail required
Document analysisL4Domain-specific accuracy
Transaction classificationL6Latency/cost critical at scale

Deploy the L2 version first, measure accuracy and user satisfaction, and write down the specific limits you hit. Build L4 only for the cases where L2 demonstrably fails, and let the L2 assistant keep serving the simple queries it already answers well.

Two Projects, Opposite Mistakes

A company wanted an AI assistant for its 500-page employee handbook, and the engineering proposal was a full L4 build: OpenSearch, a custom embedding pipeline, an 8-week timeline. The requirement analysis said otherwise:

  • 500 pages = ~250K tokens (within Claude’s context)
  • Updates: quarterly handbook revisions
  • Users: 200 employees
  • No audit trail requirement

An L2 Claude Project covered it: 2 hours of setup, $5,000 per month (200 users on the $25 Team plan), accuracy sufficient for handbook Q&A. The savings were 8 weeks of development plus infrastructure that would have run indefinitely.

The opposite mistake carries harder consequences. A fintech startup ran customer transaction pattern analysis through L1 ChatGPT because it deployed fast and needed no infrastructure. Transaction data is PII: there was no data processing agreement with OpenAI, no audit trail for a regulatory examination, and the data was potentially leaving the jurisdiction with every query. Each of those gaps carries GDPR risk on its own. The floor for that workload is L4 on AWS Bedrock: a VPC endpoint so data stays inside AWS, model invocation logging for the audit trail, an EU region for residency.

Monthly Cost at 10K Queries

Estimates for a mid-size enterprise:

LevelInfrastructureAPI/UsageDev Time (One-time)Monthly Total
L1$0$400 (20 users)0$400
L2$0$500 (20 users)8 hours$500
L3$100$5040 hours$150
L4$500$300160 hours$800
L5$1,000$800320 hours$1,800
L6$2,500$500400 hours$3,000

Development costs are one-time; ongoing maintenance adds to the monthly total from L4 upward.

Model Choice Within a Level

Choosing a level fixes the architecture, but the unit economics depend on which model runs inside it. Premium models often get pointed at work a cheaper one handles just as well.

Model Prices, January 2026

Anthropic Claude Models:

ModelInput (/1M)Output (/1M)ContextBest For
Opus 4.5$5.00$25.00200KComplex reasoning, critical decisions
Sonnet 4.5$3.00$15.00200K-1MCode analysis, RAG, general purpose
Haiku 4.5$1.00$5.00200KFast tasks, classification, simple Q&A
Haiku 3.5$0.80$4.00200KBudget tasks, high volume

OpenAI Models:

ModelInput (/1M)Output (/1M)ContextBest For
GPT-4.1$2.00$8.001MGeneral purpose, large context
o3$2.00$8.00200KComplex reasoning, math, coding
o4-mini$1.10$4.40200KFast reasoning tasks
GPT-4o$2.50$10.00128KMultimodal, general purpose
GPT-4o-mini$0.15$0.60128KBudget tasks, simple operations

Google Gemini Models:

ModelInput (/1M)Output (/1M)ContextBest For
Gemini 2.5 Pro$1.25-2.50$10-151MCoding, complex prompts
Gemini 2.5 Flash$0.30$2.501MFast, cost-efficient
Gemini 2.5 Flash-Lite$0.10$0.401MHighest efficiency
Gemini 2.0 Flash$0.10$0.401MUltra-fast, budget option

Routing Tasks to the Cheapest Model That Works

The common mistake is using premium models for tasks that don’t require them:

Task TypeWrong ChoiceRight ChoiceCost Savings
Simple Q&A, FAQOpus 4.5 ($5)Haiku 4.5 ($1)5x
Document classificationSonnet 4.5 ($3)GPT-4o-mini ($0.15)20x
Text summarizationGPT-4o ($2.50)Gemini Flash ($0.30)8x
Code reviewHaiku ($1)Sonnet 4.5 ($3)Quality improvement
Financial analysisHaiku ($1)Opus/o3 ($5)Risk reduction
Complex reasoningSonnet ($3)o3 ($2)Better accuracy

In production that mapping belongs in code, with a cheap classifier deciding where each request goes:

interface ModelRouter {
  // Classify incoming request complexity
  classifier: {
    model: "haiku-4.5"; // Use cheap model to classify
    categories: ["simple", "medium", "complex", "critical"];
  };

  // Route to appropriate model
  routing: {
    simple: {
      model: "gpt-4o-mini",
      costPer1M: 0.15,
      useCases: ["FAQ", "formatting", "classification"]
    };
    medium: {
      model: "sonnet-4.5",
      costPer1M: 3.00,
      useCases: ["summarization", "code-review", "analysis"]
    };
    complex: {
      model: "o3",
      costPer1M: 2.00,
      useCases: ["reasoning", "math", "multi-step"]
    };
    critical: {
      model: "opus-4.5",
      costPer1M: 5.00,
      useCases: ["financial-decisions", "compliance", "legal"]
    };
  };
}

Simple

Medium

Complex

Critical

User Request

Complexity Classifier Haiku - $0.001

Route by Complexity

GPT-4o-mini $0.15/1M

Sonnet 4.5 $3/1M

o3 $2/1M

Opus 4.5 $5/1M

Cutting the Token Bill

Two levers need no code change. Both Anthropic and OpenAI offer 50% discounts on batch processing, which fits document pipelines, nightly analysis jobs, and bulk classification. Anthropic prices cache reads at 10% of the base input price, which pays off on repeated system prompts, shared context blocks, and RAG over a stable knowledge base.

The third lever is a cascade: start with the cheapest model, escalate only on failure.

async function cascadeQuery(prompt: string): Promise<string> {
  // Try cheap model first
  const haiku = await query("haiku-4.5", prompt);
  if (haiku.confidence > 0.8) return haiku.response;

  // Escalate to mid-tier
  const sonnet = await query("sonnet-4.5", prompt);
  if (sonnet.confidence > 0.9) return sonnet.response;

  // Final escalation for complex cases
  return await query("opus-4.5", prompt);
}

Context size is the quiet one. Most chatbot interactions never leave a 128K window (GPT-4o-mini), document Q&A sits comfortably in the 200K Claude models, and the 1M options (Gemini Pro, GPT-4.1) earn their price only on work like full codebase analysis.

Which Model at Which Level

LevelBudget ModelStandard ModelPremium Model
L1ChatGPT FreeClaude Pro ($20/mo)ChatGPT Plus ($20/mo)
L2-Claude Team ($25/user)ChatGPT Business ($30/user)
L3GPT-4o-mini APISonnet 4.5 APIo3 API
L4Haiku + Titan EmbedSonnet + TitanOpus + Cohere
L5Haiku for routingSonnet for agentsOpus for critical
L6Fine-tuned smallFine-tuned mediumCustom large

In practice most production traffic can run on the budget column, with the premium column reserved for the requests that need it.

Where the Default Ends

L2 holds as the default for internal knowledge work with stable content, no PII, and a team under 50 users. Override it upward when the evidence is concrete: retrieval quality that fails your own test set, a knowledge base past the context limit, an audit trail a regulator will ask for, or a data classification that brings PII into scope. Override it downward when an L4 pipeline turns out to answer questions a single uploaded PDF would have covered.

References

Related posts