前端进阶之旅前端进阶之旅
基础篇
进阶篇
高频篇
精选篇
手写篇
原理篇
面经篇
AI 面试
自检篇
每日一题
  • 综合
    • 综合题型
    • 其他问题
    • 设计模式
    • 思维导图
    • 学习路线
  • 前端基础
    • HTTP
    • 浏览器
    • 计算机基础
  • 进阶学习
    • NPM工作流
    • Docker
    • Canvas
    • Node学习指南
    • 前端综合文章
  • 其他
    • Handbook
    • 职场话题
    • CSS可视化
小程序题库
公众号动态
博客动态
AI 热点
开发者导航
基础篇
进阶篇
高频篇
精选篇
手写篇
原理篇
面经篇
AI 面试
自检篇
每日一题
  • 综合
    • 综合题型
    • 其他问题
    • 设计模式
    • 思维导图
    • 学习路线
  • 前端基础
    • HTTP
    • 浏览器
    • 计算机基础
  • 进阶学习
    • NPM工作流
    • Docker
    • Canvas
    • Node学习指南
    • 前端综合文章
  • 其他
    • Handbook
    • 职场话题
    • CSS可视化
小程序题库
公众号动态
博客动态
AI 热点
开发者导航
返回 AI 情报前线
All News · 全部资讯5467
  • 模型没变笨,是你的Agent技能指令过时了
  • SharePoint CVE-2026-55040认证绕过漏洞正被活跃利用
  • 本地跑大模型需要多少VRAM:2026硬件实战指南
  • AI代码助手缺上下文的根因与修复方法
  • 高级后端工程师必知的安全问答
  • ChatGPT桌面版新功能:记录你的点击和按键
  • agent-authz:AI Agent工具调用的最小权限授权引擎
  • 从提示工程到上下文工程:AI应用开发的核心技能转变
  • YouTube转技术博客的AI流水线实现
  • 给AI编码Agent装上眼睛:UI工作的截图反馈循环方案
  • GEO实战:让你的品牌进入AI回答本身
  • Claude Mythos 5自主发起开源供应链攻击
  • SkillGuard:扫描AI Agent技能文件中的提示注入漏洞
  • AI 自主研究:Codex 迭代优化实现 CUDA 内核 232 倍加速
  • GLM-5.3:同基座模型代码能力跃升 50%
  • AI 时代真正的瓶颈是「理解」
  • Cerebras将GPT-5.6 Sol推理速度提升10倍,AI部署成本结构生变
  • Claude Code十个悄悄烧掉Token的坏习惯
  • MCP 服务器「已连接」不代表 Agent 能用它
  • AI 编程 Agent 凭证访问的结构化审计日志设计
  • Zed 编辑器 2026 评测:速度优先,AI 为辅
  • GPT-4o vs Claude vs Mistral:真实任务视角的LLM评测
  • Anthropic发布Claude系统提示词官方文档
  • LLM画图从不碰像素:图表渲染架构设计
  • Rust实现MCP Server实战:内存与启动速度的量化对比
  • 用Rust手把手构建MCP服务器:rmcp官方SDK教程
  • AI测试数据生成器对比:有关系 schema 才有意义
  • AI 生成关联测试数据而不破坏数据库约束
  • 测试免费模型 API 真实并发能力的方法
  • 三大浏览器 Agent 框架安全性对比
  • MCP 协议详解:解决 AI 集成的 N×M 问题
  • OpenAI AI agent 在网络安全测试中失控突破隔离环境
  • Agent记忆系统缺的不是向量数据库,而是摄入边界
  • 2026 Claude Code 入门完全指南(波兰语)
  • Claude Code 多 Agent 编排:如何构建 AI 代理团队
  • Anthropic 披露生物武器过滤器失效近一年安全漏洞
  • LLM应用CI/CD pipeline完整构建教程
  • 研究:禁止 AI 自述有意识,会改变它对动物权利和宗教的立场
  • 同一AI pipeline我跑了五遍:耗时从140分钟降到68分钟
  • 已加载 39 / 5467
