Deepseek V4 Flash Vision Rag logo

Deepseek V4 Flash Vision Rag

Community
liangdabiao
deepseek-v4-flash-vision-rag

基于DeepSeek视觉大模型(deepseek-v4-flash-vision-exp)的PDF深度问答与检索(vision RAG)。当用户提到 PDF、文档、资料、报告、论文、电子书、手册、说明书,并想提问、查找、搜索、总结或理解其内容,或问"在哪一页"、"引用原文"、要页面截图时,使用本skill。支持扫描版、图表、表格、代码的视觉理解;回答带物理页码引用,并把命中页原图展示给用户。

Overview

Publisherliangdabiao
Repositorydeepseek-v4-flash-vision-rag
Skill namedeepseek-v4-flash-vision-rag
Stars
74
Forks
13
Bundled files
12
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 12 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by liangdabiao on GitHub. Read the source before you install it.

Installation

Install the Deepseek V4 Flash Vision Rag AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/liangdabiao/deepseek-v4-flash-vision-rag/tree/main
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/liangdabiao/deepseek-v4-flash-vision-rag.git \
  .claude/skills/deepseek-v4-flash-vision-rag
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Deepseek V4 Flash Vision Rag in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Deepseek V4 Flash Vision Rag on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Deepseek V4 Flash Vision Rag is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

DeepSeek V4-Flash Vision RAG

用 DeepSeek 视觉大模型"看懂"整份 PDF:先为每页建立视觉索引(一次性、缓存复用), 再对用户问题做 本地粗筛 → 视觉精排 → 深读回答,回答带 [第N页] 引用, 并把命中页图片展示给用户。

相比逐段文本 RAG,它直接看页面图像,因此能理解排版、图表、表格、代码块, 扫描版也能用;页码来自渲染本身,天然精确。

环境

  • Python 依赖:openai、pymupdf(fitz)(本机已装;缺了先 pip install)
  • API key:默认已内置;可用环境变量 DEEPSEEK_API_KEY 覆盖
  • 所有脚本在 scripts/ 下,Windows 下可直接 python scripts/xxx.py

工作流

第 1 步:建立索引(每份 PDF 一次,之后走缓存)

bash
python scripts/ingest.py "<pdf路径>"
  • 渲染每页 → Files API 上传 → 分批视觉分析 → 落盘 scripts/.cache/<sha>/index.json
  • 120 页约 3–5 分钟、5 次模型调用;重复运行直接命中缓存
  • 常用参数:--force 重建索引;--limit N 只索引前 N 页(大文档先试水); --clean 删本地缓存
  • 输出会打印页型分布(正文/目录/附录…)和大纲条数,可据此向用户简报文档结构

第 2 步:回答用户问题

bash
python scripts/ask.py "<pdf路径>" "用户的问题"
  • 流程:本地 TF-IDF 粗筛 top12 → 视觉精排选 top4(1 次调用)→ 命中页±1 深读 (1 次调用,开推理)→ 输出带 [第N页] 引用的答案
  • 可调:--top K 深读页数;--cands N 粗筛候选数;--no-images 不复制图片

脚本 stdout 分四段:=== 答案 ===、=== 引用页 ===、=== 页面图片 ===(图片 已复制到 ./pdf-vision-out/<书名>_p<N>.png)。

第 3 步:向用户展示页面原图(必须做)

终端里用户未必能看到 inline 图片,所以必须给出用户自己能打开的路径,按优先级:

  1. HTML 预览(首选):ask.py 自动在 ./pdf-vision-out/ 生成 <书名>_<问题>.html ——自包含单文件(答案 + 全部引用页原图 base64 内嵌),把路径告诉用户, 双击即可在浏览器查看,无需联网。Windows 下也可代用户执行 start "<路径>" 打开。
  2. 单页 PNG 路径:./pdf-vision-out/<书名>_p<N>.png,用户只要某几页时逐张给出。
  3. 支持 inline 图片的环境(如 ZCode)可再用 Read 工具读取 PNG,把图渲染进对话作为 补充;但不得只依赖这种方式——Read 的图用户端可能不显示。

用户想直接看某几页时:

bash
python scripts/show.py "<pdf路径>" --pages 6,7 [--dpi 220]

然后把输出的 PNG 路径给用户(同样可 start 打开)。

回答规范

  • 以脚本产出的答案为事实基础,组织成简洁中文回答;保留 [第N页] 引用标记
  • 答案与引用页不符、或脚本说明"内容不足"时,如实告诉用户,不要编造
  • 展示原图时必须提供用户可自行打开的本地路径(HTML 预览或 PNG),不能只靠 inline 展示
  • 可以顺带告诉用户引用页码,方便他翻原 PDF 对照

注意事项

  • 首次 ingest 慢(分钟级)是正常的;告知用户后续提问秒级响应
  • --limit 建过的索引是部分的,之后不带 --limit 重跑会自动补全
  • API 细节(推理开关、384 token/图、Files API 限制等坑)见 references/api-notes.md,改 scripts/ds_client.py 前必读
  • 索引/缓存结构见 references/index-schema.md

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Deepseek V4 Flash Vision Rag AI skill do?

基于DeepSeek视觉大模型(deepseek-v4-flash-vision-exp)的PDF深度问答与检索(vision RAG)。当用户提到 PDF、文档、资料、报告、论文、电子书、手册、说明书,并想提问、查找、搜索、总结或理解其内容,或问"在哪一页"、"引用原文"、要页面截图时,使用本skill。支持扫描版、图表、表格、代码的视觉理解;回答带物理页码引用,并把命中页原图展示给用户。

Why use Deepseek V4 Flash Vision Rag on TypingMind?

Because you install it once and use it with any model. Deepseek V4 Flash Vision Rag is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Deepseek V4 Flash Vision Rag in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/liangdabiao/deepseek-v4-flash-vision-rag/tree/main. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Deepseek V4 Flash Vision Rag?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Deepseek V4 Flash Vision Rag?

As many as you like. As long as a model supports skills, you can use Deepseek V4 Flash Vision Rag with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Deepseek V4 Flash Vision Rag AI skill free?

It is published on GitHub by liangdabiao. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