> ## Documentation Index
> Fetch the complete documentation index at: https://docs.prisme.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Building a No-Code RAG Agent

> Learn how to create a powerful retrieval-augmented generation agent without writing code using Knowledges

This tutorial guides you through building a Retrieval-Augmented Generation (RAG) agent on Prisme.ai without writing any code. In v27 the work is split across two products: **Knowledges** hosts the knowledge base (document ingestion, embeddings, retrieval), and **Agent Creator** hosts the agent itself (instructions, model, playground, evaluations). You'll wire them together so your agent answers questions grounded in your documents.

## What You'll Build

A complete RAG system with:

* A Knowledge Base in **Knowledges** containing your documents
* Vector embedding and retrieval handled by the Knowledge Base
* An agent in **Agent Creator** that consumes that Knowledge Base for context
* The Agent Creator **Playground** for testing conversations
* **Evaluations** and **Analytics** in Agent Creator for ongoing quality control

<Note>
  This split lets Data Scientists, Data Engineers, Developers, and Business Teams collaborate from a single source of truth: knowledge stays curated in one place, while agents that depend on it are configured and tested independently.
</Note>

## Prerequisites

Before starting this tutorial, make sure you have:

* Access to a Prisme.ai workspace with **Knowledges** and **Agent Creator** enabled
* Basic understanding of prompting concepts
* Documents to ingest (web pages, PDFs, Word documents, PowerPoint presentations, etc.)

## Step 1: Understanding the Knowledges Interface

Let's start by orienting ourselves inside the Knowledges product.

<Steps>
  <Step title="Open Knowledges">
    From AI Studio, open the **Knowledges** product (`/apps/ai-knowledge`).
  </Step>

  <Step title="Explore the navigation">
    The left sidebar gives you four entries:

    * **Dashboard**: overview with high-level stats — number of Knowledge Bases, Documents, and Connectors.
    * **Knowledge Bases**: the list of every knowledge base in your workspace, with quick access to each one.
    * **Connectors**: third-party SaaS integrations (SharePoint, Google Drive, Notion, Confluence) that sync content into Knowledge Bases. Note: web crawling and direct file uploads are **not** here — they live on each Knowledge Base's detail page via **Add Web Source** and **Add Documents**.
    * **Settings**: workspace-level Knowledges settings.
  </Step>

  <Step title="Skim the dashboard">
    The dashboard tiles are the fastest way to gauge volume: how many knowledge bases exist, how many documents are indexed across all of them, and how many third-party connectors are wired up.
  </Step>
</Steps>

<img src="https://mintcdn.com/prismeai/K_v8yhAp7bkcmKW-/images/tutorials/knowledges-dashboard.png?fit=max&auto=format&n=K_v8yhAp7bkcmKW-&q=85&s=53b9426075a82b2d2df96db4b739b924" alt="Knowledges dashboard with Dashboard/Knowledge Bases/Connectors/Settings sidebar and stats tiles" width="1440" height="900" data-path="images/tutorials/knowledges-dashboard.png" />

## Step 2: Create a Knowledge Base

Now create the knowledge base that will hold your documents.