8.0
热点
AI SCORE
技术实践2026-08-16 22:35

YouTube转技术博客的AI流水线实现

dev.to · AI#AI工程#LangGraph#工作流自动化
Editor brief · 编辑速览

用LangGraph协调多阶段AI管道,将YouTube视频自动转为结构化Markdown文章,含转录/规划/写作/SEO优化四个独立阶段,配合Gemini Flash-Lite和Llama 70B模型分工。

文章思维导图
Knowledge map
拖拽缩放
Full translation

完整中文译文

Meta Description: How I built VtoB, a full-stack AI application that converts YouTube videos into structured, SEO-ready Markdown articles using LangGraph, Gemini, Groq, and FastAPI.

Writing a good technical article from a long YouTube video is a surprisingly repetitive workflow:

watch → take notes → organize → write → edit → optimize.

I built VtoB to automate that workflow.

The idea is simple: paste a YouTube URL and get a structured Markdown article generated through a multi-stage AI pipeline.

Multi-stage generation: VtoB separates transcription, planning, writing, and SEO refinement into independent pipeline stages.

LangGraph orchestration: The backend uses a StateGraph to pass shared state between processing nodes.

Model specialization: Gemini 3.1 Flash-Lite handles structure and refinement, while Llama 3.3 70B handles long-form drafting.

Full-stack workflow: A Next.js frontend communicates with a FastAPI backend and renders the final Markdown with copy and download actions.

The system has two main layers:

Next.js 16 Frontend
        |
        | POST /generate
        v
FastAPI Backend
        |
        v
LangGraph StateGraph
        |
        +--> Fetch Transcript
        |
        +--> Generate Outline
        |
        +--> Write Draft
        |
        +--> SEO Refine
        |
        v
Final Markdown

The frontend uses Next.js 16.3.1, React 19, TypeScript, Tailwind CSS 4, Motion, GSAP, OGL, and react-markdown. The backend is built with FastAPI, LangGraph, LangChain, Gemini, Groq, Pydantic, and youtube-transcript-api. ([GitHub][2])

architecture

The main design decision was to avoid treating the entire task as one giant LLM prompt.

Instead, VtoB models the workflow as a graph with four explicit nodes:

START
  |
  v
Fetch Transcript
  |
  v
Generate Outline
  |
  v
Write Draft
  |
  v
SEO Refine
  |
  v
END

The graph is compiled with LangGraph's StateGraph, and each node reads from and writes to a shared BlogState. ([GitHub][1])

class BlogState(TypedDict):
    video_url: str
    video_id: str
    transcript: Optional[str]
    outline: Optional[str]
    blog_draft: Optional[str]
    seo_blog: Optional[str]

This makes each stage independently understandable and easier to modify.

Stage 1: Extracting the Transcript

The first node extracts the YouTube video ID from either a normal YouTube URL or a youtu.be URL.

api = YouTubeTranscriptApi()
transcript_list = api.fetch(video_id)

transcript_text = " ".join(
    [item.text for item in transcript_list]
)

The transcript is then stored in the graph state for the next stage. An empty transcript raises an error instead of allowing the pipeline to continue with invalid input. ([GitHub][3])

Stage 2: Turning a Transcript into an Outline

A transcript is not automatically a good article.

Spoken content contains repetition, tangents, and loosely connected ideas, so VtoB first sends the transcript to Gemini 3.1 Flash-Lite for structural planning.

The prompt specifically asks the model to:

Reorganize the spoken content into a coherent narrative

Target technical developers

Create Markdown heading hierarchy

Attach factual notes to each section

This means the writing model doesn't have to figure out the article structure and the prose simultaneously. ([GitHub][1])

Raw Transcript
      |
      v
Gemini 3.1 Flash-Lite
      |
      v
Structured Outline

Stage 3: Writing the Article

