[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-TheAiSingularity--graphrag-local-ollama":3,"tool-TheAiSingularity--graphrag-local-ollama":61},[4,18,26,36,44,53],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":17},4358,"openclaw","openclaw\u002Fopenclaw","OpenClaw 是一款专为个人打造的本地化 AI 助手，旨在让你在自己的设备上拥有完全可控的智能伙伴。它打破了传统 AI 助手局限于特定网页或应用的束缚，能够直接接入你日常使用的各类通讯渠道，包括微信、WhatsApp、Telegram、Discord、iMessage 等数十种平台。无论你在哪个聊天软件中发送消息，OpenClaw 都能即时响应，甚至支持在 macOS、iOS 和 Android 设备上进行语音交互，并提供实时的画布渲染功能供你操控。\n\n这款工具主要解决了用户对数据隐私、响应速度以及“始终在线”体验的需求。通过将 AI 部署在本地，用户无需依赖云端服务即可享受快速、私密的智能辅助，真正实现了“你的数据，你做主”。其独特的技术亮点在于强大的网关架构，将控制平面与核心助手分离，确保跨平台通信的流畅性与扩展性。\n\nOpenClaw 非常适合希望构建个性化工作流的技术爱好者、开发者，以及注重隐私保护且不愿被单一生态绑定的普通用户。只要具备基础的终端操作能力（支持 macOS、Linux 及 Windows WSL2），即可通过简单的命令行引导完成部署。如果你渴望拥有一个懂你",349277,3,"2026-04-06T06:32:30",[13,14,15,16],"Agent","开发框架","图像","数据工具","ready",{"id":19,"name":20,"github_repo":21,"description_zh":22,"stars":23,"difficulty_score":10,"last_commit_at":24,"category_tags":25,"status":17},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,"2026-04-05T11:01:52",[14,15,13],{"id":27,"name":28,"github_repo":29,"description_zh":30,"stars":31,"difficulty_score":32,"last_commit_at":33,"category_tags":34,"status":17},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",151918,2,"2026-04-12T11:33:05",[14,13,35],"语言模型",{"id":37,"name":38,"github_repo":39,"description_zh":40,"stars":41,"difficulty_score":32,"last_commit_at":42,"category_tags":43,"status":17},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",108322,"2026-04-10T11:39:34",[14,15,13],{"id":45,"name":46,"github_repo":47,"description_zh":48,"stars":49,"difficulty_score":32,"last_commit_at":50,"category_tags":51,"status":17},6121,"gemini-cli","google-gemini\u002Fgemini-cli","gemini-cli 是一款由谷歌推出的开源 AI 命令行工具，它将强大的 Gemini 大模型能力直接集成到用户的终端环境中。对于习惯在命令行工作的开发者而言，它提供了一条从输入提示词到获取模型响应的最短路径，无需切换窗口即可享受智能辅助。\n\n这款工具主要解决了开发过程中频繁上下文切换的痛点，让用户能在熟悉的终端界面内直接完成代码理解、生成、调试以及自动化运维任务。无论是查询大型代码库、根据草图生成应用，还是执行复杂的 Git 操作，gemini-cli 都能通过自然语言指令高效处理。\n\n它特别适合广大软件工程师、DevOps 人员及技术研究人员使用。其核心亮点包括支持高达 100 万 token 的超长上下文窗口，具备出色的逻辑推理能力；内置 Google 搜索、文件操作及 Shell 命令执行等实用工具；更独特的是，它支持 MCP（模型上下文协议），允许用户灵活扩展自定义集成，连接如图像生成等外部能力。此外，个人谷歌账号即可享受免费的额度支持，且项目基于 Apache 2.0 协议完全开源，是提升终端工作效率的理想助手。",100752,"2026-04-10T01:20:03",[52,13,15,14],"插件",{"id":54,"name":55,"github_repo":56,"description_zh":57,"stars":58,"difficulty_score":32,"last_commit_at":59,"category_tags":60,"status":17},4721,"markitdown","microsoft\u002Fmarkitdown","MarkItDown 是一款由微软 AutoGen 团队打造的轻量级 Python 工具，专为将各类文件高效转换为 Markdown 格式而设计。它支持 PDF、Word、Excel、PPT、图片（含 OCR）、音频（含语音转录）、HTML 乃至 YouTube 链接等多种格式的解析，能够精准提取文档中的标题、列表、表格和链接等关键结构信息。\n\n在人工智能应用日益普及的今天，大语言模型（LLM）虽擅长处理文本，却难以直接读取复杂的二进制办公文档。MarkItDown 恰好解决了这一痛点，它将非结构化或半结构化的文件转化为模型“原生理解”且 Token 效率极高的 Markdown 格式，成为连接本地文件与 AI 分析 pipeline 的理想桥梁。此外，它还提供了 MCP（模型上下文协议）服务器，可无缝集成到 Claude Desktop 等 LLM 应用中。\n\n这款工具特别适合开发者、数据科学家及 AI 研究人员使用，尤其是那些需要构建文档检索增强生成（RAG）系统、进行批量文本分析或希望让 AI 助手直接“阅读”本地文件的用户。虽然生成的内容也具备一定可读性，但其核心优势在于为机器",93400,"2026-04-06T19:52:38",[52,14],{"id":62,"github_repo":63,"name":64,"description_en":65,"description_zh":66,"ai_summary_zh":66,"readme_en":67,"readme_zh":68,"quickstart_zh":69,"use_case_zh":70,"hero_image_url":71,"owner_login":72,"owner_name":73,"owner_avatar_url":74,"owner_bio":75,"owner_company":75,"owner_location":75,"owner_email":75,"owner_twitter":75,"owner_website":75,"owner_url":76,"languages":77,"stars":104,"forks":105,"last_commit_at":106,"license":107,"difficulty_score":10,"env_os":108,"env_gpu":109,"env_ram":110,"env_deps":111,"category_tags":118,"github_topics":75,"view_count":32,"oss_zip_url":75,"oss_zip_packed_at":75,"status":17,"created_at":119,"updated_at":120,"faqs":121,"releases":152},6907,"TheAiSingularity\u002Fgraphrag-local-ollama","graphrag-local-ollama","Local models support for Microsoft's graphrag using ollama (llama3, mistral, gemma2 phi3)- LLM & Embedding extraction","graphrag-local-ollama 是微软 GraphRAG 项目的本地化改编版本，旨在让用户无需依赖昂贵的云端 API，即可在本地构建基于知识图谱的检索增强生成（RAG）系统。它通过集成 Ollama，支持直接调用 Llama3、Mistral、Gemma2 等本地大语言模型及嵌入模型，来完成从文档中提取实体、构建知识图谱到生成社区摘要的全过程。\n\n传统 RAG 技术在回答涉及整个数据集的宏观问题（如“主要主题是什么”）时往往表现不佳，而 graphrag-local-ollama 利用图谱结构有效解决了这一痛点，显著提升了对大规模文本数据进行全局理解和分析的能力。同时，它将推理过程完全移至本地，不仅大幅降低了使用成本，还更好地保障了数据隐私。\n\n这款工具特别适合希望低成本部署私有知识库的开发者、需要处理敏感数据的研究人员，以及想要探索图增强检索技术的 AI 爱好者。其核心亮点在于极简的配置流程：用户只需安装 Ollama 并拉取相应模型，配合简单的命令行操作即可完成环境搭建，让高效、经济的本地化智能问答变得触手可及。","## 🤝 Contributing\n\n**We welcome contributions from the community to help enhance GraphRAG Local Ollama! Please see our [Contributing Guidelines](CONTRIBUTING.md) for more details on how to get involved.**\n\nNeed support for llama integration.\n\n# 🚀 GraphRAG Local Ollama - Knowledge Graph\n\nWelcome to **GraphRAG Local Ollama**! This repository is an exciting adaptation of Microsoft's [GraphRAG](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fgraphrag), tailored to support local models downloaded using Ollama. Say goodbye to costly OpenAPI models and hello to efficient, cost-effective local inference using Ollama!\n\n## 📄 Research Paper\n\nFor more details on the GraphRAG implementation, please refer to the [GraphRAG paper](https:\u002F\u002Farxiv.org\u002Fpdf\u002F2404.16130).\n\n**Paper Abstract**\n\nThe use of retrieval-augmented generation (RAG) to retrieve relevant information from an external knowledge source enables large language models (LLMs)to answer questions over private and\u002For previously unseen document collections.However, RAG fails on global questions directed at an entire text corpus, suchas “What are the main themes in the dataset?”, since this is inherently a queryfocused summarization (QFS) task, rather than an explicit retrieval task. PriorQFS methods, meanwhile, fail to scale to the quantities of text indexed by typicalRAG systems. To combine the strengths of these contrasting methods, we proposea Graph RAG approach to question answering over private text corpora that scaleswith both the generality of user questions and the quantity of source text to be indexed. Our approach uses an LLM to build a graph-based text index in two stages:first to derive an entity knowledge graph from the source documents, then to pregenerate community summaries for all groups of closely-related entities. Given aquestion, each community summary is used to generate a partial response, beforeall partial responses are again summarized in a final response to the user. For aclass of global sensemaking questions over datasets in the 1 million token range,we show that Graph RAG leads to substantial improvements over a na¨ıve RAGbaseline for both the comprehensiveness and diversity of generated answers. \n\n## 🌟 Features\n\n- **Local Model Support:** Leverage local models with Ollama for LLM and embeddings.\n- **Cost-Effective:** Eliminate dependency on costly OpenAPI models.\n- **Easy Setup:** Simple and straightforward setup process.\n\n## 📦 Installation and Setup\n\nFollow these steps to set up this repository and use GraphRag with local models provided by Ollama :\n\n\n1. **Create and activate a new conda environment:  (please stick to the given python version 3.10 for no errors)**\n    ```bash\n    conda create -n graphrag-ollama-local python=3.10\n    conda activate graphrag-ollama-local\n    ```\n\n2. **Install Ollama:**\n    - Visit [Ollama's website](https:\u002F\u002Follama.com\u002F) for installation instructions.\n    - Or, run:\n    ```bash\n    curl -fsSL https:\u002F\u002Follama.com\u002Finstall.sh | sh #ollama for linux\n    pip install ollama\n    ```\n\n3. **Download the required models using Ollama, we can choose from (mistral,gemma2, qwen2) for llm and any embedding model provided under Ollama:**\n    ```bash\n    ollama pull mistral  #llm\n    ollama pull nomic-embed-text  #embedding\n    ```\n\n4. **Clone the repository:**\n    ```bash\n    git clone https:\u002F\u002Fgithub.com\u002FTheAiSingularity\u002Fgraphrag-local-ollama.git\n    ```\n\n5. **Navigate to the repository directory:**\n    ```bash\n    cd graphrag-local-ollama\u002F\n    ```\n\n6. **Install the graphrag package ** This is the most important step :**\n    ```bash\n    pip install -e .\n    ```\n\n\n7. **Create the required input directory: This is where the experiments data and results will be stored - .\u002Fragtest**\n    ```bash\n    mkdir -p .\u002Fragtest\u002Finput\n    ```\n    \n8. **Copy sample data folder input\u002F  to  .\u002Fragtest. Input\u002F has the sample data to run the setup. You can add your own data here in .txt format.**\n    ```bash\n    cp input\u002F* .\u002Fragtest\u002Finput\n    ```\n    \n9. **Initialize the .\u002Fragtest folder to create the required files:**\n    ```bash\n    python -m graphrag.index --init --root .\u002Fragtest\n    ```\n\n10. **Move the settings.yaml file, this is the main predefined config file configured with ollama local models :**\n    ```bash\n    cp settings.yaml .\u002Fragtest\n    ```\n\nUsers can experiment by changing the models. The llm model expects language models like llama3, mistral, phi3, etc., and the embedding model section expects embedding models like mxbai-embed-large, nomic-embed-text, etc., which are provided by Ollama. You can find the complete list of models provided by Ollama here https:\u002F\u002Follama.com\u002Flibrary, which can be deployed locally. The default API base URLs are http:\u002F\u002Flocalhost:11434\u002Fv1 for LLM and http:\u002F\u002Flocalhost:11434\u002Fapi for embeddings, hence they are added to the respective sections. \n\n![LLM Configuration](\u003CScreenshot 2024-07-09 at 3.34.31 AM-1.png>)\n\n![Embedding Configuration](\u003CScreenshot 2024-07-09 at 3.36.28 AM.png>)\n\n11. **Run the indexing, which creates a graph:**\n    ```bash\n    python -m graphrag.index --root .\u002Fragtest\n    ```\n\n12. **Run a query: Only supports Global method** \n    ```bash\n    python -m graphrag.query --root .\u002Fragtest --method global \"What is machine learning?\"\n    ```\n\n**Graphs can be saved which further can be used for visualization by changing the graphml to \"true\" in the settings.yaml :**\n    \n    snapshots:\n    graphml: true\n    \n**To visualize the generated graphml files, you can use : https:\u002F\u002Fgephi.org\u002Fusers\u002Fdownload\u002F or the script provided in the repo visualize-graphml.py :**\n\nPass the path to the .graphml file to the below line in visualize-graphml.py:\n\n    graph = nx.read_graphml('output\u002F20240708-161630\u002Fartifacts\u002Fsummarized_graph.graphml') \n\n13. **Visualize .graphml :**\n\n    ```bash\n    python visualize-graphml.py\n    ```\n\n\n\n## Citations\n\n- Original GraphRAG repository by Microsoft: [GraphRAG](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fgraphrag)\n- Ollama: [Ollama](https:\u002F\u002Follama.com\u002F)\n\n---\n\nBy following the above steps, you can set up and use local models with GraphRAG, making the process more cost-effective and efficient.\n","## 🤝 贡献\n\n**我们欢迎社区贡献，以帮助增强 GraphRAG Local Ollama！请参阅我们的[贡献指南](CONTRIBUTING.md)，了解更多关于如何参与的信息。**\n\n需要支持 llama 集成。\n\n# 🚀 GraphRAG Local Ollama - 知识图谱\n\n欢迎来到 **GraphRAG Local Ollama**！这个仓库是对微软的 [GraphRAG](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fgraphrag) 的一次激动人心的改编，专门用于支持通过 Ollama 下载的本地模型。告别昂贵的 OpenAPI 模型，迎接使用 Ollama 进行高效、经济实惠的本地推理吧！\n\n## 📄 研究论文\n\n有关 GraphRAG 实现的更多详细信息，请参阅 [GraphRAG 论文](https:\u002F\u002Farxiv.org\u002Fpdf\u002F2404.16130)。\n\n**论文摘要**\n\n利用检索增强生成（RAG）从外部知识源中检索相关信息，可以使大型语言模型（LLM）对私有和\u002F或此前未见过的文档集合进行问答。然而，RAG 对于针对整个文本语料库的全局性问题却难以胜任，例如“数据集中有哪些主要主题？”这类问题，因为这本质上是一个查询聚焦的摘要任务（QFS），而非明确的检索任务。与此同时，现有的 QFS 方法又无法扩展到典型 RAG 系统所索引的文本数量级别。为了结合这两种截然不同的方法的优势，我们提出了一种基于图的 RAG 方法，用于对私有文本语料库进行问答，该方法既能适应用户问题的普遍性，又能处理待索引的海量源文本。我们的方法利用 LLM 分两步构建基于图的文本索引：首先从源文档中提取实体知识图，然后为所有紧密相关的实体群组预先生成社区摘要。给定一个问题时，每个社区摘要都会被用来生成部分响应，随后所有部分响应会被再次汇总成最终的用户响应。对于一类涉及百万级标记数据集的全局性理解问题，我们证明 GraphRAG 在生成答案的全面性和多样性方面都显著优于朴素的 RAG 基线。\n\n## 🌟 特性\n\n- **本地模型支持：** 使用 Ollama 提供的本地模型进行 LLM 和嵌入计算。\n- **经济高效：** 摆脱对昂贵 OpenAPI 模型的依赖。\n- **易于设置：** 设置过程简单直接。\n\n## 📦 安装与设置\n\n按照以下步骤设置此仓库，并使用 Ollama 提供的本地模型运行 GraphRag：\n\n1. **创建并激活一个新的 conda 环境：（请务必使用指定的 Python 3.10 版本，以免出现错误）**\n    ```bash\n    conda create -n graphrag-ollama-local python=3.10\n    conda activate graphrag-ollama-local\n    ```\n\n2. **安装 Ollama：**\n    - 请访问 [Ollama 官网](https:\u002F\u002Follama.com\u002F) 获取安装说明。\n    - 或者运行：\n    ```bash\n    curl -fsSL https:\u002F\u002Follama.com\u002Finstall.sh | sh #适用于 Linux 的 Ollama\n    pip install ollama\n    ```\n\n3. **使用 Ollama 下载所需模型，我们可以选择（mistral、gemma2、qwen2）作为 LLM，以及 Ollama 提供的任何嵌入模型：**\n    ```bash\n    ollama pull mistral  # LLM\n    ollama pull nomic-embed-text  # 嵌入模型\n    ```\n\n4. **克隆仓库：**\n    ```bash\n    git clone https:\u002F\u002Fgithub.com\u002FTheAiSingularity\u002Fgraphrag-local-ollama.git\n    ```\n\n5. **进入仓库目录：**\n    ```bash\n    cd graphrag-local-ollama\u002F\n    ```\n\n6. **安装 graphrag 包** 这是最重要的一步：\n    ```bash\n    pip install -e .\n    ```\n\n7. **创建所需的输入目录：这里将存储实验数据和结果——.\u002Fragtest**\n    ```bash\n    mkdir -p .\u002Fragtest\u002Finput\n    ```\n    \n8. **将示例数据文件夹 input\u002F 复制到 .\u002Fragtest。input\u002F 包含用于运行设置的示例数据。您可以在此处添加自己的 .txt 格式数据。**\n    ```bash\n    cp input\u002F* .\u002Fragtest\u002Finput\n    ```\n    \n9. **初始化 .\u002Fragtest 文件夹以创建所需文件：**\n    ```bash\n    python -m graphrag.index --init --root .\u002Fragtest\n    ```\n\n10. **移动 settings.yaml 文件，这是配置了 Ollama 本地模型的主预定义配置文件：**\n    ```bash\n    cp settings.yaml .\u002Fragtest\n    ```\n\n用户可以通过更改模型来进行实验。LLM 模块期望使用 llama3、mistral、phi3 等语言模型，而嵌入模块则期望使用 mxbai-embed-large、nomic-embed-text 等由 Ollama 提供的嵌入模型。您可以在 https:\u002F\u002Follama.com\u002Flibrary 找到 Ollama 提供的完整模型列表，这些模型都可以在本地部署。默认的 API 基础 URL 分别为 LLM 的 http:\u002F\u002Flocalhost:11434\u002Fv1 和嵌入的 http:\u002F\u002Flocalhost:11434\u002Fapi，因此已将其添加到相应部分。\n\n![LLM 配置](\u003CScreenshot 2024-07-09 at 3.34.31 AM-1.png>)\n\n![嵌入配置](\u003CScreenshot 2024-07-09 at 3.36.28 AM.png>)\n\n11. **运行索引，这将创建一个图：**\n    ```bash\n    python -m graphrag.index --root .\u002Fragtest\n    ```\n\n12. **运行查询：仅支持全局方法**\n    ```bash\n    python -m graphrag.query --root .\u002Fragtest --method global \"什么是机器学习？\"\n    ```\n\n**图可以保存下来，之后可通过将 settings.yaml 中的 graphml 设置为 “true” 来进行可视化：**\n\n    snapshots:\n    graphml: true\n\n**要可视化生成的 graphml 文件，您可以使用：https:\u002F\u002Fgephi.org\u002Fusers\u002Fdownload\u002F 或仓库中提供的脚本 visualize-graphml.py：**\n\n在 visualize-graphml.py 中，将 .graphml 文件路径传递给以下行：\n\n    graph = nx.read_graphml('output\u002F20240708-161630\u002Fartifacts\u002Fsummarized_graph.graphml')\n\n13. **可视化 .graphml：**\n\n    ```bash\n    python visualize-graphml.py\n    ```\n\n\n\n## 引用\n\n- 微软原版 GraphRAG 仓库：[GraphRAG](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fgraphrag)\n- Ollama：[Ollama](https:\u002F\u002Follama.com\u002F)\n\n---\n\n按照上述步骤，您可以设置并使用 GraphRAG 的本地模型，从而使流程更加经济高效。","# GraphRAG Local Ollama 快速上手指南\n\n本指南帮助中国开发者在本地使用 Ollama 运行 Microsoft GraphRAG，实现低成本、高效率的知识图谱构建与全局问答。\n\n## 环境准备\n\n- **操作系统**：Linux \u002F macOS \u002F Windows (WSL2 推荐)\n- **Python 版本**：严格使用 **Python 3.10**（其他版本可能导致兼容性问题）\n- **依赖工具**：\n  - [Conda](https:\u002F\u002Fdocs.conda.io\u002F)（推荐用于环境管理）\n  - [Ollama](https:\u002F\u002Follama.com\u002F)（本地大模型运行时）\n- **网络要求**：需能访问 Hugging Face 或 Ollama 模型库（国内用户可配置镜像加速）\n\n> 💡 国内用户建议：\n> - 使用清华\u002F中科大 PyPI 镜像：`pip config set global.index-url https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple`\n> - Ollama 模型下载若缓慢，可尝试手动下载模型文件后导入（参考 Ollama 官方文档）\n\n## 安装步骤\n\n1. **创建并激活 Conda 环境**\n```bash\nconda create -n graphrag-ollama-local python=3.10\nconda activate graphrag-ollama-local\n```\n\n2. **安装 Ollama**\n```bash\ncurl -fsSL https:\u002F\u002Follama.com\u002Finstall.sh | sh\npip install ollama\n```\n> Windows 用户请前往 https:\u002F\u002Follama.com\u002Fdownload 下载安装包手动安装。\n\n3. **拉取所需本地模型**\n```bash\nollama pull mistral          # LLM 模型（可选：llama3, qwen2, phi3 等）\nollama pull nomic-embed-text # 嵌入模型（可选：mxbai-embed-large 等）\n```\n\n4. **克隆项目仓库**\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002FTheAiSingularity\u002Fgraphrag-local-ollama.git\ncd graphrag-local-ollama\u002F\n```\n\n5. **安装 GraphRAG 包**\n```bash\npip install -e .\n```\n\n6. **准备数据目录**\n```bash\nmkdir -p .\u002Fragtest\u002Finput\ncp input\u002F* .\u002Fragtest\u002Finput   # 复制示例数据，也可替换为自己的 .txt 文件\n```\n\n7. **初始化配置**\n```bash\npython -m graphrag.index --init --root .\u002Fragtest\ncp settings.yaml .\u002Fragtest   # 覆盖为预配置的 Ollama 本地模型设置\n```\n\n> ✅ `settings.yaml` 已默认配置：\n> - LLM API: `http:\u002F\u002Flocalhost:11434\u002Fv1`\n> - Embedding API: `http:\u002F\u002Flocalhost:11434\u002Fapi`\n> 如需更换模型，编辑该文件中对应字段即可。\n\n## 基本使用\n\n1. **构建知识图谱索引**\n```bash\npython -m graphrag.index --root .\u002Fragtest\n```\n> 首次运行将自动抽取实体、构建图谱、生成社区摘要。耗时取决于数据量和模型性能。\n\n2. **执行全局问答查询**\n```bash\npython -m graphrag.query --root .\u002Fragtest --method global \"什么是机器学习？\"\n```\n> 当前仅支持 `global` 方法，适用于对整体数据集进行主题归纳与宏观洞察。\n\n3. **（可选）可视化知识图谱**\n编辑 `.\u002Fragtest\u002Fsettings.yaml`，启用 GraphML 输出：\n```yaml\nsnapshots:\n  graphml: true\n```\n重新运行索引后，使用内置脚本可视化：\n```bash\npython visualize-graphml.py\n```\n> 或使用 [Gephi](https:\u002F\u002Fgephi.org\u002F) 打开生成的 `.graphml` 文件进行高级可视化分析。\n\n---\n\n完成以上步骤，你已成功在本地部署基于 Ollama 的 GraphRAG 系统，无需依赖付费 API，即可体验强大的图谱增强检索能力。","某初创法律科技团队需要在本地服务器上构建一个私有法律知识库，以回答关于数万页判例文档的全局性问题（如“主要争议主题有哪些”），且受限于预算无法调用云端大模型 API。\n\n### 没有 graphrag-local-ollama 时\n- **高昂的 API 成本**：处理百万级 token 的法律文档需频繁调用 OpenAI 等商业接口，每月账单远超初创团队预算。\n- **全局问答能力缺失**：传统 RAG 只能检索片段，面对“数据集整体趋势”类问题时，无法像 GraphRAG 那样生成综合性的摘要回答。\n- **数据隐私风险**：敏感的案件细节必须上传至第三方云服务，违反律所严格的数据不出域合规要求。\n- **部署门槛高**：原版 Microsoft GraphRAG 强依赖云端模型，缺乏针对本地轻量级模型（如 Mistral、Llama3）的直接支持方案。\n\n### 使用 graphrag-local-ollama 后\n- **零边际推理成本**：通过 Ollama 加载本地的 Mistral 和 Nomic 嵌入模型，彻底消除 API 调用费用，仅需承担服务器电费。\n- **深度全局洞察**：利用图索引技术自动提取实体关系并生成社区摘要，能精准回答“判例中的核心法律原则演变”等宏观问题。\n- **完全本地化闭环**：所有文档索引、图谱构建及问答推理均在内部服务器完成，确保敏感法律数据绝对安全可控。\n- **开箱即用的本地适配**：直接复用现有开源架构，只需简单配置即可让 Llama3 或 Gemma2 等本地模型驱动复杂的图谱构建流程。\n\ngraphrag-local-ollama 让资源有限的团队也能在完全离线的环境下，以极低成本获得企业级的全局知识洞察能力。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FTheAiSingularity_graphrag-local-ollama_cac05486.png","TheAiSingularity","TheAISingularity","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002FTheAiSingularity_e4d056ce.jpg",null,"https:\u002F\u002Fgithub.com\u002FTheAiSingularity",[78,82,86,90,94,98,101],{"name":79,"color":80,"percentage":81},"Python","#3572A5",96.8,{"name":83,"color":84,"percentage":85},"Jupyter Notebook","#DA5B0B",2.2,{"name":87,"color":88,"percentage":89},"Nunjucks","#3d8137",0.6,{"name":91,"color":92,"percentage":93},"Jinja","#a52a22",0.2,{"name":95,"color":96,"percentage":97},"CSS","#663399",0.1,{"name":99,"color":100,"percentage":97},"JavaScript","#f1e05a",{"name":102,"color":103,"percentage":97},"Shell","#89e051",1098,166,"2026-04-11T08:12:51","MIT","Linux, macOS, Windows","非必需（依赖 Ollama 运行的本地模型，若模型需要 GPU 加速则需相应显卡，README 未指定具体型号或显存）","未说明（取决于所选本地大语言模型和嵌入模型的内存需求）",{"notes":112,"python":113,"dependencies":114},"必须安装 Ollama 并拉取指定模型（如 mistral, nomic-embed-text）；严格建议使用 Python 3.10 以避免错误；默认 API 地址为 localhost:11434；仅支持全局（global）查询方法。","3.10",[115,116,117],"ollama","graphrag","networkx",[35,14],"2026-03-27T02:49:30.150509","2026-04-13T00:24:36.285716",[122,127,132,137,142,147],{"id":123,"question_zh":124,"answer_zh":125,"source_url":126},31122,"切换嵌入模型（embedding model）后配置不生效，报错提示找不到模型怎么办？","如果在 YAML 配置文件中修改了嵌入模型但不起作用，通常是因为代码中硬编码了默认模型名称。请检查文件 `graphrag\\llm\\openai\\openai_embeddings_llm.py` 的第 31 行，找到写死的 \"nomic-embed-text\"，将其修改为你当前在配置文件中指定的模型名称即可。此外，确保已在设置文件（settings.yaml）中正确指定模型，并尝试拉取该模型。","https:\u002F\u002Fgithub.com\u002FTheAiSingularity\u002Fgraphrag-local-ollama\u002Fissues\u002F31",{"id":128,"question_zh":129,"answer_zh":130,"source_url":131},31123,"运行查询时出现 JSON 解码错误（JSON Decode Error）如何解决？","该错误通常发生在解析搜索响应时，原因是本地模型返回的格式不符合预期的 JSON 结构。请在配置文件（settings.yaml）中检查 LLM 设置，确保添加了 `model_supports_json: true` 参数，以告知系统该模型支持直接输出 JSON 格式。如果问题依旧，可能需要更换为对 JSON 支持更好的模型或调整提示词模板。","https:\u002F\u002Fgithub.com\u002FTheAiSingularity\u002Fgraphrag-local-ollama\u002Fissues\u002F94",{"id":133,"question_zh":134,"answer_zh":135,"source_url":136},31124,"运行可视化脚本时报错找不到 summarized_graph.graphml 文件？","此错误表示索引流程尚未完成或未生成预期的图谱文件。请首先确认索引命令（indexing）是否已成功运行完毕且无报错。检查输出目录（如 `output\u002F[timestamp]\u002Fartifacts\u002F`）下是否存在 `.graphml` 文件。如果索引中途失败，需要修复索引错误后重新运行，直到生成完整的 artifacts 文件夹后再执行可视化脚本。","https:\u002F\u002Fgithub.com\u002FTheAiSingularity\u002Fgraphrag-local-ollama\u002Fissues\u002F86",{"id":138,"question_zh":139,"answer_zh":140,"source_url":141},31125,"使用本地模型（如 LLaMA\u002FNomic）构建索引的速度比 OpenAI 慢很多，如何优化？","本地模型推理速度受限于硬件性能和并发设置，通常远慢于云端 API。要减少计算时间，可以尝试以下方法：1. 在配置文件中增加 `concurrent_requests`（并发请求数），充分利用多核 CPU\u002FGPU；2. 减小 `batch_size` 以避免显存溢出导致的等待；3. 使用量化版本（如 q4_0, q8_0）的模型以提高推理速度；4. 如果数据量小，可暂时减少实体提取的复杂度配置。","https:\u002F\u002Fgithub.com\u002FTheAiSingularity\u002Fgraphrag-local-ollama\u002Fissues\u002F63",{"id":143,"question_zh":144,"answer_zh":145,"source_url":146},31126,"安装后在 site-packages 中找不到 graphrag 目录或模块怎么办？","这通常意味着包未正确安装或安装到了错误的虚拟环境中。请确认你当前激活的 conda 或 venv 环境与执行安装命令的环境一致。尝试重新安装：先卸载 `pip uninstall graphrag`，然后确保在正确的环境下运行 `pip install -e .` 或对应的安装命令。安装完成后，检查 `Lib\u002Fsite-packages` 下是否有 `graphrag` 文件夹。","https:\u002F\u002Fgithub.com\u002FTheAiSingularity\u002Fgraphrag-local-ollama\u002Fissues\u002F77",{"id":148,"question_zh":149,"answer_zh":150,"source_url":151},31127,"索引过程未完成且没有生成报告日志（report log）是什么原因？","索引未完成通常是由于运行时错误、内存不足或进程被意外终止导致的。请检查终端输出的完整报错信息，特别是关于 `datashaper` 或 `workflow` 的错误堆栈。如果是资源问题，尝试减少输入文本数量或降低并发配置。确保在索引完全结束前不要关闭终端窗口，成功的索引会在输出目录生成包含 `report.log` 和各类 artifacts 的文件夹。","https:\u002F\u002Fgithub.com\u002FTheAiSingularity\u002Fgraphrag-local-ollama\u002Fissues\u002F29",[]]