Guide

Knowledge base

A knowledge base is a dataset of your documents that an agent searches before it answers, so answers can cite your help pages, policies or manuals.

In the dashboard

  1. 1

    Create a dataset

    Knowledge Base > Create Dataset. Three steps: Basic Information, Search Engine, Review & Create.
  2. 2

    Who can see it

    Everything in a workspace is shared with that team: every dataset can be seen, searched and attached to agents by everyone in the workspace, according to their role. Use a personal workspace for private material.
  3. 3

    Choose the indexing key

    Pick which of your OpenAI keys indexes this dataset. Documents are never indexed on a Dezifi key, and an upload is refused until a key is chosen. The key must be an active OpenAI key.
  4. 4

    Upload documents

    Use Upload documents on the dataset card: up to 10 files at a time, PDF, TXT, MD, DOC, DOCX, HTML or CSV, up to 10 MB each.
  5. 5

    Attach it to an agent

    In the agent builder, step 5 "Knowledge Base", tick the dataset. In the instructions, ask the agent to cite the document it used.

As code

Declare the dataset with RagDataset and attach it with RagSelection (see the docs-qa sample). DAK cannot set the indexing key yet: after the first deploy, choose it once in the dashboard (or PUT /api/v1/rag/datasets/{id}/embedding-key with {"credentialId"}), then load files with dak rag ingest <datasetId> <file> and follow the job with dak rag status <jobId>. The CLI uploads the same files as the dashboard: PDF, TXT, MD, DOC, DOCX, HTML and CSV, up to 10 MB each. JSON is not accepted.

Tips

  • Split long documents into one topic per file: answers cite file titles, and smaller files are easier to keep current.
  • A PDF must contain selectable text; scanned images of pages have no text to index (such a file shows 0 chunks).
  • Uploading a file with the same name adds a second copy; delete the old one first.
  • Add the Grounding guardrail to an agent that must only answer from its documents.