[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"tool-junruxiong--IncarnaMind":3,"similar-junruxiong--IncarnaMind":86},{"id":4,"github_repo":5,"name":6,"description_en":7,"description_zh":8,"ai_summary_zh":8,"readme_en":9,"readme_zh":10,"quickstart_zh":11,"use_case_zh":12,"hero_image_url":13,"owner_login":14,"owner_name":15,"owner_avatar_url":16,"owner_bio":17,"owner_company":18,"owner_location":19,"owner_email":18,"owner_twitter":18,"owner_website":18,"owner_url":20,"languages":21,"stars":26,"forks":27,"last_commit_at":28,"license":29,"difficulty_score":30,"env_os":31,"env_gpu":32,"env_ram":33,"env_deps":34,"category_tags":41,"github_topics":46,"view_count":30,"oss_zip_url":18,"oss_zip_packed_at":18,"status":55,"created_at":56,"updated_at":57,"faqs":58,"releases":85},721,"junruxiong\u002FIncarnaMind","IncarnaMind","Connect and chat with your multiple documents (pdf and txt) through GPT 3.5, GPT-4 Turbo, Claude and Local Open-Source LLMs","IncarnaMind 是一款创新的开源 AI 工具，支持用户利用 GPT、Claude 或本地大模型与个人 PDF 及 TXT 文档直接对话。它有效解决了传统 RAG 方案中固定分块导致的上下文割裂、仅支持单文档检索以及大模型易产生幻觉等难题。凭借核心的滑动窗口分块技术与集成检索器，IncarnaMind 能动态平衡细粒度与宏观信息的获取，实现跨多文档的复杂问答。无论是开发者还是研究人员，都能借此构建更精准的知识库。特别值得一提的是，它对本地开源模型（如 Llama2）的支持，让注重数据隐私的用户可以在本地安全运行，无需担心敏感信息上传云端。此外，系统兼容多种主流模型，安装简便，为私有文档的智能分析提供了稳定且灵活的解决方案。","# 🧠 IncarnaMind\n\n## 👀 In a Nutshell\n\nIncarnaMind enables you to chat with your personal documents 📁 (PDF, TXT) using Large Language Models (LLMs) like GPT ([architecture overview](#high-level-architecture)). While OpenAI has recently launched a fine-tuning API for GPT models, it doesn't enable the base pretrained models to learn new data, and the responses can be prone to factual hallucinations. Utilize our [Sliding Window Chunking](#sliding-window-chunking) mechanism and Ensemble Retriever enables efficient querying of both fine-grained and coarse-grained information within your ground truth documents to augment the LLMs.\n\nFeel free to use it and we welcome any feedback and new feature suggestions 🙌.\n\n## ✨ New Updates\n\n### Open-Source and Local LLMs Support\n\n- **Recommended Model:** We've primarily tested with the Llama2 series models and recommend using [llama2-70b-chat](https:\u002F\u002Fhuggingface.co\u002FTheBloke\u002FLlama-2-70B-chat-GGUF) (either full or GGUF version) for optimal performance. Feel free to experiment with other LLMs.\n- **System Requirements:** It requires more than 35GB of GPU RAM to run the GGUF quantized version.\n\n### Alternative Open-Source LLMs Options\n\n- **Insufficient RAM:** If you're limited by GPU RAM, consider using the [Together.ai](https:\u002F\u002Fapi.together.xyz\u002Fplayground) API. It supports llama2-70b-chat and most other open-source LLMs. Plus, you get $25 in free usage.\n- **Upcoming:** Smaller and cost-effecitive, fine-tuned models will be released in the future.\n\n### How to use GGUF models\n\n- For instructions on acquiring and using quantized GGUF LLM (similar to GGML), please refer to this [video](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=lbFmceo4D5E) (from 10:45 to 12:30)..\n\nHere is a comparison table of the different models I tested, for reference only:\n\n| Metrics   | GPT-4  | GPT-3.5 | Claude 2.0 | Llama2-70b | Llama2-70b-gguf | Llama2-70b-api |\n|-----------|--------|---------|------------|------------|-----------------|----------------|\n| Reasoning | High   | Medium  | High       | Medium     | Medium          | Medium         |\n| Speed     | Medium | High    | Medium     | Very Low   | Low             | Medium         |\n| GPU RAM   | N\u002FA    | N\u002FA     | N\u002FA        | Very High  | High            | N\u002FA            |\n| Safety    | Low    | Low     | Low        | High       | High            | Low            |\n\n## 💻 Demo\n\nhttps:\u002F\u002Fgithub.com\u002Fjunruxiong\u002FIncarnaMind\u002Fassets\u002F44308338\u002F89d479fb-de90-4f7c-b166-e54f7bc7344c\n\n## 💡 Challenges Addressed\n\n- **Fixed Chunking**: Traditional RAG tools rely on fixed chunk sizes, limiting their adaptability in handling varying data complexity and context.\n\n- **Precision vs. Semantics**:  Current retrieval methods usually focus either on semantic understanding or precise retrieval, but rarely both.\n\n- **Single-Document Limitation**: Many solutions can only query one document at a time, restricting multi-document information retrieval.\n\n- **Stability**: IncarnaMind is compatible with OpenAI GPT, Anthropic Claude, Llama2, and other open-source LLMs, ensuring stable parsing.\n\n## 🎯 Key Features\n\n- **Adaptive Chunking**: Our Sliding Window Chunking technique dynamically adjusts window size and position for RAG, balancing fine-grained and coarse-grained data access based on data complexity and context.\n\n- **Multi-Document Conversational QA**: Supports simple and multi-hop queries across multiple documents simultaneously, breaking the single-document limitation.\n\n- **File Compatibility**: Supports both PDF and TXT file formats.\n\n- **LLM Model Compatibility**: Supports OpenAI GPT, Anthropic Claude, Llama2 and other open-source LLMs.\n\n## 🏗 Architecture\n\n### High Level Architecture\n\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fjunruxiong_IncarnaMind_readme_6e019aadc262.png)\n\n### Sliding Window Chunking\n\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fjunruxiong_IncarnaMind_readme_434ae7c3c47d.png)\n\n## 🚀 Getting Started\n\n### 1. Installation\n\nThe installation is simple, you just need to run few commands.\n\n#### 1.0. Prerequisites\n\n- 3.8 ≤ Python \u003C 3.11 with [Conda](https:\u002F\u002Fwww.anaconda.com\u002Fdownload)\n- One\u002FAll of [OpenAI API Key](https:\u002F\u002Fbeta.openai.com\u002Fsignup), [Anthropic Claude API Key](https:\u002F\u002Fconsole.anthropic.com\u002Faccount\u002Fkeys), [Together.ai API KEY](https:\u002F\u002Fapi.together.xyz\u002Fsettings\u002Fapi-keys) or [HuggingFace toekn for Meta Llama models](https:\u002F\u002Fhuggingface.co\u002Fsettings\u002Ftokens)\n- And of course, your own documents.\n\n#### 1.1. Clone the repository\n\n```shell\ngit clone https:\u002F\u002Fgithub.com\u002Fjunruxiong\u002FIncarnaMind\ncd IncarnaMind\n```\n\n#### 1.2. Setup\n\nCreate Conda virtual environment:\n\n```shell\nconda create -n IncarnaMind python=3.10\n```\n\nActivate:\n\n```shell\nconda activate IncarnaMind\n```\n\nInstall all requirements:\n\n```shell\npip install -r requirements.txt\n```\n\nInstall [llama-cpp](https:\u002F\u002Fgithub.com\u002Fabetlen\u002Fllama-cpp-python) seperatly if you want to run quantized local LLMs:\n\n- For `NVIDIA` GPUs support, use `cuBLAS`\n\n```shell\nCMAKE_ARGS=\"-DLLAMA_CUBLAS=on\" FORCE_CMAKE=1 pip install llama-cpp-python==0.1.83 --no-cache-dir\n```\n\n- For Apple Metal (`M1\u002FM2`) support, use\n\n```shell\nCMAKE_ARGS=\"-DLLAMA_METAL=on\"  FORCE_CMAKE=1 pip install llama-cpp-python==0.1.83 --no-cache-dir\n```\n\nSetup your one\u002Fall of API keys in **configparser.ini** file:\n\n```shell\n[tokens]\nOPENAI_API_KEY = (replace_me)\nANTHROPIC_API_KEY = (replace_me)\nTOGETHER_API_KEY = (replace_me)\n# if you use full Meta-Llama models, you may need Huggingface token to access.\nHUGGINGFACE_TOKEN = (replace_me)\n```\n\n(Optional) Setup your custom parameters in **configparser.ini** file:\n\n```shell\n[parameters]\nPARAMETERS 1 = (replace_me)\nPARAMETERS 2 = (replace_me)\n...\nPARAMETERS n = (replace_me)\n```\n\n### 2. Usage\n\n#### 2.1. Upload and process your files\n\nPut all your files (please name each file correctly to maximize the performance) into the **\u002Fdata** directory and run the following command to ingest all data:\n(You can delete example files in the **\u002Fdata** directory before running the command)\n\n```shell\npython docs2db.py\n```\n\n#### 2.2. Run\n\nIn order to start the conversation, run a command like:\n\n```shell\npython main.py\n```\n\n#### 2.3. Chat and ask any questions\n\nWait for the script to require your input like the below.\n\n```shell\nHuman:\n```\n\n#### 2.4. Others\n\nWhen you start a chat, the system will automatically generate a **IncarnaMind.log** file.\nIf you want to edit the logging, please edit in the **configparser.ini** file.\n\n```shell\n[logging]\nenabled = True\nlevel = INFO\nfilename = IncarnaMind.log\nformat = %(asctime)s [%(levelname)s] %(name)s: %(message)s\n```\n\n## 🚫 Limitations\n\n- Citation is not supported for current version, but will release soon.\n- Limited asynchronous capabilities.\n\n## 📝 Upcoming Features\n\n- Frontend UI interface\n- Fine-tuned small size open-source LLMs\n- OCR support\n- Asynchronous optimization\n- Support more document formats\n\n## 🙌 Acknowledgements\n\nSpecial thanks to [Langchain](https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Flangchain), [Chroma DB](https:\u002F\u002Fgithub.com\u002Fchroma-core\u002Fchroma), [LocalGPT](https:\u002F\u002Fgithub.com\u002FPromtEngineer\u002FlocalGPT), [Llama-cpp](https:\u002F\u002Fgithub.com\u002Fabetlen\u002Fllama-cpp-python) for their invaluable contributions to the open-source community. Their work has been instrumental in making the IncarnaMind project a reality.\n\n## 🖋 Citation\n\nIf you want to cite our work, please use the following bibtex entry:\n\n```bibtex\n@misc{IncarnaMind2023,\n  author = {Junru Xiong},\n  title = {IncarnaMind},\n  year = {2023},\n  publisher = {GitHub},\n  journal = {GitHub Repository},\n  howpublished = {\\url{https:\u002F\u002Fgithub.com\u002Fjunruxiong\u002FIncarnaMind}}\n}\n```\n\n## 📑 License\n\n[Apache 2.0 License](LICENSE)","# 🧠 IncarnaMind\n\n## 👀 简而言之\n\nIncarnaMind 使您能够使用大型语言模型（LLM，Large Language Model）如 GPT 与您的个人文档 📁（PDF, TXT）进行对话（[架构概览](#high-level-architecture)）。虽然 OpenAI 最近推出了针对 GPT 模型的微调 API，但它无法让基础预训练模型学习新数据，且回复容易产生事实性幻觉。利用我们的 [滑动窗口分块](#sliding-window-chunking) 机制和集成检索器（Ensemble Retriever），可以高效查询真实文档中的细粒度和粗粒度信息，以增强 LLM。\n\n欢迎免费使用，我们欢迎任何反馈和新功能建议 🙌。\n\n## ✨ 更新内容\n\n### 开源和本地 LLM 支持\n\n- **推荐模型：** 我们主要测试了 Llama2 系列模型，推荐使用 [llama2-70b-chat](https:\u002F\u002Fhuggingface.co\u002FTheBloke\u002FLlama-2-70B-chat-GGUF)（完整版或 GGUF 版）以获得最佳性能。欢迎尝试其他 LLM。\n- **系统要求：** 运行 GGUF 量化版本需要超过 35GB 的 GPU 显存。\n\n### 替代开源 LLM 选项\n\n- **显存不足：** 如果受限于 GPU 显存，请考虑使用 [Together.ai](https:\u002F\u002Fapi.together.xyz\u002Fplayground) API。它支持 llama2-70b-chat 和其他大多数开源 LLM。此外，您还能获得 25 美元的免费额度。\n- **即将推出：** 更小、更具成本效益的微调模型将在未来发布。\n\n### 如何使用 GGUF 模型\n\n- 关于获取和使用量化 GGUF LLM（类似于 GGML）的说明，请参阅此 [视频](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=lbFmceo4D5E)（从 10:45 到 12:30）。\n\n以下是我测试的不同模型对比表，仅供参考：\n\n| 指标   | GPT-4  | GPT-3.5 | Claude 2.0 | Llama2-70b | Llama2-70b-gguf | Llama2-70b-api |\n|-----------|--------|---------|------------|------------|-----------------|----------------|\n| 推理能力 | 高     | 中      | 高         | 中         | 中              | 中             |\n| 速度     | 中     | 高      | 中         | 非常低     | 低              | 中             |\n| GPU 显存 | N\u002FA    | N\u002FA     | N\u002FA        | 非常高     | 高              | N\u002FA            |\n| 安全性   | 低     | 低      | 低         | 高         | 高              | 低             |\n\n## 💻 演示\n\nhttps:\u002F\u002Fgithub.com\u002Fjunruxiong\u002FIncarnaMind\u002Fassets\u002F44308338\u002F89d479fb-de90-4f7c-b166-e54f7bc7344c\n\n## 💡 解决的问题\n\n- **固定分块**：传统的 RAG（检索增强生成）工具依赖固定的分块大小，限制了其在处理不同数据复杂度和上下文时的适应性。\n\n- **精度与语义**：当前的检索方法通常侧重于语义理解或精确检索，但很少同时兼顾两者。\n\n- **单文档限制**：许多解决方案一次只能查询一个文档，限制了多文档信息检索。\n\n- **稳定性**：IncarnaMind 兼容 OpenAI GPT、Anthropic Claude、Llama2 和其他开源 LLM，确保解析稳定。\n\n## 🎯 关键特性\n\n- **自适应分块**：我们的滑动窗口分块技术动态调整 RAG 的窗口大小和位置，根据数据复杂度和上下文平衡细粒度和粗粒度数据访问。\n\n- **多文档对话问答**：支持跨多个文档同时进行简单和多跳查询，打破单文档限制。\n\n- **文件兼容性**：支持 PDF 和 TXT 文件格式。\n\n- **LLM 模型兼容性**：支持 OpenAI GPT、Anthropic Claude、Llama2 和其他开源 LLM。\n\n## 🏗 架构\n\n### 高层架构\n\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fjunruxiong_IncarnaMind_readme_6e019aadc262.png)\n\n### 滑动窗口分块\n\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fjunruxiong_IncarnaMind_readme_434ae7c3c47d.png)\n\n## 🚀 入门指南\n\n### 1. 安装\n\n安装很简单，只需运行几条命令即可。\n\n#### 1.0. 前置条件\n\n- 3.8 ≤ Python \u003C 3.11 以及 [Conda](https:\u002F\u002Fwww.anaconda.com\u002Fdownload)\n- [OpenAI API 密钥](https:\u002F\u002Fbeta.openai.com\u002Fsignup)、[Anthropic Claude API 密钥](https:\u002F\u002Fconsole.anthropic.com\u002Faccount\u002Fkeys)、[Together.ai API 密钥](https:\u002F\u002Fapi.together.xyz\u002Fsettings\u002Fapi-keys) 或 [Meta Llama 模型的 HuggingFace Token](https:\u002F\u002Fhuggingface.co\u002Fsettings\u002Ftokens) 中的任意一项\u002F全部\n- 当然，还有您自己的文档。\n\n#### 1.1. 克隆仓库\n\n```shell\ngit clone https:\u002F\u002Fgithub.com\u002Fjunruxiong\u002FIncarnaMind\ncd IncarnaMind\n```\n\n#### 1.2. 配置\n\n创建 Conda 虚拟环境：\n\n```shell\nconda create -n IncarnaMind python=3.10\n```\n\n激活环境：\n\n```shell\nconda activate IncarnaMind\n```\n\n安装所有依赖：\n\n```shell\npip install -r requirements.txt\n```\n\n如果您想运行量化的本地 LLM，请单独安装 [llama-cpp](https:\u002F\u002Fgithub.com\u002Fabetlen\u002Fllama-cpp-python)：\n\n- 对于 `NVIDIA` GPU 支持，请使用 `cuBLAS`\n\n```shell\nCMAKE_ARGS=\"-DLLAMA_CUBLAS=on\" FORCE_CMAKE=1 pip install llama-cpp-python==0.1.83 --no-cache-dir\n```\n\n- 对于 Apple Metal (`M1\u002FM2`) 支持，请使用\n\n```shell\nCMAKE_ARGS=\"-DLLAMA_METAL=on\"  FORCE_CMAKE=1 pip install llama-cpp-python==0.1.83 --no-cache-dir\n```\n\n在 **configparser.ini** 文件中设置您的一个或多个 API 密钥：\n\n```shell\n[tokens]\nOPENAI_API_KEY = (replace_me)\nANTHROPIC_API_KEY = (replace_me)\nTOGETHER_API_KEY = (replace_me)\n# 如果使用完整的 Meta-Llama 模型，您可能需要 Huggingface token 来访问。\nHUGGINGFACE_TOKEN = (replace_me)\n```\n\n（可选）在 **configparser.ini** 文件中设置您的自定义参数：\n\n```shell\n[parameters]\nPARAMETERS 1 = (replace_me)\nPARAMETERS 2 = (replace_me)\n...\nPARAMETERS n = (replace_me)\n```\n\n### 2. 使用\n\n#### 2.1. 上传并处理文件\n\n将所有文件（请正确命名每个文件以最大化性能）放入 **\u002Fdata** 目录，并运行以下命令以导入所有数据：\n（您可以在运行命令之前删除 **\u002Fdata** 目录中的示例文件）\n\n```shell\npython docs2db.py\n```\n\n#### 2.2. 运行\n\n为了开始对话，运行如下命令：\n\n```shell\npython main.py\n```\n\n#### 2.3. 聊天并提出任何问题\n\n等待脚本提示您输入，如下所示。\n\n```shell\nHuman:\n```\n\n#### 2.4. 其他\n\n当您开始聊天时，系统将自动生成 **IncarnaMind.log** 文件。\n如果您想编辑日志，请在 **configparser.ini** 文件中编辑。\n\n```shell\n[logging]\nenabled = True\nlevel = INFO\nfilename = IncarnaMind.log\nformat = %(asctime)s [%(levelname)s] %(name)s: %(message)s\n```\n\n## 🚫 局限性\n\n- 当前版本不支持引用，但很快就会发布。\n- 异步能力有限。\n\n## 📝 计划中的功能\n\n- 前端用户界面\n- 微调的小尺寸开源 LLM\n- OCR 支持\n- 异步优化\n- 支持更多文档格式\n\n## 🙌 致谢\n\n特别感谢 [Langchain](https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Flangchain)、[Chroma DB](https:\u002F\u002Fgithub.com\u002Fchroma-core\u002Fchroma)、[LocalGPT](https:\u002F\u002Fgithub.com\u002FPromtEngineer\u002FlocalGPT) 和 [Llama-cpp](https:\u002F\u002Fgithub.com\u002Fabetlen\u002Fllama-cpp-python) 对开源社区做出的宝贵贡献。它们的工作对于实现 IncarnaMind 项目起到了至关重要的作用。\n\n## 🖋 引用\n\n如果您希望引用我们的工作，请使用以下 BibTeX（参考文献格式）条目：\n\n```bibtex\n@misc{IncarnaMind2023,\n  author = {Junru Xiong},\n  title = {IncarnaMind},\n  year = {2023},\n  publisher = {GitHub},\n  journal = {GitHub Repository},\n  howpublished = {\\url{https:\u002F\u002Fgithub.com\u002Fjunruxiong\u002FIncarnaMind}}\n}\n```\n\n## 📑 许可证\n\n[Apache 2.0 许可证](LICENSE)","# IncarnaMind 快速上手指南\n\nIncarnaMind 是一款基于大语言模型（LLM）的个人文档对话工具，支持通过 PDF 和 TXT 文件与本地或云端模型进行交互。它采用滑动窗口分块（Sliding Window Chunking）机制，旨在提高检索精度并减少幻觉。\n\n## 一、环境准备\n\n### 系统要求\n- **Python 版本**：3.8 ≤ Python \u003C 3.11\n- **包管理工具**：推荐使用 [Conda](https:\u002F\u002Fwww.anaconda.com\u002Fdownload)\n- **硬件要求**：\n  - 若运行量化版本地 LLM (GGUF)，需 **>35GB GPU 显存**。\n  - 若使用 API (如 OpenAI, Together.ai)，对本地显卡无特殊要求。\n\n### 前置依赖\n请准备好以下至少一种访问凭证：\n- [OpenAI API Key](https:\u002F\u002Fbeta.openai.com\u002Fsignup)\n- [Anthropic Claude API Key](https:\u002F\u002Fconsole.anthropic.com\u002Faccount\u002Fkeys)\n- [Together.ai API KEY](https:\u002F\u002Fapi.together.xyz\u002Fsettings\u002Fapi-keys)\n- [HuggingFace Token](https:\u002F\u002Fhuggingface.co\u002Fsettings\u002Ftokens) (用于 Meta Llama 模型)\n- 您的个人文档文件 (PDF 或 TXT)\n\n> 💡 **提示**：国内开发者在使用 `pip` 安装时，建议配置国内镜像源以加速下载。\n\n## 二、安装步骤\n\n### 1. 克隆仓库\n```shell\ngit clone https:\u002F\u002Fgithub.com\u002Fjunruxiong\u002FIncarnaMind\ncd IncarnaMind\n```\n\n### 2. 创建虚拟环境\n```shell\nconda create -n IncarnaMind python=3.10\nconda activate IncarnaMind\n```\n\n### 3. 安装依赖\n```shell\npip install -r requirements.txt\n```\n\n### 4. 本地 LLM 支持 (可选)\n如果您计划运行量化版本地 LLM (如 Llama2-GGUF)，需单独安装 `llama-cpp-python`：\n\n- **NVIDIA GPU (cuBLAS)**:\n```shell\nCMAKE_ARGS=\"-DLLAMA_CUBLAS=on\" FORCE_CMAKE=1 pip install llama-cpp-python==0.1.83 --no-cache-dir\n```\n\n- **Apple Silicon (M1\u002FM2 Metal)**:\n```shell\nCMAKE_ARGS=\"-DLLAMA_METAL=on\"  FORCE_CMAKE=1 pip install llama-cpp-python==0.1.83 --no-cache-dir\n```\n\n### 5. 配置文件设置\n编辑项目根目录下的 `configparser.ini` 文件，填入您的 API Key：\n\n```ini\n[tokens]\nOPENAI_API_KEY = (replace_me)\nANTHROPIC_API_KEY = (replace_me)\nTOGETHER_API_KEY = (replace_me)\n# 如果使用完整 Meta-Llama 模型，可能需要 Huggingface token\nHUGGINGFACE_TOKEN = (replace_me)\n```\n\n## 三、基本使用\n\n### 1. 上传文档\n将需要处理的文件放入项目的 **`\u002Fdata`** 目录下（建议删除原有的示例文件）。\n\n### 2. 数据入库\n运行以下命令处理文档数据：\n```shell\npython docs2db.py\n```\n\n### 3. 启动对话\n运行主程序开始聊天：\n```shell\npython main.py\n```\n\n### 4. 交互示例\n等待脚本输出提示后输入您的问题：\n```shell\nHuman:\n(在此输入您的问题)\n```\n\n---\n*注：启动对话后，系统会自动生成 `IncarnaMind.log` 日志文件。如需调整日志级别，请在 `configparser.ini` 的 `[logging]` 部分进行修改。*","某企业法务团队正在处理年度供应商审计，需将上百份历史合同与最新 GDPR 法规进行交叉比对以识别潜在风险。\n\n### 没有 IncarnaMind 时\n- 依赖人工逐页翻阅 PDF 扫描件，面对海量文本时极易疲劳导致关键条款漏读。\n- 传统 RAG 工具采用固定分块策略，难以适应不同合同篇幅，导致上下文断裂影响理解。\n- 无法同时关联多个文档，查询“某条款是否符合新规”时需反复切换文件窗口核对。\n- 担心数据隐私，不敢将敏感合同上传至公共 API，本地部署又缺乏成熟的解析方案。\n\n### 使用 IncarnaMind 后\n- 批量上传所有合同与法规文件，通过自然语言对话即可瞬间检索分散在不同文档中的信息。\n- 利用滑动窗口分块技术动态调整上下文范围，既保留细粒度条款又兼顾整体语义连贯性。\n- 支持多文档并发问答，能直接输出跨文件的对比结论，无需人工拼接碎片化信息。\n- 兼容本地开源模型运行，敏感数据完全在内网流转，在保障安全的前提下获得 GPT-4 级别的推理能力。\n\nIncarnaMind 通过自适应分块与多源检索架构，让私有文档的智能交互变得既安全又高效。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fjunruxiong_IncarnaMind_152e0def.png","junruxiong","Joey Xiong","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fjunruxiong_8d36d92a.jpg","Bringing AI to life",null,"London","https:\u002F\u002Fgithub.com\u002Fjunruxiong",[22],{"name":23,"color":24,"percentage":25},"Python","#3572A5",100,800,55,"2026-03-17T12:49:16","Apache-2.0",3,"Linux, macOS, Windows","需要 NVIDIA GPU 或 Apple M1\u002FM2，本地运行 GGUF 量化模型需 >35GB 显存","未说明",{"notes":35,"python":36,"dependencies":37},"需使用 Conda 创建虚拟环境；需配置 API 密钥（OpenAI\u002FAnthropic\u002FTogether\u002FHuggingFace）；本地运行大模型对显存要求极高；数据文件需放入 \u002Fdata 目录；支持 PDF 和 TXT 格式","3.8 - 3.10",[38,39,40],"llama-cpp-python==0.1.83","langchain","chromadb",[42,43,44,45],"语言模型","图像","Agent","开发框架",[47,48,49,50,39,51,52,53,54],"gpt","llm","ai","chatbot","openai","pdf","nlp","generative-ai","ready","2026-03-27T02:49:30.150509","2026-04-06T07:15:06.967831",[59,64,68,73,77,81],{"id":60,"question_zh":61,"answer_zh":62,"source_url":63},3041,"运行 docs2db.py 脚本时，程序在处理 max_seq_length 512 时挂起（无响应）是否正常？","这是正常现象。维护者复现后发现，运行约 30 秒后开始生成文件，但完全生成所有 embedding 文件可能需要几分钟时间。请耐心等待进程完成，检查 database_store 文件夹是否最终生成了 embedding 文件。","https:\u002F\u002Fgithub.com\u002Fjunruxiong\u002FIncarnaMind\u002Fissues\u002F11",{"id":65,"question_zh":66,"answer_zh":67,"source_url":63},3042,"生成 Embeddings 过程中出现卡顿或失败，是否与内存不足或配置有关？","是的，用户反馈可能是本地内存不足导致的。建议检查系统资源使用情况。同时，确保配置文件中 API Key（如 TOGETHER_API_KEY, OPENAI_API_KEY）已正确填写，配置错误也可能导致流程异常。",{"id":69,"question_zh":70,"answer_zh":71,"source_url":72},3043,"既然 LLM 支持长上下文，为什么不将文档分块改为按自然段落分割？","目前行业多用按句子分割。IncarnaMind 采用创新的分层方案。按自然段落分割面临技术挑战，因为文档格式各异。基于规则的换行\u002F标题提取不够鲁棒，而使用 OCR 布局分析虽然可行但计算成本高且耗时（消费级电脑每页至少需 1-2 秒）。","https:\u002F\u002Fgithub.com\u002Fjunruxiong\u002FIncarnaMind\u002Fissues\u002F8",{"id":74,"question_zh":75,"answer_zh":76,"source_url":72},3044,"IncarnaMind 的检索机制是如何结合不同大小的分块工作的？","系统采用三步策略：(1) 使用小分块定位文档；(2) 利用滑动窗口在过滤后的文档中识别潜在的大分块（章节）；(3) 根据文档名和大分块索引，从过滤文本中检索中等大小的分块来回答用户问题。",{"id":78,"question_zh":79,"answer_zh":80,"source_url":72},3045,"如何自定义小、中、大分块的大小参数？","用户可以通过编辑 configparser.ini 文件来自定义分块大小。维护者鼓励用户根据需求调整这些参数，以平衡检索精度与速度。",{"id":82,"question_zh":83,"answer_zh":84,"source_url":72},3046,"按自然段落分块的主要性能瓶颈是什么？","主要瓶颈在于 OCR 布局分析的耗时。对于消费级计算机，处理一页文档的 OCR 布局分析至少需要 1-2 秒，这在大规模文档处理时会显著增加总耗时。相比之下，当前基于规则的方法更快速但可能不够精确。",[],[87,95,104,112,120,133],{"id":88,"name":89,"github_repo":90,"description_zh":91,"stars":92,"difficulty_score":30,"last_commit_at":93,"category_tags":94,"status":55},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",[45,43,44],{"id":96,"name":97,"github_repo":98,"description_zh":99,"stars":100,"difficulty_score":101,"last_commit_at":102,"category_tags":103,"status":55},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 真正成长为懂上",138956,2,"2026-04-05T11:33:21",[45,44,42],{"id":105,"name":106,"github_repo":107,"description_zh":108,"stars":109,"difficulty_score":101,"last_commit_at":110,"category_tags":111,"status":55},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 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",107662,"2026-04-03T11:11:01",[45,43,44],{"id":113,"name":114,"github_repo":115,"description_zh":116,"stars":117,"difficulty_score":101,"last_commit_at":118,"category_tags":119,"status":55},3704,"NextChat","ChatGPTNextWeb\u002FNextChat","NextChat 是一款轻量且极速的 AI 助手，旨在为用户提供流畅、跨平台的大模型交互体验。它完美解决了用户在多设备间切换时难以保持对话连续性，以及面对众多 AI 模型不知如何统一管理的痛点。无论是日常办公、学习辅助还是创意激发，NextChat 都能让用户随时随地通过网页、iOS、Android、Windows、MacOS 或 Linux 端无缝接入智能服务。\n\n这款工具非常适合普通用户、学生、职场人士以及需要私有化部署的企业团队使用。对于开发者而言，它也提供了便捷的自托管方案，支持一键部署到 Vercel 或 Zeabur 等平台。\n\nNextChat 的核心亮点在于其广泛的模型兼容性，原生支持 Claude、DeepSeek、GPT-4 及 Gemini Pro 等主流大模型，让用户在一个界面即可自由切换不同 AI 能力。此外，它还率先支持 MCP（Model Context Protocol）协议，增强了上下文处理能力。针对企业用户，NextChat 提供专业版解决方案，具备品牌定制、细粒度权限控制、内部知识库整合及安全审计等功能，满足公司对数据隐私和个性化管理的高标准要求。",87618,"2026-04-05T07:20:52",[45,42],{"id":121,"name":122,"github_repo":123,"description_zh":124,"stars":125,"difficulty_score":101,"last_commit_at":126,"category_tags":127,"status":55},2268,"ML-For-Beginners","microsoft\u002FML-For-Beginners","ML-For-Beginners 是由微软推出的一套系统化机器学习入门课程，旨在帮助零基础用户轻松掌握经典机器学习知识。这套课程将学习路径规划为 12 周，包含 26 节精炼课程和 52 道配套测验，内容涵盖从基础概念到实际应用的完整流程，有效解决了初学者面对庞大知识体系时无从下手、缺乏结构化指导的痛点。\n\n无论是希望转型的开发者、需要补充算法背景的研究人员，还是对人工智能充满好奇的普通爱好者，都能从中受益。课程不仅提供了清晰的理论讲解，还强调动手实践，让用户在循序渐进中建立扎实的技能基础。其独特的亮点在于强大的多语言支持，通过自动化机制提供了包括简体中文在内的 50 多种语言版本，极大地降低了全球不同背景用户的学习门槛。此外，项目采用开源协作模式，社区活跃且内容持续更新，确保学习者能获取前沿且准确的技术资讯。如果你正寻找一条清晰、友好且专业的机器学习入门之路，ML-For-Beginners 将是理想的起点。",84991,"2026-04-05T10:45:23",[43,128,129,130,44,131,42,45,132],"数据工具","视频","插件","其他","音频",{"id":134,"name":135,"github_repo":136,"description_zh":137,"stars":138,"difficulty_score":30,"last_commit_at":139,"category_tags":140,"status":55},3128,"ragflow","infiniflow\u002Fragflow","RAGFlow 是一款领先的开源检索增强生成（RAG）引擎，旨在为大语言模型构建更精准、可靠的上下文层。它巧妙地将前沿的 RAG 技术与智能体（Agent）能力相结合，不仅支持从各类文档中高效提取知识，还能让模型基于这些知识进行逻辑推理和任务执行。\n\n在大模型应用中，幻觉问题和知识滞后是常见痛点。RAGFlow 通过深度解析复杂文档结构（如表格、图表及混合排版），显著提升了信息检索的准确度，从而有效减少模型“胡编乱造”的现象，确保回答既有据可依又具备时效性。其内置的智能体机制更进一步，使系统不仅能回答问题，还能自主规划步骤解决复杂问题。\n\n这款工具特别适合开发者、企业技术团队以及 AI 研究人员使用。无论是希望快速搭建私有知识库问答系统，还是致力于探索大模型在垂直领域落地的创新者，都能从中受益。RAGFlow 提供了可视化的工作流编排界面和灵活的 API 接口，既降低了非算法背景用户的上手门槛，也满足了专业开发者对系统深度定制的需求。作为基于 Apache 2.0 协议开源的项目，它正成为连接通用大模型与行业专有知识之间的重要桥梁。",77062,"2026-04-04T04:44:48",[44,43,45,42,131]]