Intellipaat Agentic AI System Design Skill

Design, architect, and build production-ready agentic AI systems — from RAG pipelines and LLM configuration to multi-agent frameworks — using the cost-first, scalability-aware methodology taught in this course.

// TL;DR

The Intellipaat Agentic AI System Design Skill is a cost-first methodology for architecting production-ready AI systems — from classical ML selection to RAG pipelines, LLM inference tuning, and multi-agent frameworks. Use it when you need to decide which AI stack fits a business problem (classical ML vs LLM vs RAG vs agents), configure inference parameters like temperature and context window, build a retrieval-augmented generation pipeline, or plan edge deployment with fine-tuned SLMs. It emphasizes choosing the cheapest architecture that meets accuracy and scalability targets, never reaching for an LLM when a deterministic model solves the problem.

// When should you use the Intellipaat Agentic AI System Design skill?

Use this skill whenever you need to architect an AI solution for a business problem, decide which AI technology stack to deploy (classical ML vs LLM vs RAG vs agents), configure LLM inference parameters, or build a retrieval-augmented generation pipeline from scratch.

// What do you need before designing an agentic AI system?

  • Business Problem Statementrequired
    What task or workflow the AI system must solve, including who the end users are and what decisions the system must make or support.
  • Data Descriptionrequired
    What internal or external data is available — format (PDF, DB, code, text), volume, and access controls (who can query what).
  • Cost and Scale Constraintsrequired
    Approximate user load (scalability target), infrastructure budget, and whether cloud or on-premise/edge deployment is required.
  • Accuracy vs. Creativity Requirements
    Whether the system needs deterministic/standard responses (e.g. enterprise chatbot) or creative/exploratory outputs (e.g. content generation).
  • Existing Codebase or Knowledge Base
    Any internal documents, code repositories, or structured data that will serve as the RAG knowledge source.

// What principles guide cost-first agentic AI architecture?

Cost-First Architecture Selection

Every organization wants the best application but wants to spend the least amount of money. Always ask: is there a cheaper alternative that does the task? Classical ML models (decision trees, XGBoost, CNNs, RNNs) are still used daily in industry because they are cheap, scalable, and accurate for their target task. Do not reach for an LLM if a deterministic model solves the problem.

Scalability as a Non-Negotiable

Scalable means: if 1 million customers use your application, it works; if 50 million customers use it, it still works and does not break. Every architecture decision must be validated against this criterion before deployment.

Generative vs. Deterministic Output Distinction

A system is Generative AI only when output is text, audio, video, or image. If the output is a number, a class label, or a probability value, it is a deterministic system. Never label or architect a deterministic system as Generative AI — they require different tooling, cost profiles, and evaluation metrics.

Baseline Model → Fine-Tune → Application Pipeline

You do not build models from scratch. You take a foundational/baseline/pre-trained model built by large organizations (who have millions of dollars to burn), and you fine-tune it for your specific philosophy or domain. This is the standard industry workflow for application engineers.

Researchers vs. Application Engineers

Two types of people exist: researchers who create something new, and application engineers who apply that research effectively to solve problems for millions of people. Optimize to become the application engineer — learn to apply technology that solves real problems at scale.

RAG Is Not a Silver Bullet

Retrieval Augmented Generation performs three steps beautifully — Retrieve, Augment, Generate — and is ideal for internal enterprise knowledge. However, RAG fails at scale (millions of documents), struggles with retrieval failures that cause hallucination, and suffers from faithfulness vs. correctness conflicts. Use RAG where it fits; do not force it everywhere.

Context Window as Memory

Context window is the memory or attention span of a large language model. Input tokens plus output tokens combined must not exceed the context window. If they do, context is clipped and output becomes incomplete. Always architect your prompts and pipelines with context window limits in mind.

Fine-Tuned SLMs as the Future

The world is moving toward fine-tuned Small Language Models (SLMs) for edge computing. A 120 billion parameter model requires 60+ GB RAM and GPU-only inference; a 4 billion parameter model requires 8 GB RAM and can run on CPU. Architect for the smallest model that meets accuracy requirements.

Metadata-Enriched Document Objects

