Mastering Coze Knowledge Base: A Step‑by‑Step Low‑Code Agent Guide

This article provides a comprehensive, hands‑on guide to Coze's knowledge base, covering its core concepts, key features, practical use‑case scenarios, detailed creation steps, configuration options, prompt design, testing methods, and a comparison with variables, memory, and databases.

Fun with Large Models
Fun with Large Models
Fun with Large Models
Mastering Coze Knowledge Base: A Step‑by‑Step Low‑Code Agent Guide

Knowledge Base Concept

A knowledge base stores, manages, and applies large volumes of structured and unstructured data. Coze’s knowledge base follows this model: uploaded documents are automatically split into independent segments for efficient semantic retrieval. For example, a document containing the sentences “AAA is an AI product manager” and “BBB is an AI programmer” is split into two segments. When a user asks “Who is AAA?”, the system matches the first sentence by semantic similarity and returns the answer.

Core Functions

Diverse data sources – Supports local files (.txt, .pdf, .docx, .csv, .xlsx), web pages, API data, and integrations with Notion, Feishu, etc.

Intelligent content segmentation – Automatically divides uploaded content into independent fragments; custom rules (keywords, length, overlap) can be set for finer control.

Flexible invocation – After linking the knowledge base to an agent, developers can choose automatic or on‑demand calls.

Typical Application Scenarios

Industry expert agent – Build a knowledge base of car model specifications or medical disease encyclopedias, enabling the agent to answer domain‑specific queries.

Product/service assistant – Import product manuals, service terms, etc., so the agent can provide accurate, 24/7 support.

Employee training & Q&A – Upload handbooks, process documents, and let staff query the bot for instant learning.

Coze Knowledge Base Usage Guide

1. Creating and Managing a Knowledge Base

Access the Knowledge Base page: open https://www.coze.cn/home, click Resources → Knowledge Base , then Add Resource → Knowledge Base .

Create the knowledge base and upload files: select “Coze Knowledge Base” and upload a text file (e.g., the author’s “DeepSeek High‑Performance Deployment” notes).

Configure content parsing: for multimodal documents the system extracts images, tables, etc.; for plain text choose “Fast Parsing”.

Set segmentation strategy: choose automatic segmentation or custom settings such as delimiter symbols, maximum segment length, overlap, and preprocessing rules.

Preview segmentation results and finalize: review generated segments; the system converts each segment into vectors for semantic matching.

Complete creation: confirm and click “Create”.

Link the knowledge base to an agent: associate the newly created knowledge base with an agent.

Configure prompts and enable the knowledge base: use the model to auto‑optimize prompts and select the knowledge base in the editor.

Prompt Example

# Role
You are an intelligent assistant focused on providing precise answers using knowledge base information, designed to test knowledge base functionality and presentation, rigorously extracting relevant content and responding clearly.

## Skills
### Skill 1: Knowledge Base Priority Retrieval
1. When the user asks a question, **prioritize invoking the knowledge base** for answers, do not use external tools or fabricate content;
2. If the knowledge base contains a direct match, extract core content and combine into a concise answer;
3. If the knowledge is scattered or requires linking multiple points, automatically structure it (e.g., bullet points, logical chaining).

===Reply Example===
- 🔑 Matched knowledge point: <knowledge base entry>
- 📌 Core content: <1‑2 sentence summary>
- 📊 Detailed breakdown: <if complex, explain point by point with specific entries>
===End Example===

### Skill 2: Knowledge Accuracy and Completeness Verification
1. Rigorously verify knowledge base information to ensure replies match the original text without exaggeration or omission;
2. If conflicts or gaps exist, clearly indicate “different explanations in knowledge base” or “information not fully recorded”, do not force contradictory integration.

### Skill 3: Contextual Explanation
1. For abstract or specialized knowledge base content, use familiar logic or scenarios to explain (e.g., everyday analogies);
2. When multiple knowledge points are involved, proactively organize logical connections to aid user understanding.

## Constraints
- **Strictly limit scope**: Respond only based on current knowledge base content, no external info or personal opinions;
- **Boundary prompts**: If question exceeds knowledge base coverage, reply “Current question is beyond knowledge base support; please add relevant content and retry”;
- **Reject irrelevant topics**: Do not answer unrelated questions (personal experiences, entertainment, technical issues);
- **Formatting**: All replies must follow the example structure, with moderate information density, avoiding overly long or brief responses.

Testing Retrieval

Ask: “What are the high‑performance deployment methods for DeepSeek?” The agent retrieves relevant content blocks, shows similarity scores, and ranks results, confirming accurate knowledge extraction.

Comparison with Variables, Long‑Term Memory, and Databases

All four storage types exist in Coze but differ in usage and characteristics:

Knowledge (Knowledge Base) – Static data shared across the workspace, created/maintained by developers, read‑only for end users.

Memory (Variables, Database, Long‑Term Memory) – Dynamic data generated during user interactions, tied to individual users, not shared across agents.

Example: In a rental platform agent, knowledge stores property listings, while memory stores each user’s browsing history and preferences.

Conclusion

Coze’s knowledge base provides an integrated solution for storing, managing, retrieving, and applying information, significantly enhancing an agent’s capabilities. Its effectiveness depends on the quality and relevance of the imported content. Users should understand its features, plan knowledge structures for specific scenarios, and continuously refine the data to unlock the full potential of intelligent assistants for business innovation.

prompt engineeringRAGlow-codeKnowledge BaseCozeAgent Development
Fun with Large Models
Written by

Fun with Large Models

Master's graduate from Beijing Institute of Technology, published four top‑journal papers, previously worked as a developer at ByteDance and Alibaba. Currently researching large models at a major state‑owned enterprise. Committed to sharing concise, practical AI large‑model development experience, believing that AI large models will become as essential as PCs in the future. Let's start experimenting now!

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.