注册并分享邀请链接,可获得视频播放与邀请奖励。

与「tree」相关的搜索结果

tree 贴吧
一个关键词就是一个贴吧,路径全站唯一。
创建贴吧
用户
未找到
包含 tree 的内容
Agent 最缺的不是更大的上下文窗口,而是理解整个代码库的能力:当一个项目有数万文件、跨模块调用和海量文档时,为什么还要让 AI 一遍遍 Grep、Read、重新理解整个工程? 📦 项目档案 项目:Graphify-Labs/graphify GitHub Stars:⭐ 147299 技术栈:Python + Tree-sitter + NetworkX + Leiden 核心定位:将代码、文档、SQL Schema、PDF、图片及音视频转换成可查询、可追溯的知识图谱,让 AI Agent 从「搜索文件」升级为「理解工程关系」。 GitHub: 🛠️ 一、底层架构:不是传统 RAG,而是图结构知识引擎 Graphify 最值得研究的地方,是它没有走传统向量检索路线。 传统 RAG 通常需要经历: 文件切分 → Embedding → 向量入库 → 相似度检索 → 上下文拼接。 Graphify 直接构建 Graph。 底层采用 NetworkX 图数据结构,以 Node 和 Edge 表达工程实体及其关系。 整个处理链路可以概括为: detect() → extract() → build() → cluster() → analyze() → report() → export() 每个阶段职责独立,通过 Python Dict 和 NetworkX Graph 传递数据。 这意味着它不只是索引代码,而是在构建整个项目的结构化关系网络。 🛠️ 二、Tree-sitter AST:让代码解析摆脱 LLM 依赖 这是最有工程价值的设计。 Graphify 使用 Tree-sitter AST 解析约40种编程语言,提取: • Classes:类定义及结构。 • Functions:函数与方法。 • Imports:模块依赖关系。 • Call Graph:跨文件函数调用。 • SQL:表、视图、外键及 JOIN 关系。 其中33种语言使用 Tree-sitter Grammar,另外7种使用内置解析器。 关键在于:代码结构提取完全在本地完成,不需要调用 LLM,也不需要把代码上传到云端。 对于大型代码库,这种确定性解析比单纯依赖模型阅读文件更容易复现和追踪。 🛠️ 三、EXTRACTED / INFERRED:让每条知识关系都有证据 很多知识图谱最大的隐患是:模型推断出来的关系,很容易被误认为真实事实。 Graphify 给关系增加了置信度标签: • EXTRACTED:源码中明确存在的关系,例如 import、函数调用。 • INFERRED:通过上下文、命名和调用关系推断出来的连接。 • AMBIGUOUS:存在不确定性的关系,需要人工复核。 INFERRED 关系还会附带 0.0—1.0 的 confidence_score。 这套机制非常重要。 它实际上把知识图谱从一个简单的关联网络,变成了一个能够区分事实、推断与不确定性的工程知识系统。 🛠️ 四、Leiden + SHA256 Cache:解决规模与重复计算 Graphify 使用 Leiden 社区发现算法,根据节点之间的连接密度,将复杂工程拆分成不同功能子系统。 例如,一个大型后端项目,可以自动识别认证、数据库、路由、权限等不同社区。 同时,SHA256 内容哈希缓存会记录文件指纹。 文件没有变化,就跳过重复提取;只有新增或修改的文件才重新处理。 音视频还可以通过本地 faster-whisper 转录,再进入统一知识图谱。 这让增量更新不必每次重新扫描整个工程。 五、真正解决了什么工程问题? 想象一个场景: 你接手一个陌生的微服务项目,需要搞清楚: 用户认证最终连接了哪些数据库模块? 修改某个核心函数会影响哪些下游组件? 某个架构决策为什么会存在? 两个看似无关的模块究竟有什么隐藏依赖? 传统方式:Grep、Read、跳转、反复询问 Agent,消耗大量上下文。 Graphify:直接执行 query、path、explain。 它还能生成三个核心产物: • graph.json:完整知识图谱,可供后续查询。 • GRAPH_REPORT.md:核心节点、社区及关键关系分析。 • graph.html:可交互的可视化图谱。 甚至支持 Mermaid 调用链导出、Markdown Wiki 和 Obsidian 知识库。 最重要的设计思想是: 不要让 AI 每次都重新阅读整个世界,而是提前把世界组织成它能够理解和遍历的结构。 这才是 AI Coding 从上下文堆砌走向工程知识管理的重要一步。 对于大型 Monorepo、遗留系统维护、跨模块依赖分析,以及需要长期理解代码库的 Agent,这套架构尤其值得研究。 🔗 GitHub 开源地址:
显示更多
0
40
146
20
转发到社区
ทำไมไม่มีคนบอก สโนวไวท์สวยขนาดนี้ FELIZZ AT CHRISTMAS TREE CTW #CTWACelebrationOfWonders2027# #FELIZZ# #ciinthesea#
显示更多
Telegram shipped a "sandbox" for HTML widgets in messages. It's an in-process QuickJS (C) interpreter on a thread... No fork, no isolatedProcess, no seccomp anywhere in the tree, so any QuickJS exploit is enough to gain full control with whatever privileges the Telegram client is running as without the need for any separate sandbox escape The bug is a UaF in the interpreter, from standard JS: ```js class D { [Symbol.dispose]() {} } const d = new D(); let leak; class C { static { for (await using x of [d, d]) leak = () => x; }} // ... run anything ... leak() // reads a freed frame ``` The fix for this particular vuln is still just in the master branch, and considering the number of vulnerabilities QuickJS has had in the past, this vuln will surely not be the last...
显示更多
0
7
177
15
转发到社区
Tesla's Controller-Hardware-In-the-Loop (CHIL) is key to bringing Megapack sites online faster CHIL allows us to simulate the entire site in real time before it’s connected to the grid. We can see how the site will respond to faults, frequency changes or if a tree were to fall on a power line. CHIL validated 444 grid-forming Megapacks at Melbourne Renewable Energy Hub before grid connection, delivering 600 MW / 1.6 GWh of storage months ahead of schedule
显示更多
0
17
1.1K
115
转发到社区
How deep does Nick Saban’s coaching tree go? Keep scrolling. And scrolling. And scrolling ⤵️
0
26
89
9
转发到社区
The croc family tree may be getting a new branch. Analyzing fossilized remains discovered in the same bedrock that built the Great Sphinx, paleontologists newly identified a crocodilian species that once roamed a shallow sea in what’s now Egypt about 45 million years ago.
显示更多
0
18
60
10
转发到社区
Nisi The surveyor had run a white string through the orchard, peg to peg, low enough to step over. She stood on her side of it, her solicitor beside her. On the other side there were only trees. The young man came up between the rows without hurrying, as though the grass already knew his weight. He carried a folded paper, soft at the creases. ‘From him,’ he said. ‘Family?’ asked the solicitor. ‘Near enough.’ The surveyor looked at the sky, then at his watch. The young man did not unfold the paper. ‘The first time I saw you, you were lying in the stubble behind the mill, counting aloud between the lightning and the thunder. Your jumper was on inside out, every seam showing. ‘You reached seven, the sky answered, and you laughed at it as if it had lost a wager. ‘I made a bargain then: if you reached ten on the next flash, I would speak to you. If not, I would never forgive the sky. ‘You reached eleven. ‘Later, in the river, with the water at our knees, you said it into my collar, so the current heard it before I did. ‘For years I lay there like a stone, the whole river going over me. Nothing could move me. ‘Then I grew heavy in another way. I lost the path back to the mill. I counted the dry years. I called the drought by your name. ‘I know you have come to divide the trees. I would rather you did not. ‘So I am going to stop counting.’ The solicitor uncapped his pen and held it out. ‘Where is he?’ she asked. ‘Late,’ said the young man, and went back down between the rows. Beyond the river, the sky split white. The pegs were still in the ground. She asked that they stay a while. Before anyone could answer, she closed her eyes. Her lips moved. One.
显示更多
🚗☁️Traffic and Weather on the 4's... and Poems! Golden Valley Miles | Charlottesville, Virginia☀️ Late-morning traffic leaves Charlottesville along winding roads beneath the Blue Ridge foothills. Farm vehicles, weekend travelers, cyclists, and local cars pass vineyards, horse fields, and old stone walls. Warm sunshine moves across the Piedmont while scattered clouds cast fleeting shadows over the countryside. Dry leaves collect beneath walnut trees, and the breeze carries hay, crushed grape skins, cedar fencing, and distant chimney smoke. Clouds wander over vineyard rows, sunlight follows where it goes. Hay fields shimmer… fences gleam, roads roll softly through the scene...☀️🌄🚦 #PoeticCommute# #grok# #animation# #TrafficAndWeather# #Poetry# #Travel# #art#
显示更多
I know I didn’t make this account for shit like this and I know 99 percent of you do not care. but.. WE NEED TO CARE. We are killing ourselves, we are killing the planet and it’s happening SO fast. I feel like it’s constantly being swept underneath the rug and it breaks my heart. Our forestry is at stake, our wildlife is at stake, WE ARE AT STAKE. please if you are reading this, please have a open mind to fight for our world, for the things that make life.. life. Our animals, our trees. You can come on here and call me crazy, or whatever. I do not care. Just please try to open your heart to caring. I am begging.
显示更多
0
4
57
11
转发到社区