2025 · RAG PIPELINE

Email
Processing

Archive-to-RAG Knowledge System从邮件档案到 RAG 知识系统

I built an operator-facing pipeline that converts overlapping .eml archives into deduplicated Markdown, uses an LLM to extract business facts, and publishes the result into a conversational knowledge base.我构建了一套面向运营人员的处理管线:把高度重复的 .eml 邮件档案转为去重 Markdown,再由 LLM 提取业务事实,最终发布到可对话知识库。

Role角色
Solution design · Product workflow · AI-assisted full-stack delivery方案设计 · 产品流程 · AI 辅助全栈交付
Stack技术栈
Next.js · TypeScript · Python · Flask
Services服务
GPTBots LLM · Knowledge Base API

Architecture boundary架构边界

Use code for certainty. Use the model for judgment.确定性交给代码,语义判断交给模型。

Parsing an email header, detecting repeated content, and tracking whether a file has already entered the knowledge base should not depend on a model. Python handles those rules. The LLM enters only after the archive is reduced, where it extracts products, quotations, project status, dates, decisions, and action items into a consistent schema.解析邮件头、检测重复内容、判断文件是否已进入知识库,都不应依赖模型,因此由 Python 处理。只有在档案完成去重后,LLM 才负责提取产品、报价、项目状态、日期、决策和行动项,并输出统一结构。

01Deterministic parsing and validation确定性解析与校验
02Content containment and hash-based deduplication内容包含关系与哈希去重
03Schema-guided business extractionSchema 引导的业务信息提取