Files
nexus/wiki/concepts/Content-Ingestion.md
2026-04-23 00:02:55 +08:00

43 lines
1.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "Content Ingestion"
type: concept
last_updated: 2026-04-22
---
## Definition
内容摄取Content Ingestion将外部内容网页、PDF、YouTube 字幕、推文等通过自动化解析提取为结构化文本并分块Chunking入库供检索系统使用的过程。是 [[Knowledge-Base-RAG]] 工作流的第一步——没有高质量的内容摄取,就没有可搜索的知识库。
## Ingestion Pipeline
```
URL 输入 → 内容获取 → 格式解析 → 文本清洗 → 分块Chunking→ Embedding → 向量入库
```
## Supported Content Types
| 类型 | 解析方式 | 挑战 |
|------|----------|------|
| 网页 | HTML 解析 / Firecrawl / Jina Reader | 广告/导航移除、JS 渲染内容 |
| PDF | marker / pdfminer / PyMuPDF | 表格、多栏布局、扫描件 OCR |
| YouTube | Transcript API / Whisper | 自动字幕质量、噪音处理 |
| 推文/Tweet | Twitter API / 第三方抓取 | 字符限制、线程重组 |
| Slack 消息 | Slack API | 富文本格式、附件分离 |
## Chunking Strategies
详见 [[Knowledge-Base-RAG]] 概念页。
## Why It Matters
Garbage in, garbage out——即使 Embedding 模型再强大如果摄取内容充满噪音广告、HTML 标签、格式乱码),检索质量也会大幅下降。好的摄取 pipeline 需要:
1. 内容纯净(去广告/去导航/去脚注)
2. 格式保留(标题层级、列表结构有助于理解)
3. 元数据保留URL、标题、日期、来源类型
## Connections
- [[Knowledge-Base-RAG]] — Content Ingestion 是 RAG 工作流的第一个环节
- [[Semantic-Search]] — 摄入的内容最终通过语义搜索被检索
- [[web_fetch]] — 内容获取的工具技能