Files
Riskey 23905eb42d chore: bulk formatting cleanup and post-writing format-check skills (#751)
* style: move trailing colons outside bold asterisks

Relocates colons from inside bold markers (`**Start:**`) to after them (`**Start**:`) across en, zh, and ja. Colons that sit inside bold markers can break rendering when adjacent to other inline syntax, so keeping them outside produces more reliable output. Preserves colon width (half-width and full-width) and leaves code fences and inline code spans untouched.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* style: normalize punctuation widths across en, zh, ja

Corrects punctuation width to match the surrounding language: full-width forms (,。:?()) in Chinese and Japanese prose when adjacent to CJK characters, half-width forms in English prose. Japanese uses 、 for commas. One Latin-heavy list in ja/use-dify/workspace/model-providers.mdx was left untouched because converting only its trailing comma would break visual consistency.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs: document frontmatter quoting rule

Replaces the vague "quote values that contain special characters" guidance with a concrete rule: leave values unquoted by default, wrap in double quotes only when the value contains a colon followed by a space. This is the one case where YAML would otherwise misparse the value. Example frontmatter block updated to show bare values.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* style: remove triple-asterisk horizontal rule dividers

Deletes standalone *** divider lines across en, zh, and ja docs. Our pages rely on headings for structure, so horizontal rules add visual noise without carrying meaning. Excludes the versions/ folder and use-dify/knowledge/create-knowledge/import-text-data/readme.mdx where the dividers serve a layout purpose. Code fences are left untouched.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* style: convert -ing headings to base form across en docs

Applies the formatting guide's heading verb rule to ~111 headings and frontmatter titles: `Creating X` becomes `Create X`, `Publishing the Plugin` becomes `Publish the Plugin`, and so on. Preserves noun-phrase gerund headings that name a concept or feature (`Troubleshooting`, `Getting Started`, `Monitoring Data List`, `Streaming Output`, etc.) and skips heading-less gerunds used as adjectives (`Publishing Methods`, `Mounting & Volumes`). Heading numeric prefixes like `### 6.` are handled before verb detection. Also fixes two pre-existing missing-space issues on numbered headings in embedding-in-websites.mdx.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* feat: add English and CJK format-check skills

Adds two post-writing verification skills under .claude/skills/. Each combines a Python linter for mechanical rules with a SKILL.md prose section for judgment-call rules, following the same pattern as dify-docs-terminology-check. The English skill enforces every rule in writing-guides/formatting-guide.md. The CJK skill covers general rules plus the Chinese-specific rules in tools/translate/formatting-zh.md and the Japanese-specific rules in tools/translate/formatting-ja.md, auto-selecting the rule set based on the file path. Both linters skip fenced code blocks, inline code spans, and markdown link syntax where appropriate, and they exempt the translation disclaimer from the cross-language link check so zh/ja pages can continue to link back to their English source.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs: centralize post-writing verification in writing-guides index

Moves the canonical list of post-writing checks into writing-guides/index.md so it lives in one place, adds the two new format-check skills to that list, and shortens the Post-Writing Verification section in each writing skill (guides, api-reference, env-vars) to a one-line pointer. Also unwraps a pre-existing hard-wrapped paragraph in the api-reference skill's Cross-API Links section.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix: address Copilot review comments

Applies twelve fixes raised in the PR review:

- Corrects the "Veriyfing" typo in a newly-renamed en heading and updates it to the imperative base form (Verify).
- Removes a stray empty secondary frontmatter block from the same file.
- Restores four garbled translation strings that were flagged by the reviewer (ja loop-variable description, ja conversation_id bullet, zh team-member access description, zh annotation-threshold sentence).
- Repairs an unbalanced bold markup in ja/use-dify/workspace/team-members-management.mdx introduced by the earlier bold-colon relocation pass.
- Converts half-width colons to full-width `:` after bold labels adjacent to CJK across 26 ja and 2 zh files (174 occurrences). The earlier bold-colon pass moved the colons outside `**...**` but left them half-width; Japanese and Chinese prose use `:` next to CJK.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix: address second round of Copilot review comments

Covers nine findings from the follow-up review:

- Extends the bold-colon width fix to any `**...**:` pattern on a line containing CJK, not only when the bolded text itself contains CJK. Catches 34 occurrences in 11 ja and zh files such as `**CentOS**:`, `**Windows**:`, and `- **Professional**:` where the bolded label is Latin but the surrounding prose is Japanese or Chinese.
- Replaces `左上角` with `左上` in three ja files. The original translation carried over the Chinese term instead of using the natural Japanese form.
- Unquotes 99 frontmatter values across 56 en files that were wrapped in single or double quotes without any `: ` in the value. Converts the four single-quoted values to unquoted, matching the new frontmatter quoting rule documented in the formatting guide.
- Converts one stray `**Vector Search Settings**:` in en/use-dify/knowledge/create-knowledge/setting-indexing-methods.mdx back to `:` so English prose uses half-width punctuation.
- Relaxes `_yaml_needs_quotes()` in both format-check linters to match the documented rule (quote only when the value contains `: `). The previous stricter check flagged cases the guide intentionally left unquoted, which would make the skills report violations that the guide does not treat as errors.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-17 22:46:55 +08:00
..

---
title: Knowledge
sidebarTitle: Overview
---

## Introduction

Knowledge in Dify is a collection of your own data that can be integrated into your AI apps. It allows you to provide LLMs with domain-specific information as context, ensuring their responses are more accurate, relevant, and less prone to hallucinations.

This is made possible through Retrieval-Augmented Generation (RAG). It means that instead of relying solely on its pre-trained public data, the LLM uses your custom knowledge as an additional source of truth:

1. (Retrieval) When a user asks a question, the system first **retrieves the most relevant** information from the incorporated knowledge.

2. (Augmented) This retrieved information is then combined with the user's original query and sent to the LLM as **augmented context**.

3. (Generation) The LLM uses this context to generate a **more precise** answer.


Knowledge is stored and managed in knowledge bases. You can create multiple knowledge bases, each tailored to different domains, use cases, or data sources, and selectively integrate them into your application as needed.

## Build with Knowledge

With Dify knowledge, you can build AI apps that are grounded in your own data and domain-specific expertise. Here are some common use cases:

- **Customer support chatbots**: Build smarter support bots that provide accurate answers from your up-to-date product documentation, FAQs, and troubleshooting guides.

- **Internal knowledge portals**: Build AI-powered search and Q&A systems for employees to quickly access company policies and procedures.

- **Content generation tools**: Build intelligent writing tools that generate reports, articles, or emails based on specific background materials.

- **Research & analysis applications**: Build applications that assist in research by retrieving and summarizing information from specific knowledge repositories like academic papers, market reports, or legal documents.

## Create Knowledge

- **[Quick create](/en/use-dify/knowledge/create-knowledge/introduction)**: Import data, define processing rules, and let Dify handle the rest. Fast and beginner-friendly. 

- **[Create from a knowledge pipeline](/en/use-dify/knowledge/knowledge-pipeline/readme)**: Orchestrate more complex, flexible data processing workflows with custom steps and various plugins.

- **[Connect to an external knowledge base](/en/use-dify/knowledge/connect-external-knowledge-base)**: Sync directly from external knowledge bases via APIs to leverage existing data without migration.

## Manage & Optimize Knowledge

- **[Manage content](/en/use-dify/knowledge/manage-knowledge/maintain-knowledge-documents)**: View, add, modify, or delete documents and chunks to keep your knowledge current, accurate, and retrieval-ready.

- **[Test and validate retrieval](/en/use-dify/knowledge/test-retrieval)**: Simulate user queries to test how well your knowledge base retrieves relevant information.

- **[Enhance retrieval with metadata](/en/use-dify/knowledge/metadata)**: Add metadata to documents to enable filter-based searches and further improve retrieval precision.

- **[Adjust knowledge base settings](/en/use-dify/knowledge/manage-knowledge/introduction)**: Modify the index method, embedding model, and retrieval strategy at any time.

## Use Knowledge

**[Integrate into applications](/en/use-dify/knowledge/integrate-knowledge-within-application)**: Ground your AI app in your own knowledge.

---

**Read More**:

- [Dify v1.1.0: Filtering Knowledge Retrieval with Customized Metadata](https://dify.ai/blog/dify-v1-1-0-filtering-knowledge-retrieval-with-customized-metadata)

- [Dify v0.15.0: Introducing Parent-child Retrieval for Enhanced Knowledge](https://dify.ai/blog/introducing-parent-child-retrieval-for-enhanced-knowledge)

- [Introducing Hybrid Search and Rerank to Improve the Retrieval Accuracy of the RAG System](https://dify.ai/blog/hybrid-search-rerank-rag-improvement)

- [Dify.AI's New Dataset Feature Enhancements: Citations and Attributions](https://dify.ai/blog/difyai-new-dataset-features)

- [Text Embedding: Basic Concepts and Implementation Principles](https://dify.ai/blog/text-embedding-basic-concepts-and-implementation-principles)

- [Enhance Dify RAG with InfraNodus: Expand Your LLM's Context](https://dify.ai/blog/enhance-dify-rag-with-infranodus-expand-your-llm-s-context)

- [Dify.AI x Jina AI: Dify now Integrates Jina Embedding Model](https://dify.ai/blog/integrating-jina-embeddings-v2-dify-enhancing-rag-applications)