如何对视频进行 Grep 检索 ✍ Amy Xiao🕐 2026-04-24📦 11.1 KB 🟢 已读 𝕏 文章列表 文章探讨了如何让 LLM 理解和处理海量视频数据。作者指出单纯依赖上下文窗口并非最佳方案,因为成本高昂且无法进行确定性检索。借鉴编程中的 Unix 模式,文章提出构建“中间表示层”,提前提取并结构化对齐转录、视觉、情感等多模态数据,从而实现对视频内容类似 Grep 的高效搜索与组合分析。 多模态视频分析Agent设计模式RAG数据结构上下文工程非结构化数据 # How to grep video **作者**: Amy Xiao **日期**: 2026-04-23T16:04:17.000Z **来源**: [https://x.com/amyxst/status/2047345827128164860](https://x.com/amyxst/status/2047345827128164860) ---  Notes on context engineering and agent harnesses for video libraries: designing the structured representations to make media legible to LLMs. Authored with @kdrwins Since we started joining meetings from our computers, video has become the default way that organizations capture what happens at work. We’re at the point now where recording things has become so easy that we’ve created a new problem: we have more videos than we can ever watch. Part of the reason LLMs were so transformative was because they gave us a way to synthesize text right when we were drowning in documents. Now we’re at that same point with video and audio, but the synthesis layer hasn’t arrived yet. If you work with AI agents for coding, you may have noticed that the good ones are beginning to converge on the Unix design pattern. Read files → grep for patterns → edit in place → use the shell as your orchestrator. Each tool does one thing and does it well. Claude Code does this. LlamaIndex is building on it. The pattern is powerful because text has a useful property: text is its own searchable representation. A Python file is simultaneously the program being run and the document being searched. A markdown file is simultaneously the content and the index. This property has shaped much of the current thinking around agent design: context windows, tool use, and file-based memory assume that all the material an agent needs can be read and searched in its native form. To be fair, this is true for a lot of the information we work with everyday, like code, logs, config files, and documents. But it’s not true for video, images, or similar non-textual data. An MP4 is a binary container of compressed frames and audio packets. There is no grep that finds a concept inside it. So if filesystem idioms don’t translate to video, what replaces them? ## The context window isn't the answer Context windows are getting huge. Gemini now offers a 1M token context window that accepts video natively. It seems plausible that, with a big enough context window, you’d be able to work with video the same way you work with text. But when you try, you bump up against some limitations pretty quickly. Gemini tokenizes video at roughly 300 tokens per second at high resolution, or about 100 at low resolution. A 1M token window fits a small batch of short clips (Gemini caps requests at 10 videos) or a single meeting recording. That's useful for one-off tasks working with individual recordings. But it's not a general solution for working across a library. Imagine your sales team did 120 calls last quarter, each about 35 minutes long. That's roughly 70 hours of footage, so somewhere around 25 million tokens at low-res tokenization. Twenty-five times more than fits in a single context window. The query a sales leader actually wants to run looks something like: “Across all 120 Q3 calls, find every moment where the prospect pushed back on pricing. For each, return the call ID, what the prospect said, the timestamp, who was on the call, and how the rep responded.” You can't fit the data in to ask the question. Suppose you could fit a whole video library, though. You’d still have two problems: - You can't search inside a context window. You can only prompt over it, which is not quite the same thing. "Find every mention of pricing across these 20 recordings" is a retrieval problem. You want, targeted results over a known dataset. What you get instead is a best guess re-derived from frames on every run, with no guarantee the next run will agree with the last. That's not good enough when completeness matters. - The economics are strange. If the answer to "who was the speaker at 14:32?" lives in a 30-second segment, the structured representation that captures the speaker's name and timestamp might be 100 tokens. Without that structured representation you'd send 50,000 tokens of video context to answer the same question (500× the cost). Understanding the video is still a model call (a one-time index doesn't make it deterministic) but you pay that cost up front at extraction time instead of on every query that comes in afterward. The probabilistic cost and the token cost only get paid once and stay paid. Context windows will keep growing. But unless the economics radically change, you’ll need to structure and index videos ahead of time to know where to look and avoid starting from scratch every time. ## Every video is many videos When we extract data from video today, we typically just pull the transcript, which does give us a lot to work with. But when you introduce the possibility of querying all types of data within a video, a 30-minute recording turns out to be deceptively dense with information: - Ask for a meeting summary and you get speaker timelines, discussion topics, action items, key decisions. Normal stuff. - But ask for sales coaching from the exact same recording and you get something entirely different: talk-to-listen ratios, filler word frequency, how objections were handled, energy and pace through the call. - Ask for customer sentiment and you’ll get new information again: an analysis of tone shifts when the conversation turned to pricing, facial expressions during the demo, and the beat of silence before an answer. The signs that actually tell you whether a deal is alive usually don't make it into the transcript. Same video. Same binary blob on disk. Completely different knowledge, determined entirely by what you asked for. Underneath any of these questions, the same baseline gets cached once per segment: Prompt-specific extractions layer on top. Earlier in the same call, here's what a coaching query adds: And here's what a sentiment query adds for the segment we started with: The transcript said the prospect agreed. The prosody and facial data disagree. No single modality catches this on its own; aligned on a shared timeline, they do. The original sales-leader query becomes a trivial filter over the coaching schema, joined to the sentiment schema. No need to rewatch or re-prompt the raw video. In video, there's the speech transcript, obviously, but also speaker identity, visual scene descriptions like on-screen text, slides and product walkthroughs, entity references, chapter boundaries, laughter, cross-talk, camera shot boundaries, tone shifts, and more. Each of these is a different representation of the same source material. None of them is "the" representation. All of them are lossy. And all of them are useful, for different tasks and at different times. The job then becomes deciding which projections to compute, how to align them temporally, and how to make the results composable and searchable. This is context engineering for video libraries: designing structured intermediate representations that make opaque media legible to an LLM. We studied this question in our research on aligned video captions: time-aligned compact representations that combine signals across modalities (speech, visual, textual) consistently outperform both single-modality approaches and context window stuffing, across 1.8 million clips. The representation layer is what gives an agent something like grep-level access to video. It does this by creating the searchable object that the original format never was. ## Making grep work for video To create a grep-like pattern for video, you need to run the process in reverse.  For text, you search first and read second. grep finds the line and cat shows the file. For video, the searchable form doesn't exist yet. So you go the other direction: describe first, cache the result, then search. This means a video agent needs three tiers of lookup: - Local keyword search over cached enrichments. Instant and free. This is the equivalent of grep over a file you've already written. Against the Q3 collection, a query like objections.topic = "pricing" returns every relevant moment across all 120 calls, with citations. - Semantic search across an indexed collection. A question like "find moments where the prospect hesitated before answering" can't be answered by keyword matching. It needs embeddings that map a text query to the relevant spans of time across your enriched representations, matching on meaning rather than words. - Full re-analysis: Send the video back through the enrichment pipeline. Expensive, and a last resort for when existing cached representations don't contain what you need. The enrichment cache is the key primitive. It needs prompt-aware keys. The same video processed with different extraction schemas produces different cache entries that coexist. And it needs multiple output fidelities: a compact representation (~1–4KB per video) for routing and quick lookups, and a full structured output (50K+ tokens) for deep analysis. This architecture also gets cheaper over time. Each interaction enriches the cache, which makes the next query faster and less expensive. It solves the inefficiency problem of the context window approach, where every question starts from scratch, with the full cost of the raw media. ## The other 90% of our information Translating every type of information encoded in a video into structured data LLMs can understand opens up a class of work transcripts can’t support. Pulling the transcripts from a sales call helps an account executive review the topics and action items they covered with a prospect. But with video context engineering, a sales leader working with the same Q3 collection could analyze a quarter’s worth of calls and generate a coaching plan for their team. They could query for and extract talk-to-listen ratios, filler-word frequency, objections and their responses, energy levels, pricing negotiations, and phrases that progressed deals. This is just one example. As with LLMs, I think we’ll discover hundreds more as we get accustomed to doing work across huge libraries of video. We’re building in this space at Cloudglue now. I’ll share more soon on what video context engineering makes possible. If you want to read this on the Cloudglue blog, and to follow for more technical pieces from our team: https://blog.cloudglue.dev/how-to-grep-video/ ## 相关链接 - [Amy Xiao](https://x.com/amyxst) - [@amyxst](https://x.com/amyxst) - [6.2K](https://x.com/amyxst/status/2047345827128164860/analytics) - [@kdrwins](https://x.com/@kdrwins) - [is building on it](https://www.llamaindex.ai/blog/files-are-all-you-need) - [in our research on aligned video captions](https://dl.acm.org/doi/10.1145/3701716.3716890) - [Cloudglue](https://cloudglue.dev/) - [https://blog.cloudglue.dev/how-to-grep-video/](https://blog.cloudglue.dev/how-to-grep-video/) - [Upgrade to Premium](https://x.com/i/premium_sign_up) - [12:04 AM · Apr 24, 2026](https://x.com/amyxst/status/2047345827128164860) - [6,275 Views](https://x.com/amyxst/status/2047345827128164860/analytics) --- *导出时间: 2026/4/24 17:52:11*
小 小白如何从0到1搭建自己的AI知识库 本文介绍了如何从零开始搭建个人AI知识库。作者提出了一套包含文本文件、Agent工具、规则和真实任务的工作方式,并详细说明了准备四样要素(开放文件夹、真实任务、Agent工具、工作规则)和五个具体步骤的方法,帮助用户通过简单的流程实现知识的积累与迭代。 技术 › 工具与效率 ✍ 金尘马🕐 2026-07-30 AI知识库AgentWorkBuddyCodexMarkdown提示词个人管理RAG生产力
做 做完一次总体设计后,我重新理解了企业级知识库 文章基于企业级智能知识库项目的实践,探讨了企业知识库的真正门槛。指出其不仅是文档存储,更是一套涵盖构建、治理、使用和优化的闭环运行机制。重点分析了知识库与知识空间的区别、知识生命周期管理、可信溯源及权限控制,强调知识库应作为支撑未来 Agent 的企业级 AI 知识引擎。 技术 › LLM ✍ 土猛的员外🕐 2026-07-29 企业知识库RAGAgent知识工程架构设计
提 提升 Agent 的信息搜索能力:Serper 与豆包搜索对比评测 文章对比了 Serper(Google 封装)与豆包搜索在 Agent 应用中的表现。豆包在 Query 改写、结构化数据(汇率/股价)、跨语言检索、时效性过滤及信源权威度分级上优势明显,更适合处理中文口语化及实时信息需求;而 Google 在英文学术检索上仍占优。文章指出高质量搜索 API 对提升 Agent 推理能力至关重要。 技术 › Agent ✍ Orange AI🕐 2026-07-28 Agent信息搜索豆包搜索SerperAPI评测RAG大模型
C Claude 5 模型上下文工程新规则 文章探讨了针对 Claude 5 模型的上下文工程新规则,指出新一代模型能力提升,允许大幅简化系统提示。主要变化包括:用模型判断替代硬性规则、用接口设计替代示例、采用渐进式披露、简化工具描述、使用自动记忆以及支持丰富引用。 技术 › Claude ✍ Thariq🕐 2026-07-25 Claude 5上下文工程提示工程系统提示Claude CodeAgent最佳实践模型优化技能设计工具描述
2 2026年如何成为AI工程师(无需CS学位) 文章指出2026年AI工程师角色已分化为机器学习工程师和应用AI工程师。对于非CS学位求职者,后者是主要机会。文章详细列出了必备技能(Python、LLM行为、RAG系统、评估观测),并提出了三个能替代学历证明的实战项目建议。 技术 › LLM ✍ Harman🕐 2026-07-24 AI工程师职业发展RAGLLMAgentPrompt无学位
W What Comes After the Prompt 文章探讨了超越传统提示词的多模态交互技术,提出“任务”概念,通过结合语音、屏幕、文本等多种信息源,让代理更高效地完成复杂工作。该方法减少交互循环,提升并行工作能力,并通过存储执行痕迹逐步转化为可重用的技能,为未来全模型交互奠定基础。 技术 › Agent ✍ elvis🕐 2026-07-23 多模态Agent提示工程交互设计自动化LLM技能复用语音交互工作流
A Agent Wikis 的现状与发展 文章探讨了 LLM Wiki 模式的兴起,即通过在摄取时编译知识而非查询时检索,解决传统 RAG 无法积累知识的问题。介绍了 Cognition、FactoryAI、LangChain 等团队构建的 Agent Wiki 系统,分析了其架构原理及在维护成本上的优势。 技术 › Agent ✍ mem0🕐 2026-07-22 LLMAgentWikiRAGCognitionLangChainDeepWikiAutoWiki
聊 聊聊我对 Kimi K3 的体感 作者分享了使用 Kimi K3 模型的实际体验,通过 3D 坦克大战游戏、权力游戏地图动画和教学视频制作三个案例,展示了其在多模态和复杂任务处理上的强大能力。文章指出 K3 提供了 Claude 和 Codex 之外的优质选择,且具备合规性优势,但同时也面临算力短缺的局限。 技术 › LLM ✍ Wang Shuyi🕐 2026-07-21 Kimi K3多模态代码生成测评Agent教学应用大模型AI工具
网 网页爬虫迎来重大升级:PixelRAG 实现基于视觉的网页检索 PixelRAG 是一种开源的视觉化网页检索技术,通过直接截图并使用视觉模型分析像素,而非依赖 HTML 解析,从而避免信息丢失。它构建了 3000 万维基百科截图的视觉索引,在问答任务上超越传统文本 RAG 基准 18.1%,并支持 Claude 代码插件。 技术 › LLM ✍ 半吊子程序猿大铭🕐 2026-07-19 PixelRAG网页爬虫视觉检索RAGClaude开源多模态Qwen3-VL
写 写作即编排——当方法论指向自己 本文是“AI时代的知识编排”系列收官之作。作者回顾了利用AI与结构化知识库高效产出技术博客的实践,发现写作过程本身遵循着“文档驱动”(SDD)的逻辑。文章通过信息论、认知科学及实证数据论证了结构化输入的重要性,并指出知识编排已成为AI时代内容生产的生存必需,强调了核查与人工判断不可替代。 技术 › AI ✍ SagaSu🕐 2026-07-16 AI知识编排写作方法论SDDRAG结构化输入信息核查AgentLLM
H How to Become an LLM Engineer 本文是2026年成为LLM工程师的实用指南,涵盖核心技能(RAG、Agents、生产部署)、学习路线、推荐工具及项目构建建议,帮助读者系统掌握大模型应用开发与工程化能力。 技术 › LLM ✍ Swati Gupta🕐 2026-07-16 LLM工程师RAGAgent学习路线项目实战LangChainPython职业发展AI技能
深 深入理解 AI Agent:设计原理与工程实践 李博杰新书《深入理解 AI Agent:设计原理与工程实践》开源,涵盖从0到1构建生产级AI Agent的原理与代码,包括RAG、工具调用、多Agent协作等实战内容。 技术 › Agent ✍ 李博杰🕐 2026-07-15 AI Agent开源LLMRAG工具调用多模态编程工程实践生产级代码