<Steps>
  <Step title="Open Knowledge Bases">
    In the Knowledges sidebar, click **Knowledge Bases**.
  </Step>

  <Step title="Start a new Knowledge Base">
    Click the **+ Create** button in the top-right (the Dashboard's **+ New Knowledge Base** tile opens the same dialog).
  </Step>

  <Step title="Name and configure it">
    Give the Knowledge Base a clear name and description that reflect what it covers. Pick the embedding model you want to use for vectorization — the choice affects retrieval quality and cost.
  </Step>

  <Step title="Open the Knowledge Base">
    Once created, open it from the Knowledge Bases list to access its documents and settings.
  </Step>
</Steps>

<img src="https://mintcdn.com/prismeai/K_v8yhAp7bkcmKW-/images/tutorials/knowledges-new-kb-dialog.png?fit=max&auto=format&n=K_v8yhAp7bkcmKW-&q=85&s=58d03ed33b7da7cd5e9537105a9d974f" alt="Knowledges Create Knowledge Base dialog with Name, Description, RAG Configuration (Fast/Balanced/Quality)" width="1440" height="900" data-path="images/tutorials/knowledges-new-kb-dialog.png" />

<Note>
  Knowledges is model-agnostic for both embedding and generation, so you can swap models later without rebuilding the knowledge base from scratch.
</Note>

## Step 3: Add Documents

With the Knowledge Base open, ingest your content.

<Steps>
  <Step title="Open the documents tab">
    Inside the Knowledge Base, navigate to its documents tab.
  </Step>

  <Step title="Add documents">
    Click **Add Documents** and either upload files from your computer or paste URLs to web content. For full website ingestion, see the **Add Web Source** flow on the Knowledge Base detail page.
  </Step>

  <Step title="Configure document processing">
    Per Knowledge Base, you can adjust how content is chunked before embedding:

    * **Text Splitter**: static (fixed-size chunks) or dynamic (content-aware) segmentation
    * **Chunk Size**: the size of each segment
    * **Overlap**: how much content overlaps between adjacent chunks to preserve context

    See [RAG settings](/products/ai-knowledge/rag-settings) for the full reference.
  </Step>

  <Step title="Process documents">
    Start the processing job. Knowledges will load and parse each document, extract and clean the text, segment it into chunks, generate vector embeddings, and capture metadata.
  </Step>
</Steps>

## Step 4: Create an Agent in Agent Creator and Connect the Knowledge Base

The knowledge base is ready. Now create the agent that will use it.

<Steps>
  <Step title="Open Agent Creator">
    From AI Studio, switch to the **Agent Creator** product (`/apps/agent-factory`).
  </Step>

  <Step title="Create a new agent">
    Click **+ Create agent** in the top-right. Give the agent a name and description.
  </Step>

  <Step title="Set instructions and model">
    Write the agent's system instructions (its role, tone, what it should and shouldn't do) and pick the generation model.
  </Step>

  <Step title="Attach the Knowledge Base">
    In the agent's **Capabilities** section, connect the Knowledge Base you created in Step 2. From now on, the agent will retrieve relevant chunks from that Knowledge Base each time a user asks a question.
  </Step>
</Steps>

<img src="https://mintcdn.com/prismeai/K_v8yhAp7bkcmKW-/images/tutorials/agent-creator-create.png?fit=max&auto=format&n=K_v8yhAp7bkcmKW-&q=85&s=d9b7d65c193273c62d40811db97f569c" alt="Agent Creator Create Agent wizard with From Scratch / Import AGENTS.md options" width="1440" height="900" data-path="images/tutorials/agent-creator-create.png" />

*The screenshot shows the agent creation wizard. Once your agent exists, attach a Knowledge Base from its capabilities/configuration view.*

## Step 5: Chat With Your Agent in the Playground

Time to try it.

<Steps>
  <Step title="Open the Playground">
    On the agent's detail page, open the **Playground** tab.
  </Step>

  <Step title="Ask questions">
    Enter questions related to your documents and watch the agent respond.
  </Step>

  <Step title="Inspect the retrieved sources">
    Each response surfaces the document chunks that were pulled from the Knowledge Base to ground the answer. Use this to verify the agent's reasoning and catch retrieval issues early.
  </Step>
</Steps>

<Note>
  Source transparency is a first-class feature: every answer in the Playground (and in production) shows which chunks were used, so you can audit grounding without leaving the agent's page.
</Note>

## Step 6: Evaluations (Test-Driven Building)

Evaluations live alongside the agent in Agent Creator, which keeps quality checks tied to the thing being tested.

<Steps>
  <Step title="Open the Evaluate tab">
    On the agent's detail page, switch to the **Evaluate** tab.
  </Step>

  <Step title="Create an eval suite">
    Add a new evaluation suite for the agent.
  </Step>

  <Step title="Define test cases">
    Each test case pairs a **question** a user might ask with the **expected answer** the agent should produce.
  </Step>

  <Step title="Schedule runs">
    Configure how often the suite runs (daily, weekly, on demand) and whether it should fire automatically after agent changes.
  </Step>

  <Step title="Run the suite">
    Execute the suite to evaluate the agent's current behavior.
  </Step>

  <Step title="Review results">
    Each result includes:

    * **Prompt and Context**: the exact prompt and retrieved context used
    * **Generated Response**: what the agent actually produced
    * **Response Evaluation**: rating of response quality (poor, correct, good)
    * **Context Evaluation**: rating of retrieved-context relevance and accuracy
  </Step>
</Steps>

<Note>
  Business experts can manually grade responses, context, and hallucinations. Re-run the suite after every meaningful change — instructions, model, retrieval parameters, chunking, or attached Knowledge Base — so regressions surface immediately.
</Note>

## Step 7: Advanced Customization

Once the basics work, you can extend the system with custom logic that reacts to Knowledge Base activity. The pattern is the same in both cases: a Builder automation (or an external service) listens for platform events emitted by the Knowledge Base and runs your custom logic in response.

