02: English screenshots and English example agent

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Guido van Dijk
2026-09-21 07:56:23 +02:00
parent aa24ac8133
commit beb87790ca
59 changed files with 39 additions and 36 deletions
+37 -34
View File
@@ -2,7 +2,7 @@
FOR THE EDITOR
Guide 2: an agent with its own knowledge base. Screenshots in screenshots/, captured on
20 September 2026 (Dify cloud, Dutch build of the same app).
20 September 2026 (Dify cloud, English interface).
Convert to HTML, PDF and Word: python3 build.py
(python-markdown, google-chrome and libreoffice; layout and logo in _tools/build_guide.py)
@@ -15,7 +15,7 @@ Formatting conventions (see also README.md):
- Blockquote starting with **Your choice** = a choice for the participant (green box)
Sample document: school-guide-example-college.pdf (fictional, in this folder).
Published example app (Dutch): https://udify.app/chat/cvLAmpk60m9HUXUy
Published example app: https://udify.app/chat/6Y6WnP0m5Z3jSHRs
-->
# Building in Dify: an agent with its own knowledge base
@@ -25,7 +25,7 @@ LeX Consultancy B.V. · 20 September 2026
In guide 1 you built a workflow: you decided every step. Now you build an agent. It gets a goal, an instruction and a knowledge base with your own document, and decides for itself when to search in it. At the end you have a chatbot with its own web address that answers questions about your document and honestly says when the answer is not in there.
This guide follows the cloud version of Dify as it looked on 20 September 2026. Dify changes fast: if your screen differs, follow what you see, not what is written here. The screenshots show the Dutch build of this app (a Dutch school guide, Dutch questions); the screens and clicks are the same.
This guide follows the cloud version of Dify as it looked on 20 September 2026. Dify changes fast: if your screen differs, follow what you see, not what is written here.
**How to read this guide**
@@ -82,16 +82,19 @@ In this guide we use a fictional two-page school guide: `school-guide-example-co
1. Click **Knowledge** in the left-hand menu.
![The Knowledge page, still empty](screenshots/stap-a01-knowledge-leeg.jpg)
![The Knowledge page](screenshots/a01-knowledge-page.jpg)
2. Click **Create** at the top right and choose **Create a ready-to-use knowledge base**.
![The Create menu](screenshots/a02-create-menu.jpg)
2. Click **Create a ready-to-use knowledge base** (labelled RECOMMENDED).
3. Leave **Import from file** selected.
![Step 1 of 3: Data Source](screenshots/stap-a02-data-source.jpg)
![Step 1 of 3: Data Source](screenshots/a03-data-source.jpg)
4. Click **Browse** and choose your document, or drag it into the box.
![The file is ready](screenshots/stap-a03-bestand-geupload.jpg)
![The file is ready](screenshots/a04-file-uploaded.jpg)
5. Click **Next**.
@@ -99,11 +102,11 @@ In this guide we use a fictional two-page school guide: `school-guide-example-co
Dify splits your document into pieces ("chunks"). Later the agent searches in those pieces, not in the whole document. Pieces that are too small contain no usable answer; this is where you check that.
![Step 2 of 3: Document Processing](screenshots/stap-a04-document-processing.jpg)
![Step 2 of 3: Document Processing](screenshots/a05-document-processing.jpg)
1. Click **Preview Chunk**. The pieces appear on the right.
![The preview with the default setting: 46 chunks](screenshots/stap-a05-preview-46-chunks.jpg)
![The preview with the default setting: 44 chunks](screenshots/a06-preview-44-chunks.jpg)
> Do you see many one-line pieces, such as "1. Lesson times" or "1 8.30 - 9.20"? Then Dify is splitting at every line break. That often happens with PDFs. A twelve-character piece cannot answer a question.
@@ -113,29 +116,29 @@ Dify splits your document into pieces ("chunks"). Later the agent searches in th
| --- | --- |
| Delimiter | `\n\n` |
3. Click **Preview Chunk** again. On the right you now have a handful of pieces of a paragraph or longer.
3. Click **Preview Chunk** again. On the right you now have three pieces of a few paragraphs each.
![After the change: 4 chunks with real content](screenshots/stap-a06-preview-4-chunks.jpg)
![After the change: 3 chunks with real content](screenshots/a07-preview-3-chunks.jpg)
4. Leave **Maximum chunk length** (1024) and **Chunk overlap** (50) as they are.
5. Under **Index Method** leave **High Quality** selected.
6. Scroll down. Leave **Embedding Model** and **Retrieval Setting** at their defaults.
![Embedding Model and Retrieval Setting](screenshots/stap-a07-embedding-retrieval.jpg)
![Embedding Model and Retrieval Setting](screenshots/a08-embedding-retrieval.jpg)
7. Click **Save & Process**.
### Step 3. Wait until processing is finished
![Knowledge base created, embedding in progress](screenshots/stap-a08-knowledge-created.jpg)
![Knowledge base created, embedding in progress](screenshots/a09-knowledge-created.jpg)
For a two-page document this takes a few seconds. The status jumps from EMBEDDING PROCESSING to **EMBEDDING COMPLETED** with a green tick behind your file.
![Embedding completed](screenshots/stap-a09-embedding-completed.jpg)
![Embedding completed](screenshots/a10-embedding-completed.jpg)
1. Click **Go to document**. You see your document in the list with status **Available**.
![The document list of the knowledge base](screenshots/stap-a10-documents.jpg)
![The document list of the knowledge base](screenshots/a11-documents.jpg)
### Step 4. Give the knowledge base a name and a description
@@ -153,11 +156,11 @@ The description is not just for you. The agent reads it to decide whether to con
Use this knowledge base for questions about the school rules of Example College: lesson times, reporting illness, absence and leave, homework and tests, phones and laptops, form tutors and contact details.
```
![Name and description filled in](screenshots/stap-a11-settings.jpg)
![Name and description filled in](screenshots/a12-settings.jpg)
3. Scroll all the way down and click **Save**.
![The Save button at the bottom of the settings](screenshots/stap-a12-settings-save.jpg)
![The Save button at the bottom of the settings](screenshots/a13-settings-save.jpg)
### Step 5. Test whether the knowledge base finds the right piece
@@ -165,7 +168,7 @@ This is the moment you see what a knowledge base does: you ask a question and ge
1. Click **Retrieval Testing** in the left-hand menu.
![Retrieval Testing, still empty](screenshots/stap-a13-retrieval-test-leeg.jpg)
![Retrieval Testing, before the first query](screenshots/a14-retrieval-test-empty.jpg)
2. Click in the **SOURCE TEXT** field and type a question.
@@ -175,9 +178,9 @@ By what time do I have to report my child sick?
3. Click **Test**.
![Three retrieved pieces with a score](screenshots/stap-a14-retrieval-resultaat.jpg)
![Three retrieved pieces with a score](screenshots/a15-retrieval-result.jpg)
On the right are the retrieved pieces with a score. The piece with the sick-report rules is at the top with 0.86; the other two score low. That is how it should be. If the right piece is missing, go back to step 2 and check whether the pieces are large enough.
On the right are the retrieved pieces with a score. The piece with the sick-report rules is at the top with 0.81; the other two score low. That is how it should be. If the right piece is missing, go back to step 2 and check whether the pieces are large enough.
---
@@ -195,11 +198,11 @@ On the right are the retrieved pieces with a score. The piece with the sick-repo
| --- | --- |
| App Name & Icon | `School guide assistant` |
![Agent chosen, name filled in](screenshots/stap-b01-create-agent.jpg)
![Agent chosen, name filled in](screenshots/b01-create-agent.jpg)
6. Click **Create**.
![The empty agent](screenshots/stap-b02-agent-leeg.jpg)
![The empty agent](screenshots/b02-agent-empty.jpg)
> Next to "Orchestrate" there is an orange label **LEGACY AGENT**. Do not be alarmed; the agent works fine. What it means is explained in the box "About the LEGACY AGENT label" at the end of this guide.
@@ -209,7 +212,7 @@ Here too the model defaults to **gpt-5**, and here too that is five times more e
1. Click the model name **gpt-5** at the top right.
![The model picker](screenshots/stap-b03-modelkiezer.jpg)
![The model picker](screenshots/b03-model-picker.jpg)
2. Choose **gpt-5-mini**.
@@ -230,7 +233,7 @@ Rules:
- Where possible, name the chapter of the school guide the answer comes from.
```
![Model and instruction in place](screenshots/stap-b04-instructie.jpg)
![Model and instruction in place](screenshots/b04-instruction.jpg)
> **Your choice: role, rules and tone.** The first sentence sets the role ("school guide assistant", "exam helper", "onboarding buddy for new colleagues"), the rules set the behaviour. Always keep the two rules about the knowledge base and about "say that you do not know"; change the rest. Want the agent to address students informally and parents formally? Say so. Want it to always end with "Is that right, or do you want to know more?" Say so. Want answers in another language when the question is in that language? One more line.
@@ -239,11 +242,11 @@ Rules:
1. Under **Knowledge**, click **Add**.
2. Click **School guide Example College**. At the bottom "1 Knowledge selected" appears.
![Choosing the knowledge base](screenshots/stap-b05-select-knowledge.jpg)
![Choosing the knowledge base](screenshots/b05-select-knowledge.jpg)
3. Click **Add**.
![The knowledge base is attached to the agent](screenshots/stap-b06-knowledge-gekoppeld.jpg)
![The knowledge base is attached to the agent](screenshots/b06-knowledge-attached.jpg)
### Step 10. Test the agent
@@ -257,11 +260,11 @@ My daughter missed a test. When can she take it?
2. Press Enter and wait. Above the answer the label **Used Knowledge** appears.
![The first answer, with a chapter reference](screenshots/stap-b07-eerste-antwoord.jpg)
![The first answer, with a chapter reference](screenshots/b07-first-answer.jpg)
3. Click **Used Knowledge** to expand it.
![What the agent looked up by itself](screenshots/stap-b08-used-knowledge.jpg)
![What the agent looked up by itself](screenshots/b08-used-knowledge.jpg)
Look at REQUEST. That is the search query the agent formulated by itself, something like "missed test catch up when can she take it". You did not tell it to search, nor what to search for. It decided that itself, based on your question and the description of the knowledge base. That is the difference from the workflow in guide 1.
@@ -273,7 +276,7 @@ How much does the Year 7 school camp cost?
5. Press Enter.
![The question that is not in the document](screenshots/stap-b09-onbekende-vraag.jpg)
![The question that is not in the document](screenshots/b09-unknown-question.jpg)
The agent says it is not in the school guide and refers to reception. That is because of the second rule in your instruction. Remove that rule and try again: you get a neatly invented amount.
@@ -281,17 +284,17 @@ The agent says it is not in the school guide and refers to reception. That is be
1. Click **Publish** at the top right.
![The Publish menu](screenshots/stap-b10-publish-menu.jpg)
![The Publish menu](screenshots/b10-publish-menu.jpg)
> The menu says "Latest Published, published a few minutes ago", even though you have not published anything yet. Dify publishes an Agent app when it is created, so empty. The version with your instruction and knowledge base is under **Current Draft**. If you skip Publish Update, the webapp opens an agent without knowledge.
2. Click **Publish Update**. The message "Success" appears and below the button it now says "Up-to-date".
![Published and up-to-date](screenshots/stap-b11-gepubliceerd.jpg)
![Published and up-to-date](screenshots/b11-published.jpg)
3. Click **Open webapp**.
![The webapp, empty](screenshots/stap-b12-webapp-leeg.jpg)
![The webapp, empty](screenshots/b12-webapp-empty.jpg)
4. Type a question to check that the published version uses the knowledge base.
@@ -299,11 +302,11 @@ The agent says it is not in the school guide and refers to reception. That is be
May my son use his phone during break?
```
![The webapp answers with a source](screenshots/stap-b13-webapp-antwoord.jpg)
![The webapp answers with a source](screenshots/b13-webapp-answer.jpg)
Below the answer is **CITATIONS** with the name of your document. That is the link you give to your test partner; it works without logging in, on a phone too.
The Dutch version of the agent in this guide is at <https://udify.app/chat/cvLAmpk60m9HUXUy>.
The agent in this guide is live at <https://udify.app/chat/6Y6WnP0m5Z3jSHRs>. Open it to see what you are working towards.
---
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 166 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 167 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 123 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

+1 -1
View File
@@ -5,7 +5,7 @@ This is what changed per release.
## 2026-09-20, English screenshots
- Guide 01 rebuilt with the English Dify interface and an English app (Text at level, https://udify.app/workflow/VHWboGL9462eA1KI). The other guides follow.
- Guides 01 and 02 rebuilt with the English Dify interface and English apps (Text at level, https://udify.app/workflow/VHWboGL9462eA1KI; School guide assistant, https://udify.app/chat/6Y6WnP0m5Z3jSHRs). The other guides follow.
- New appendix 00-self-hosting: running Dify Community Edition yourself with Docker (Windows, Mac, Linux).
## 2026-09-20, first release
+1 -1
View File
@@ -55,7 +55,7 @@ The order is also a learning path: 01 and 02 in the first hour of the workshop,
The apps are live to try out:
- Text at level (01): https://udify.app/workflow/VHWboGL9462eA1KI
- School guide assistant (02, with the Reception mode from 03; Dutch build): https://udify.app/chat/cvLAmpk60m9HUXUy
- School guide assistant (02): https://udify.app/chat/6Y6WnP0m5Z3jSHRs
- Parent letter assistant (03; Dutch build): https://udify.app/chat/OJCfxjBeBHCEbBPx
- School news (03 and 07; Dutch build): https://udify.app/workflow/jJclFyX9BlteuHYi
- Test week planner (04; Dutch build): https://udify.app/agent/rKoqw8rbmp0IF86Q