Skip to main content
Back to Blog
·6 min read·By Emanuele Pugliese

Understanding the Three Layers of Modern AI Systems

Listen to this article

Modern AI applications are often built using three complementary layers: foundation models, skills (or agent capabilities), and augmented retrieval (RAG). Together, these layers allow AI systems to reason, perform specialised tasks, and access up-to-date information.

If you’ve used a chatbot that could look up your order, check company policy, and explain the answer in plain English — you’ve already seen all three layers working together. Understanding what each one does, and where the boundaries are, is essential for anyone building or evaluating AI systems.

1. Foundation Models: The Brain

A foundation model is the core AI model that understands and generates language. Examples include OpenAI’s GPT models, Anthropic’s Claude models, Meta’s Llama models, and Amazon’s Nova models.

These models have been trained on enormous amounts of data and can understand questions, generate text, summarise information, write code, and reason about problems. Think of the foundation model as the general intelligence engine of the system.

Example: A user asks, “Explain how a credit card transaction works.” The foundation model can answer using the knowledge learned during training. However, it only knows information that was available when it was trained. Ask it about your company’s latest pricing, and it will either hallucinate or admit it doesn’t know.

flowchart LR
    Q["User question"] --> FM["Foundation Model<br/>(trained knowledge)"]
    FM --> A["Generated answer"]

    style FM fill:#dbeafe,stroke:#2563eb

The foundation model is powerful but limited. It provides reasoning and language understanding, but it doesn’t know your data and it can’t take actions in the real world. That’s where the next two layers come in.

2. Skills: Specialised Capabilities

Skills are specialised functions built on top of the foundation model. Instead of asking the model to do everything from scratch, a skill provides a structured way to perform a specific task.

Examples of skills include:

  • Translation
  • Sentiment analysis
  • Code generation
  • Document summarisation
  • Data extraction
  • SQL generation
  • Workflow orchestration

Think of skills as expert tools that guide the foundation model toward a particular job. The model provides reasoning, while the skills provide specialised behaviour.

Example: A travel booking assistant may have skills such as finding flights, searching hotels, calculating trip costs, and generating itineraries. The foundation model understands the user’s request — “I want a week in Lisbon in September, budget around £2,000” — and the skills handle the structured work of querying APIs, comparing prices, and assembling a plan.

flowchart TD
    U["User request"] --> FM["Foundation Model<br/>(understands intent)"]
    FM --> S1["Skill: Find flights"]
    FM --> S2["Skill: Search hotels"]
    FM --> S3["Skill: Calculate costs"]
    FM --> S4["Skill: Generate itinerary"]
    S1 --> R["Combined result"]
    S2 --> R
    S3 --> R
    S4 --> R

    style FM fill:#dbeafe,stroke:#2563eb
    style S1 fill:#fef3c7,stroke:#d97706
    style S2 fill:#fef3c7,stroke:#d97706
    style S3 fill:#fef3c7,stroke:#d97706
    style S4 fill:#fef3c7,stroke:#d97706

Without skills, you’d need to describe every step in your prompt and hope the model gets it right. Skills make AI systems reliable and composable — each skill does one thing well, and the foundation model orchestrates them.

3. Augmented Retrieval (RAG): External Knowledge

Retrieval-Augmented Generation (RAG) allows AI to access information that was not part of its original training. Instead of relying only on what it learned during training, the system retrieves relevant information at query time and passes it to the model as context.

The process works like this:

  1. The system receives a question
  2. It searches relevant documents or databases
  3. It retrieves the most useful information
  4. It passes that information to the foundation model
  5. The model generates an answer based on the retrieved content

This is called grounding because the answer is grounded in real data rather than the model’s training memory.

Example: A user asks, “What is our company’s refund policy?” The foundation model doesn’t know this — it was never in the training data. The retrieval system searches company documents, finds the refund policy, and supplies it to the model. The model then generates a response using the actual policy text.

Without retrieval, the model might guess. With retrieval, the model answers using real data.

flowchart LR
    Q["User question"] --> SEARCH["Search relevant<br/>documents"]
    SEARCH --> DOCS["Retrieved context"]
    DOCS --> FM["Foundation Model"]
    Q --> FM
    FM --> A["Grounded answer"]

    style SEARCH fill:#dcfce7,stroke:#16a34a
    style DOCS fill:#dcfce7,stroke:#16a34a
    style FM fill:#dbeafe,stroke:#2563eb

How the Three Layers Work Together

Imagine a customer support chatbot. A customer asks: “Why was my order cancelled?”

Step 1 — Foundation Model: The model understands the question and recognises the user needs order-specific information and an explanation.

Step 2 — Skills: A customer-service skill determines the right actions: check order status, query customer records, and generate a support response.

Step 3 — Retrieval: The system retrieves the customer’s order information, account details, and relevant company policies.

Final Result: The foundation model combines its reasoning ability, the structured output from specialised skills, and the retrieved business data to generate an accurate, personalised response.

flowchart TD
    Q["'Why was my order cancelled?'"] --> FM["Foundation Model<br/>(understands intent)"]
    FM --> SKILL["Customer Service Skill<br/>(check order, query records)"]
    SKILL --> RAG["Retrieval Layer<br/>(order data, policies)"]
    RAG --> FM2["Foundation Model<br/>(generates response)"]
    FM2 --> A["Accurate, personalised<br/>support response"]

    style FM fill:#dbeafe,stroke:#2563eb
    style SKILL fill:#fef3c7,stroke:#d97706
    style RAG fill:#dcfce7,stroke:#16a34a
    style FM2 fill:#dbeafe,stroke:#2563eb

A Real-World Analogy

Think of an AI system as a doctor:

  • Foundation Model = Medical Knowledge. The doctor’s years of education and training — a broad understanding of medicine, anatomy, and disease.
  • Skills = Medical Procedures. Reading X-rays, writing prescriptions, performing diagnoses — structured tasks that require specialised expertise.
  • Retrieval = Patient Records. Access to the patient’s history, lab results, and current medications — specific information the doctor needs but couldn’t possibly memorise for every patient.

A doctor needs all three to make the best decision. Modern AI systems work in exactly the same way.

Key Takeaway

The most effective AI systems don’t rely on a single model doing everything. They combine:

  • Foundation Models for reasoning and language understanding
  • Skills for specialised capabilities and task execution
  • Retrieval (RAG) for access to external and up-to-date information

Understanding these three layers — and how they interact — is essential for anyone building, evaluating, or working with modern AI applications. The model provides the intelligence, skills provide the structure, and retrieval provides the data. Together, they produce accurate, useful, and context-aware responses.

Related Articles

Comments

Comments are powered by GitHub Discussions. Sign in with GitHub to leave a comment.

Basket is empty

Stay in the loop

Get architecture insights, product updates, and practical engineering tips.

PuglieseWeb LTD is registered in England and Wales. Company No. 17078772.