When building RAG pipelines, never convert raw text directly to embeddings without wrapping it in a Document object (LangChain's internal data structure). The Document object captures the original text plus metadata (source channel, timestamp, user role, document type). This metadata enables access control, audit trails, and richer retrieval.

Temperature as Freedom, Not Accuracy

Temperature is a distributional philosophy — it controls how much freedom the model has to choose tokens. Lower temperature = less freedom, more repetitive, more confident, fewer hallucinations (ideal for enterprise chatbots). Higher temperature = more freedom, more creative, more hallucinations (ideal for content creation, poetry, story generation). Tune temperature to the business case, not to a default.

// How do you design an agentic AI system step by step?

  1. 1

    Classify the problem type before selecting any AI technology

    Ask: Is the output a number, class label, or probability? → Use classical ML (decision tree, XGBoost, CNN, RNN). Is the output text, image, audio, or video? → Consider Generative AI. Is the task repetitive and decision-based with cheap data? → Use classical ML. Only escalate to LLMs when classical approaches are insufficient or when the generative output type is required.

  2. 2

    Evaluate cost and scalability constraints against technology options

    LLMs are not cheap to build, deploy, or use — account for energy, GPU cost, inference cost, and carbon footprint (a 220 million parameter model generates carbon equivalent to 250,000 people per year). Always prefer the cheaper alternative if it does the task. Validate that your chosen architecture is scalable (works at 1M and 50M users without breaking).

  3. 3

    Select the model tier: Foundational/Baseline Model, Fine-Tuned SLM, or RAG-augmented LLM

    Baseline/Foundation Models: pre-trained on trillions of tokens, built with billions of parameters on expensive GPU clusters (H100s, A100s). Use as-is for general tasks. Fine-Tuned SLM: take a baseline model and fine-tune it on your domain-specific data — preferred for edge deployment, cost reduction, and task specificity. RAG-augmented LLM: keep baseline model frozen; augment with internal knowledge via vector retrieval. Use when data is proprietary, frequently updated, or behind access controls.

  4. 4

    Prepare internal documents as LangChain Document objects with metadata

    Whatever format your internal data is in (PDF, database, code repository, list, nested structure) — convert it to LangChain Document objects with page_content and metadata fields. Metadata must include at minimum: source (WhatsApp/email/phone), type (query/request/complaint), user identity, and timestamp. This is the software engineer's job — format choice is flexible but Document wrapping is mandatory for RAG.

  5. 5

    Convert Document objects to embeddings using a sentence transformer embedding model

    Use an embedding model such as sentence-transformers/all-MiniLM-L6-v2 (free, open-source, available via HuggingFace). This model converts text into numerical vector representations. One token ≈ 0.75 English words. Run embeddings on both the internal knowledge base AND on incoming user queries — both must be in the same vector space for similarity matching to work.

  6. 6

    Store embeddings in a Vector DB using FAISS (or production-grade alternative)

    FAISS (built by Meta/Facebook) is a free, in-memory vector DB for efficient similarity search and clustering of dense vectors — suitable for small to production-scale applications. For external/cloud-hosted vector storage, alternatives include Pinecone, Weaviate, or Qdrant. FAISS runs internal to the code on the same server — no separate cloud credentials required. Use from_documents() method passing both docs and embedding model.

  7. 7

    Implement the RAG three-step pipeline: Retrieve → Augment → Generate

    Retrieve: match user query embedding against internal document embeddings using semantic similarity — return the most relevant context chunks. Augment: combine the user query and the retrieved context into one single object (augmentation stage) — this combined object is the LLM's input. Generate: pass augmented input to the LLM to format, summarize, and return a response. Only add external search (e.g. Tavily web search) if internal retrieval fails to answer — do not default to external search.

  8. 8

    Configure LLM inference parameters: Context Window, Maximum Tokens, Temperature, Top-P, Top-N

    Context Window: set by the model provider — the total memory (input + output tokens combined) the LLM can handle. Never exceed it or output gets clipped. Maximum Tokens: YOU set this — caps the output token length per request (e.g. 512 or 3000 tokens). Always set this in production to prevent token waste. Temperature: 0–0.3 for enterprise/standard responses; 0.7–1.0 for balanced creativity; 1.5–2.0 for creative/generative tasks. Higher temperature = more hallucination risk. Top-N: select only the top N highest-probability tokens as candidates — improves relevance. Top-P: select tokens whose cumulative probability adds up to P% (e.g. 80%) — a probability-based alternative to Top-N.

  9. 9

    Apply access controls and metadata filters to RAG retrieval

    Use metadata to enforce role-based access: e.g. only senior employees can query salary information, only managers can access certain document classes. This is a software engineering layer on top of the vector retrieval — filter by metadata before returning context to the LLM. This prevents junior users from accessing restricted information through the chatbot.

  10. 10

    Evaluate whether to escalate from RAG to Agents or Multi-Agent Systems

    RAG is appropriate for internal knowledge retrieval at moderate scale. Escalate to AI Agents when the system must execute real business workflows, take decisions autonomously, coordinate across multiple tools or systems, or complete end-to-end tasks with minimal human input. Multi-agent frameworks (CrewAI, AutoGen, LangGraph) are appropriate when tasks require coordination between specialized agents. Agentic AI and AI Agents are not the same thing — clarify which pattern the business problem requires.

// What do real agentic AI system designs look like in practice?

A finance company (lending business) wants a customer support chatbot. Customers contact via WhatsApp, email, and phone. Queries fall into three types: query, request, complaint.

Step 1: Output is text → Generative AI path. Step 4: Each customer interaction is wrapped as a Document object with metadata: {source: 'WhatsApp'/'email'/'phone', type: 'query'/'request'/'complaint', customer_name: '...', timestamp: '...'}. Step 5: Convert to embeddings. Step 6: Store in FAISS. Step 7: RAG retrieves relevant policy or account info, augments with the customer query, LLM generates response. Step 8: Temperature set to 0.2 (enterprise standard, low hallucination). Maximum tokens set to 512 (controlled response length). Step 9: Access controls ensure agent-typed users only see permitted customer records.

A large software company with 10,000 developers wants to prevent duplicate code — specifically, developers keep rewriting authentication programs that already exist in the codebase.

Step 3: RAG-augmented LLM — no model fine-tuning needed, knowledge base is the internal codebase. Step 4: Convert all code files and internal documentation into Document objects with metadata (author, file path, language, last modified). Step 5-6: Embed and store in FAISS. Step 7: Developer asks 'Has anyone written an authentication program?' — RAG retrieves relevant code chunks, augments query, LLM responds with code reference and offers to reuse it. Access controls (Step 9) can restrict which developers can view which codebases.

A startup needs to deploy a language model on mobile/edge devices (phones, Raspberry Pi) for a regional language task with no GPU available.

Step 2: Cost constraint is severe — 120B parameter model needs 60+ GB RAM and GPU; 4B parameter model needs 8 GB RAM and runs on CPU. Step 3: Select Fine-Tuned SLM path. Take a 3-4 billion parameter open-source baseline model from HuggingFace. Fine-tune on domain-specific data (or use model distillation from multiple teacher models if budget is very tight). Deploy the fine-tuned SLM on-device. Step 8: Context window on SLMs is smaller — architect prompts to be concise; set maximum tokens conservatively (e.g. 256).

// What mistakes should you avoid when building agentic AI systems?

  • Reaching for an LLM when a classical ML model (decision tree, XGBoost, CNN, RNN) would be cheaper, faster, and equally accurate for the task — always do cost-first technology selection.
  • Calling a system 'Generative AI' when the output is a number, class label, or probability — these are deterministic systems and require different architecture and evaluation.
  • Treating Agentic AI and AI Agents as the same thing — they are distinct concepts with different architectural implications.
  • Converting raw text directly to embeddings without wrapping in a Document object — you lose metadata (source, type, user, timestamp) which is essential for access control, audit, and richer retrieval.
  • Using RAG as the answer to every knowledge problem — RAG fails at scale (millions of documents), suffers retrieval failures that cause large hallucinations, and has faithfulness vs. correctness conflicts.
  • Defaulting to external search (e.g. web search) before exhausting internal retrieval — only add external search if internal RAG cannot answer the query.
  • Setting no Maximum Tokens limit in production — without a cap, LLM APIs waste tokens and cost money; always set a maximum token guardrail.
  • Using a high temperature for enterprise or customer-facing chatbots — high temperature increases hallucinations and unpredictability; use low temperature (0–0.3) for standard, trust-critical responses.
  • Ignoring context window limits and passing very large inputs — input + output tokens exceeding the context window causes clipping, incomplete outputs, and context rot/context poisoning.
  • Fine-tuning or steering LLMs without sufficient domain knowledge — LLM steering (modifying attention layers) is 50x cheaper than fine-tuning but requires deep technical expertise; incorrect steering produces terrible results.
  • Assuming RAG eliminates hallucination — RAG reduces hallucinations by grounding responses in retrieved context, but if the retriever fetches the wrong chunk, the model will hallucinate significantly. RAG improves traceability and reduces hallucination; it does not eliminate it.
  • Using HuggingFace embedding libraries without version-pinning — HuggingFace libraries change weekly; a model working today may not work tomorrow. Always pin library versions in production.

// What key terms should you know for agentic AI system design?

Agentic AI
AI that behaves less like a tool and more like a digital workforce — it acts, decides, and completes end-to-end tasks autonomously with minimal human input. Distinct from AI Agents.
AI Agents
Specific autonomous software entities that perceive inputs, make decisions, and take actions using tools. Distinct from Agentic AI as a broader paradigm.
Baseline Model / Foundation Model / Pre-trained Model
A model trained by large organizations on massive unstructured data using expensive GPU clusters. The starting point that application engineers fine-tune or augment — not built from scratch.
Generative AI
An AI system whose output is text, audio, video, or image. If output is a number, class label, or probability, it is a deterministic system — not Generative AI.
Deterministic System
An AI system with clear determinism in its mathematics — outputs a probability, label, or number. Includes decision trees, random forest, XGBoost, CNNs, RNNs. Not Generative AI.
RAG (Retrieval Augmented Generation)
A three-step pipeline: Retrieve relevant context from a vector DB, Augment (combine query + context into one object), Generate a response via LLM. Ideal for internal enterprise knowledge; not a silver bullet at scale.
Embedding
Converting text (a word, sentence, or document) into a numerical vector representation. Example: the word 'apple' becomes [0.1, 0.69, 0.3, 0.2]. Required before storing text in a Vector DB.
Vector DB
A database that stores embeddings (vectors) and supports efficient similarity search. Examples: FAISS (free, in-memory, internal to code), Pinecone, Weaviate, Qdrant.
FAISS
A library built by Meta/Facebook for efficient similarity search and clustering of dense vectors. A free, in-memory Vector DB that runs internal to the code — suitable from small applications through production.
Augmentation Stage
The second step of RAG — combining the user's query embedding and the retrieved internal context into one single object before passing to the LLM for generation.
Document Object
LangChain's internal data structure for text. Contains page_content (the text) and metadata (source, type, user, timestamp, etc.). Mandatory wrapper before converting text to embeddings in a RAG pipeline.
Context Window
The memory or attention span of a large language model — the maximum number of tokens (input + output combined) the model can process at once. Set by the model provider. Exceeding it causes clipping and context rot.
Maximum Tokens
A parameter YOU set to cap the number of output tokens the LLM generates per request. Distinct from context window (which is set by the model provider). Essential for cost control in production.
Context Rot / Context Poisoning
Degradation of LLM output quality that occurs when the context window is exceeded or when irrelevant context accumulates, causing the model to lose track of earlier information.
Temperature
A distributional philosophy parameter controlling how much freedom the LLM has when selecting output tokens. Lower temperature = less freedom, more confident, more repetitive, fewer hallucinations. Higher temperature = more freedom, more creative, more hallucinations.
Top-N
An inference parameter that selects only the top N highest-probability tokens as candidates for the model's output. Improves relevance by discarding low-probability tokens.
Top-P
An inference parameter that selects tokens whose cumulative probability sums to up to P% (e.g. 80%). A probability-based alternative to Top-N for controlling output token diversity.
Fine-Tuned SLM (Small Language Model)
A small language model (e.g. 3-4 billion parameters) that has been fine-tuned on domain-specific data. The predicted future of AI deployment — cheaper, edge-compatible, and sufficient for most business tasks.
Model Distillation / Mixture of Experts
A training strategy where multiple large teacher models teach a smaller student model, allowing the student to achieve strong performance without training from scratch on massive data.
LLM Steering
Modifying the attention layers of an LLM to change its behavior without full fine-tuning. 50x cheaper than fine-tuning but requires deep technical expertise — incorrect steering produces terrible results.
Transformers / Attention Is All You Need
The 2017 Google Brain paper by Ashish Vaswani et al. that introduced multi-headed self-attention, replacing sequential RNN processing with parallel token processing and fundamentally changing the AI landscape.
Inference
The process by which a trained LLM predicts the next token and generates a completion given an input prompt. Inference configuration parameters (temperature, max tokens, top-P, top-N) control this process.
BPE (Byte Pair Encoding)
The subword tokenization method used by transformer models. Converts text into tokens (subword units) before embedding. One token ≈ 0.75 English words.
HuggingFace
A platform where every major AI model (Google, Meta, etc.) is uploaded and made accessible. Allows running, downloading, and fine-tuning models. Note: libraries update frequently — pin versions in production.
Scalable
A system is scalable if it works correctly and without breaking whether 1 million or 50 million customers use it simultaneously. A non-negotiable design criterion.

// FREQUENTLY ASKED QUESTIONS

What is agentic AI system design?

Agentic AI system design is the practice of architecting AI solutions for business problems by selecting the right technology tier — classical ML, generative LLMs, RAG pipelines, or autonomous agents — based on cost, scalability, and output type. It covers model selection, RAG construction, LLM inference configuration, and deciding when to escalate from retrieval to autonomous multi-agent workflows that execute real business tasks.

What is the difference between agentic AI and AI agents?

Agentic AI is the broader paradigm where AI behaves like a digital workforce — acting, deciding, and completing end-to-end tasks autonomously. AI agents are specific autonomous software entities that perceive inputs, make decisions, and take actions using tools. Agentic AI is the pattern; AI agents are the building blocks. Confusing the two leads to wrong architectural choices for a given business problem.

How do I decide between classical ML and an LLM for my problem?

Start by classifying the output type. If the output is a number, class label, or probability, use classical ML — decision trees, XGBoost, CNNs, or RNNs — which are cheaper, faster, and scalable. If the output is text, image, audio, or video, consider generative AI. Only escalate to an LLM when classical approaches are insufficient or the generative output type is genuinely required.

How do I build a RAG pipeline from scratch?

Wrap your internal data (PDFs, code, databases) as LangChain Document objects with metadata, convert them to embeddings using a sentence transformer like all-MiniLM-L6-v2, and store them in a vector DB such as FAISS. At query time, retrieve the most relevant chunks via semantic similarity, augment them with the user query into one object, then generate the final response with an LLM.

How does RAG compare to just fine-tuning an LLM?

RAG keeps the baseline model frozen and augments it with retrieved internal knowledge, making it ideal for proprietary, frequently-updated, or access-controlled data. Fine-tuning bakes domain knowledge into model weights, which suits edge deployment and task specificity but requires retraining to update. RAG improves traceability and reduces hallucination; fine-tuning is better when you need a smaller, self-contained model for offline or edge use.

When should I escalate from RAG to AI agents?

Escalate from RAG to agents when the system must execute real business workflows, take autonomous decisions, coordinate across multiple tools or systems, or complete end-to-end tasks with minimal human input. RAG is for internal knowledge retrieval at moderate scale. Use multi-agent frameworks like CrewAI, AutoGen, or LangGraph when tasks require coordination between specialized agents.

What temperature setting should I use for an enterprise chatbot?

Use a low temperature of 0 to 0.3 for enterprise and customer-facing chatbots. Temperature controls how much freedom the model has to pick tokens — lower values produce more confident, repetitive, and trustworthy responses with fewer hallucinations. Save higher temperatures (0.7 to 2.0) for creative tasks like content generation, poetry, or story writing where exploratory outputs are desirable.

What is a context window and why does it matter?

A context window is the memory or attention span of an LLM — the maximum number of tokens (input plus output combined) it can process at once, set by the model provider. If input and output tokens exceed it, context gets clipped and output becomes incomplete. Always architect prompts and pipelines within context window limits to avoid context rot and poisoning.

What results can I expect from applying cost-first AI architecture?

You get systems that solve the business problem at the lowest viable cost, scale from 1 million to 50 million users without breaking, and avoid overspending on GPU-heavy LLMs when a cheap deterministic model would do. Expect lower inference costs, reduced hallucination through grounded RAG, controlled token spend via maximum token caps, and edge-deployable solutions using fine-tuned SLMs.

Why shouldn't I use an LLM for everything?

LLMs are expensive to build, deploy, and run — accounting for energy, GPU cost, inference cost, and significant carbon footprint. Classical ML models are still used daily in industry because they are cheap, scalable, and accurate for their target tasks. Reaching for an LLM when a decision tree or XGBoost model solves the problem wastes money and compute while adding hallucination risk.

What is the best vector database for a RAG pipeline?

FAISS, built by Meta, is a free in-memory vector database ideal for small-to-production applications — it runs internal to your code with no separate cloud credentials. For external cloud-hosted storage, use Pinecone, Weaviate, or Qdrant. Choose based on scale, hosting preference, and whether you need managed infrastructure versus an embedded, self-contained solution.

Why should I wrap text in a Document object before embedding?

Wrapping text in a LangChain Document object captures the original content plus metadata — source channel, timestamp, user role, document type. This metadata enables role-based access control, audit trails, and richer retrieval. Converting raw text directly to embeddings loses all of this, making it impossible to enforce who can query what or trace where answers came from.

// GET THIS SKILL — FREE

Use this skill in your AI

Every skill on SkillForge is free. Drop your email and copy this skill straight into Claude, ChatGPT, or any LLM.

We'll email you when new skills drop. Unsubscribe anytime.