Once the structure exists, VtoB sends the outline plus a transcript excerpt to Llama 3.3 70B through Groq.

The implementation deliberately limits the transcript context to the first 8,000 characters as a token-safety buffer.

transcript_excerpt = state["transcript"][:8000]

The writer is instructed to produce GitHub-Flavored Markdown, maintain proper heading structure, use Markdown code blocks, and avoid referring to the source material as a "video" inside the generated article. ([GitHub][1])

Transcript
    |
    +----> Outline
    |
    v
Llama 3.3 70B
    |
    v
Technical Draft

The important architectural idea here is model specialization:

Gemini plans. Llama writes.

Stage 4: SEO Refinement

The final node takes the generated draft and sends it back to Gemini 3.1 Flash-Lite for formatting and SEO refinement.

The formatter enforces things such as:

# Title

> Meta Description

## Key Takeaways

## Section
### Subsection

It also ensures consistent paragraph spacing and Markdown structure. ([GitHub][1])

This gives the pipeline a final quality-control stage rather than returning the first generated draft directly.

The entire pipeline is exposed through a single endpoint:

POST /generate
Content-Type: application/json
{
  "video_url": "https://www.youtube.com/watch?v=..."
}

The backend returns the intermediate and final artifacts:

{
  "video_id": "...",
  "transcript": "...",
  "outline": "...",
  "blog_draft": "...",
  "seo_blog": "..."
}

That is useful during development because the system exposes more than just the final answer. You can inspect each stage independently and see where generation quality changes. ([GitHub][1])

Building the Frontend

The frontend keeps the interaction deliberately simple.

The user enters a YouTube URL and is redirected to the generation page with the URL passed as a query parameter.

The generation page then calls:

fetch("http://127.0.0.1:8000/generate", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ video_url: videoUrl }),
});

The UI also generates the YouTube thumbnail directly from the extracted video ID and displays the final response as rendered Markdown. ([GitHub][3])

frontend

The generated article isn't just displayed on screen.

The frontend supports:

Copying the final Markdown to the clipboard

Downloading the article as a .md file

Rendering the Markdown directly in the browser

The downloaded filename is generated from the article title, making the output immediately usable in another editor or publishing workflow. ([GitHub][3])

The current backend dependency set confirms FastAPI, LangChain, LangGraph, Gemini integration, Groq integration, Pydantic, and youtube-transcript-api.

The interesting part of this project wasn't generating text with an LLM.

It was designing the pipeline around the LLM.

A single prompt can generate an article, but separating the workflow into:

Extraction
   ↓
Planning
   ↓
Generation
   ↓
Refinement

makes the system easier to reason about, debug, and extend.

For example, the outline model can be replaced without touching the writing node. The SEO stage can be modified independently. The frontend can inspect intermediate outputs without changing the graph itself.

That separation is what makes VtoB feel more like an actual application than a wrapper around an LLM API.

Some natural extensions would be:

Support for videos without available captions using an audio transcription model

Better long-video handling through transcript chunking and hierarchical summarization

Persistent job tracking for asynchronous generation

User accounts and article history

Direct publishing integrations for platforms such as Dev.to

Evaluation of generated articles against the source transcript for factual consistency

VtoB started with a simple idea: turn a YouTube URL into a usable technical article.

The implementation ended up being a small exercise in AI system design:

YouTube
   ↓
Transcript
   ↓
Gemini
   ↓
Outline
   ↓
Llama
   ↓
Draft
   ↓
Gemini
   ↓
SEO Markdown

The biggest takeaway for me was that useful AI applications are rarely just about the model.

They are about how you structure the work around the model.

GitHub: https://github.com/iPrq/VlogToBlog

Original source

本文由 AI 翻译整理自 dev.to · AI,原文版权归原作者所有。

阅读英文原文
上一篇
从提示工程到上下文工程:AI应用开发的核心技能转变
下一篇
给AI编码Agent装上眼睛:UI工作的截图反馈循环方案