<Tabs>
  <Tab title="Using Builder Product">
    <Steps>
      <Step title="Open Builder">
        Open the **Builder** product (`/builder`) — Prisme.ai's no-code workspace for automations.
      </Step>

      <Step title="Create an event-triggered automation">
        Create an automation whose `when` block subscribes to the Knowledge Base events you care about — for example, document add/update/delete or query events. See the [Automations reference](/products/ai-builder/automations) for the trigger syntax.
      </Step>

      <Step title="Implement custom logic">
        In the automation's `do` steps, run whatever processing you need — call out to a custom service, write to a Collection, post to Slack, or chain another agent. You can mix YAML instructions with Custom Code (Python or NodeJS) blocks.
      </Step>
    </Steps>
  </Tab>

  <Tab title="Using External Code">
    <Steps>
      <Step title="Build an external service">
        Implement your custom processing as a service that exposes an HTTPS endpoint.
      </Step>

      <Step title="Bridge events with a Builder automation">
        Create an automation in Builder that subscribes to the Knowledge Base events you care about, then `fetch`es your external service inside the automation. This keeps event subscription centralized in Builder and uses your service for the heavy lifting.
      </Step>

      <Step title="Handle events">
        On your service, branch on the event payload received from the automation and run the appropriate handler.
      </Step>
    </Steps>
  </Tab>
</Tabs>

## Step 8: Handling PII and Safety Controls

For sensitive content, route Knowledge Base events through your own safety layer.

<Steps>
  <Step title="Implement PII controls">
    Subscribe a Builder automation to Knowledge Base events (document ingest, query) and run PII detection inside that automation before sensitive content is stored or returned.
  </Step>

  <Step title="Configure data anonymization">
    Decide whether to anonymize personal data based on your use case and compliance requirements.
  </Step>

  <Step title="Add custom safety controls">
    Plug in organization-specific safety measures — content filters, allow/deny lists, audit logging — wherever they belong in the event flow.
  </Step>
</Steps>

## Step 9: Monitoring and Maintenance

Keep the agent healthy with the right monitoring surface for each concern.

<Steps>
  <Step title="Monitor agent conversations in Insights">
    For cross-agent analytics on real user conversations — adoption, topics, feedback, clusters — use the **Insights** product. See [Insights overview](/products/ai-insights/overview).
  </Step>

  <Step title="Check per-agent usage in Agent Creator">
    Open the **Analytics** tab on the agent itself for usage metrics specific to that agent (volume, latency, token consumption, response quality).
  </Step>

  <Step title="Set up alerts">
    Use a Builder automation subscribed to Knowledge Base events to push alerts into Slack, Teams, or Jira when something goes wrong.
  </Step>

  <Step title="Maintain the Knowledge Base">
    Refresh documents as content changes, retire stale sources, and keep connectors synced.
  </Step>

  <Step title="Optimize">
    Use evaluations and analytics to drive iterative tuning — instructions, model, chunking, retrieval parameters.
  </Step>
</Steps>

## Best Practices for High-Performance RAG

To maximize the effectiveness of your RAG agent, consider these recommendations:

<CardGroup cols="2">
  <Card title="Knowledge Architecture" icon="sitemap">
    Design a well-organized structure for easy access and interpretation by AI systems
  </Card>

  <Card title="Data Quality" icon="database">
    Ensure data is accurate, well-formatted, and relevant—this accounts for \~80% of success
  </Card>

  <Card title="Hybrid Technologies" icon="code-branch">
    Consider combining NLU for tag extraction with LLMs for generation to improve efficiency
  </Card>

  <Card title="Continuous Optimization" icon="arrow-trend-up">
    Regularly monitor response times, accuracy, and retrieval effectiveness
  </Card>
</CardGroup>

## Wrapping Up

You've built a RAG agent without writing code: documents ingested into a Knowledge Base in **Knowledges**, an agent configured in **Agent Creator** that retrieves from that Knowledge Base, and a Playground plus Evaluations workflow for ongoing quality. The clean split between knowledge and agent makes it easy to evolve each side independently — swap models, refine instructions, or replace the Knowledge Base — without rebuilding the rest.

## Next Steps

<CardGroup cols="2">
  <Card title="Document Classification" icon="file" href="/resources/tutorials/data-classification-agent">
    Learn how to automatically classify and organize your documents with AI
  </Card>

  <Card title="AI Contact Routing" icon="phone" href="/resources/tutorials/ai-contact-routing">
    Create an intelligent contact form that routes inquiries to the right department
  </Card>

  <Card title="Webhook Integration" icon="webhook" href="/resources/tutorials/webhook-builder">
    Build advanced integrations between your RAG agent and other systems
  </Card>

  <Card title="Website to RAG" icon="globe" href="/resources/tutorials/website-to-rag-agent">
    Turn website content into a comprehensive knowledge base for your RAG agent
  </Card>
</CardGroup>
