[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-lotus-data--lotus":3,"tool-lotus-data--lotus":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 真正成长为懂上",140436,2,"2026-04-05T23:32:43",[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 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",107662,"2026-04-03T11:11:01",[14,15,13],{"id":45,"name":46,"github_repo":47,"description_zh":48,"stars":49,"difficulty_score":10,"last_commit_at":50,"category_tags":51,"status":17},4292,"Deep-Live-Cam","hacksider\u002FDeep-Live-Cam","Deep-Live-Cam 是一款专注于实时换脸与视频生成的开源工具，用户仅需一张静态照片，即可通过“一键操作”实现摄像头画面的即时变脸或制作深度伪造视频。它有效解决了传统换脸技术流程繁琐、对硬件配置要求极高以及难以实时预览的痛点，让高质量的数字内容创作变得触手可及。\n\n这款工具不仅适合开发者和技术研究人员探索算法边界，更因其极简的操作逻辑（仅需三步：选脸、选摄像头、启动），广泛适用于普通用户、内容创作者、设计师及直播主播。无论是为了动画角色定制、服装展示模特替换，还是制作趣味短视频和直播互动，Deep-Live-Cam 都能提供流畅的支持。\n\n其核心技术亮点在于强大的实时处理能力，支持口型遮罩（Mouth Mask）以保留使用者原始的嘴部动作，确保表情自然精准；同时具备“人脸映射”功能，可同时对画面中的多个主体应用不同面孔。此外，项目内置了严格的内容安全过滤机制，自动拦截涉及裸露、暴力等不当素材，并倡导用户在获得授权及明确标注的前提下合规使用，体现了技术发展与伦理责任的平衡。",88924,"2026-04-06T03:28:53",[14,15,13,52],"视频",{"id":54,"name":55,"github_repo":56,"description_zh":57,"stars":58,"difficulty_score":32,"last_commit_at":59,"category_tags":60,"status":17},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",[14,35],{"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":72,"owner_avatar_url":73,"owner_bio":74,"owner_company":74,"owner_location":74,"owner_email":74,"owner_twitter":74,"owner_website":74,"owner_url":75,"languages":76,"stars":81,"forks":82,"last_commit_at":83,"license":84,"difficulty_score":32,"env_os":85,"env_gpu":86,"env_ram":87,"env_deps":88,"category_tags":98,"github_topics":99,"view_count":32,"oss_zip_url":74,"oss_zip_packed_at":74,"status":17,"created_at":109,"updated_at":110,"faqs":111,"releases":140},4353,"lotus-data\u002Flotus","lotus","AI-Powered Data Processing: Use LOTUS to process all of your datasets with LLMs and embeddings. Enjoy up to 1000x speedups with fast, accurate query processing, that's as simple as writing Pandas code","Lotus 是一款专为高效处理混合数据而设计的 AI 框架，全称为\"LLMs Over Text, Unstructured and Structured Data\"。它旨在解决传统方法在处理非结构化文本与结构化数据结合时效率低下、代码复杂的痛点，让用户能轻松利用大语言模型（LLM）和嵌入技术对各类数据集进行深度分析。\n\n无论是开发者还是数据研究人员，只要熟悉 Pandas 库，就能无缝上手 Lotus。它提供了一套直观的类 Pandas API，将复杂的 AI 任务（如文档提取、图像分类、RAG 检索增强生成及复杂的研究综合）简化为几行代码。用户只需通过自然语言表达式（langex）定义逻辑，即可调用强大的“语义算子”来处理数据。\n\nLotus 的核心技术亮点在于其独创的优化算法，能在保证高准确率的前提下，实现高达 1000 倍的查询加速。它将关系型数据库中成熟的算子理念延伸至 AI 驱动的非结构化数据处理领域，既保留了声明式编程的简洁性，又提供了坚实的性能与准确性保障。如果你希望在数据密集型 AI 应用中兼顾开发效率与运行速度，Lotus 是一个值得尝试的强大工具。","# LOTUS: Fast, Easy and Accurate LLM-Powered Data Processing\n\u003C!--- BADGES: START --->\n\u003C!--[![Colab Demo](https:\u002F\u002Fcolab.research.google.com\u002Fassets\u002Fcolab-badge.svg)](https:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1OzoJXH13aOwNOIEemClxzNCNYnqSGxVl?usp=sharing)-->\n[![Colab Demo](https:\u002F\u002Fcolab.research.google.com\u002Fassets\u002Fcolab-badge.svg)](https:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1mP65YHHdD6mnZmC5-Uqm2uCXJ4-Kbkhu?usp=sharing)\n[![Arxiv](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FarXiv-2407.11418-B31B1B.svg)][#arxiv-paper-package]\n[![Discord](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDiscord-Join-5865F2?logo=discord&logoColor=white)](https:\u002F\u002Fdiscord.gg\u002FZWQBurm5bt)\n[![Documentation Status](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Flotus-data_lotus_readme_13d664e1afd7.png)](https:\u002F\u002Flotus-ai.readthedocs.io\u002Fen\u002Flatest\u002F?badge=latest)\n[![PyPI - Python Version](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fpyversions\u002Flotus-ai)][#pypi-package]\n[![PyPI](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Flotus-ai)][#pypi-package]\n\n[#license-gh-package]: https:\u002F\u002Flbesson.mit-license.org\u002F\n[#arxiv-paper-package]: https:\u002F\u002Farxiv.org\u002Fabs\u002F2407.11418\n[#pypi-package]: https:\u002F\u002Fpypi.org\u002Fproject\u002Flotus-ai\u002F\n[#slack]: https:\u002F\u002Fjoin.slack.com\u002Ft\u002Flotus-fnm8919\u002Fshared_invite\u002Fzt-319k232lx-nEcLF~5w274dcQLmw2Wqyg\n[#discord]: https:\u002F\u002Fdiscord.gg\u002FZWQBurm5bt\n\u003C!--- BADGES: END --->\n\nLOTUS is the framework that allows you to easily process your datasets, including unstructured and structured data, with LLMs. It provides an **intuitive Pandas-like API**, offers algorithms for **optimizing your programs for up to 1000x speedups**, and makes LLM-based data processing **robust with accuracy guarantees** with respect to high-quality reference algorithms.\n\nLOTUS stands for **L**LMs **O**ver **T**ext, **U**nstructured and **S**tructured Data, and it introduces [**semantic operators**](https:\u002F\u002Farxiv.org\u002Fabs\u002F2407.11418). Semantic operators extend the core philosophy of relational operators—designed for declarative and robust _structured-data_ processing—to _unstructured-data_ processing with AI. Semantic operators are expressive, allowing you to easily capture all of your data-intensive AI programs, from simple RAG, to document extraction, image classification, LLM-judge evals, unstructured data analysis, complex research-based synthesis and more.\n\nFor trouble-shooting or feature requests, please raise an issue and we'll get to it promptly. To share feedback and applications you're working on, you can send us a message on our [community discord][#discord], or send an email (lianapat@stanford.edu).\n\n# Installation\n\n## Using uv (Recommended)\nFor the latest stable release:\n```bash\n# Install uv if you haven't already\ncurl -LsSf https:\u002F\u002Fastral.sh\u002Fuv\u002Finstall.sh | sh\n\n# Create a new project or navigate to your existing project\nuv add lotus-ai\n```\n\nFor the latest features:\n```bash\nuv add git+https:\u002F\u002Fgithub.com\u002Flotus-data\u002Flotus.git@main\n```\n\n## Using pip\nFor the latest stable release:\n```bash\nconda create -n lotus python=3.10 -y\nconda activate lotus\npip install lotus-ai\n```\n\nFor the latest features, you can alternatively install as follows:\n```bash\nconda create -n lotus python=3.10 -y\nconda activate lotus\npip install git+https:\u002F\u002Fgithub.com\u002Flotus-data\u002Flotus.git@main\n```\n\n\n## Running on Mac\nIf you are running on mac and using pip, please install Faiss via conda:\n\n### CPU-only version\n```bash\nconda install -c pytorch faiss-cpu=1.8.0\n```\n\n### GPU(+CPU) version\n```bash\nconda install -c pytorch -c nvidia faiss-gpu=1.8.0\n```\n\nIf you're using uv, the faiss-cpu dependency will be handled automatically.\n\nFor more details, see [Installing FAISS via Conda](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ffaiss\u002Fblob\u002Fmain\u002FINSTALL.md#installing-faiss-via-conda).\n\n# Quickstart\nIf you're already familiar with Pandas, getting started will be a breeze! Below we provide a simple example using `sem_filter`. Like all semantic operators, it is specified by a **langex** (natural language expression) parameterized by one or more column names in brackets — here `{title}`. The langex for a `sem_filter` is a NL predicate, which is a natural language expression that can be evaluated to a True\u002FFalse value.\n\n```python\nimport pandas as pd\nimport lotus\nfrom lotus.models import LM\n\n# Configure the LM — export your API key before running (e.g. OPENAI_API_KEY)\nlm = LM(model=\"gpt-4.1-nano\")\nlotus.settings.configure(lm=lm)\n\n# A sample of GitHub-style issue titles from an open source project\nissues = pd.DataFrame({\n    \"title\": [\n        \"Fix typo in README\",\n        \"Add dark mode support to dashboard\",\n        \"Refactor entire auth system to use OAuth2\",\n        \"Update copyright year in LICENSE\",\n        \"Implement distributed transaction support across microservices\",\n        \"Change button color on settings page\",\n        \"Migrate database from Postgres 13 to 16 with zero downtime\",\n        \"Add missing comma in error message\",\n        \"Build custom query planner to replace third-party dependency\",\n        \"Bump lodash to fix known CVE\",\n        \"Support multi-region active-active replication\",\n        \"Remove unused import in utils.py\",\n    ]\n})\n\n# Use sem_filter to find issues approachable for a first-time contributor\ngood_first_issues = issues.sem_filter(\n    \"The {title} describes a small, self-contained task that a new open source contributor could tackle without deep knowledge of the codebase\"\n)\n\nprint(\"Good first issues for new contributors:\\n\")\nprint(good_first_issues.to_string(index=False))\n\n# Uncomment to print the total LM usage\n# lm.print_total_usage()\n\n```\n### Tutorials\n\nBelow are some short tutorials in Google Colab, to help you get started. We recommend starting with `[1] Introduction to Semantic Operators and LOTUS`, which will provide a broad overview of useful functionality to help you get started.\n\n\u003Cdiv align=\"center\">\n\n| Tutorial                                           | Difficulty                                                      | Colab Link                                                                                                                                                                                                    |\n|----------------------------------------------------|-----------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| 1. Introduction to Semantic Operators and LOTUS             | ![](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLevel-Beginner-green.svg)      | [![Open In Colab](https:\u002F\u002Fcolab.research.google.com\u002Fassets\u002Fcolab-badge.svg)](https:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1mP65YHHdD6mnZmC5-Uqm2uCXJ4-Kbkhu?usp=sharing)              |\n| 2. Failure Analysis Over Agent Traces                           | ![](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLevel-Intermediate-yellow.svg)      | [![Open In Colab](https:\u002F\u002Fcolab.research.google.com\u002Fassets\u002Fcolab-badge.svg)](https:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1EJm9A8r_ShYxR0s218J70XhsopOgeT6k?usp=sharing)   |\n| 3. System Prompt Analysis with LOTUS | ![](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLevel-Intermediate-yellow.svg)      | [![Open In Colab](https:\u002F\u002Fcolab.research.google.com\u002Fassets\u002Fcolab-badge.svg)](https:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1NSVQYOMp2GCre5ZRgvgs6BPGOa20ySMc?usp=sharing) |\n| 4. Processing Multimodal Datasets                             | ![](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLevel-Intermediate-yellow.svg) | [![Open In Colab](https:\u002F\u002Fcolab.research.google.com\u002Fassets\u002Fcolab-badge.svg)](https:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F18oaa12T6PrhHIYGw-L01gw1bDmTYaE_e)   |\n\u003C\u002Fdiv>\n\n## Key Concept: The Semantic Operator Model\nLOTUS introduces the semantic operator programming model. Semantic operators are declarative transformations over one or more datasets, parameterized by a natural language expression, that can be implemented by a variety of AI-based algorithms. Semantic operators seamlessly extend the relational model, operating over tables that may contain traditional structured data as well as unstructured fields, such as free-form text. These modular language-based operators allow you to write AI-based pipelines with high-level logic, leaving optimizations to the query engine. Each operator can be implemented and optimized in multiple ways, opening a rich space for execution plans, similar to relational operators. To learn more about the semantic operator model, read the full [research paper](https:\u002F\u002Farxiv.org\u002Fabs\u002F2407.11418).\n\nLOTUS offers a number of semantic operators in a Pandas-like API, some of which are described below. To learn more about semantic operators provided in LOTUS, check out the full [documentation](https:\u002F\u002Flotus-ai.readthedocs.io\u002Fen\u002Flatest\u002F), run the [colab tutorial](https:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1mP65YHHdD6mnZmC5-Uqm2uCXJ4-Kbkhu?usp=sharing), or you can also refer to these [examples](https:\u002F\u002Fgithub.com\u002FTAG-Research\u002Flotus\u002Ftree\u002Fmain\u002Fexamples\u002Fop_examples).\n\n\nSemantic operators provide a unified API for both **LLM-based primitives**...\n| Operator   | Description                                     |\n|------------|-------------------------------------------------|\n| sem_map      |  Map each record using a natural language projection| \n| sem_filter   | Keep records that match the natural language predicate |  \n| sem_extract  | Extract one or more attributes from each row        |\n| sem_agg      | Aggregate across all records (e.g. for summarization)             |\n| sem_topk     | Order the records by some natural langauge sorting criteria                 |\n| sem_join     | Join two datasets based on a natural language predicate       |\n\n... and **embedding-based primitives**:\n| Operator   | Description                                     |\n|------------|-------------------------------------------------|\n| sem_sim_join | Join two DataFrames based on semantic similarity             |\n| sem_search   | Perform semantic search the over a text column                |\n\n\n# Supported Models\nThere are 3 main model classes in LOTUS:\n- `LM`: The language model class.\n    - The `LM` class is built on top of the `LiteLLM` library, and supports any model that is supported by `LiteLLM`. See [this page](CONTRIBUTING.md) for examples of using models on `OpenAI`, `Ollama`, and `vLLM`. Any provider supported by `LiteLLM` should work. Check out [litellm's documentation](https:\u002F\u002Flitellm.vercel.app) for more information.\n- `RM`: The retrieval model class.\n    - Any model from `SentenceTransformers` can be used with the `SentenceTransformersRM` class, by passing the model name to the `model` parameter (see [an example here](examples\u002Fop_examples\u002Fdedup.py)). Additionally, `LiteLLMRM` can be used with any model supported by `LiteLLM` (see [an example here](examples\u002Fop_examples\u002Fsim_join.py)).\n- `Reranker`: The reranker model class.\n    - Any `CrossEncoder` from `SentenceTransformers` can be used with the `CrossEncoderReranker` class, by passing the model name to the `model` parameter (see [an example here](examples\u002Fop_examples\u002Fsearch.py)).\n\n# Contributing\n\nWe welcome contributions from the community! Whether you're reporting bugs, suggesting features, or contributing code, we have comprehensive templates and guidelines to help you get started.\n\n## Getting Started\n\nBefore contributing, please:\n\n1. **Read our [Contributing Guide](CONTRIBUTING.md)** - Comprehensive guidelines for contributors\n2. **Check existing issues** - Avoid duplicates by searching existing issues and pull requests\n3. **Join our community** - Connect with us on [Discord][#discord]\n\n## Community\n\n- **Discord**: [Join our community][#discord]\n- **Email**: lianapat@stanford.edu\n- **Discussions**: [GitHub Discussions](https:\u002F\u002Fgithub.com\u002Flotus-data\u002Flotus\u002Fdiscussions)\n\nWe're excited to see what you build with LOTUS! 🚀\nIf you would like to be listed as a user and have your project featured, please reach out to lianapat@stanford.edu.\n\n# References\nFor recent updates related to LOTUS, follow [@lianapatel_](https:\u002F\u002Fx.com\u002Flianapatel_) on X.\n\nIf you find LOTUS or semantic operators useful, we'd appreciate if you can please cite this work as follows:\n```bibtex\n@article{patel2025semanticoptimization,\n    title = {Semantic Operators and Their Optimization: Enabling LLM-Based Data Processing with Accuracy Guarantees in LOTUS},\n    author = {Patel, Liana and Jha, Siddharth and Pan, Melissa and Gupta, Harshit and Asawa, Parth and Guestrin, Carlos and Zaharia, Matei},\n    year = {2025},\n    journal = {Proc. VLDB Endow.},\n    url = {https:\u002F\u002Fdoi.org\u002F10.14778\u002F3749646.3749685},\n}\n@article{patel2024semanticoperators,\n      title={Semantic Operators: A Declarative Model for Rich, AI-based Analytics Over Text Data},\n      author={Liana Patel and Siddharth Jha and Parth Asawa and Melissa Pan and Carlos Guestrin and Matei Zaharia},\n      year={2024},\n      eprint={2407.11418},\n      url={https:\u002F\u002Farxiv.org\u002Fabs\u002F2407.11418},\n}\n```\n","# LOTUS：快速、简单且精准的LLM驱动数据处理\n\u003C!--- 标签：开始 --->\n\u003C!--[![Colab演示](https:\u002F\u002Fcolab.research.google.com\u002Fassets\u002Fcolab-badge.svg)](https:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1OzoJXH13aOwNOIEemClxzNCNYnqSGxVl?usp=sharing)-->\n[![Colab演示](https:\u002F\u002Fcolab.research.google.com\u002Fassets\u002Fcolab-badge.svg)](https:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1mP65YHHdD6mnZmC5-Uqm2uCXJ4-Kbkhu?usp=sharing)\n[![Arxiv](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FarXiv-2407.11418-B31B1B.svg)][#arxiv-paper-package]\n[![Discord](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDiscord-Join-5865F2?logo=discord&logoColor=white)](https:\u002F\u002Fdiscord.gg\u002FZWQBurm5bt)\n[![文档状态](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Flotus-data_lotus_readme_13d664e1afd7.png)](https:\u002F\u002Flotus-ai.readthedocs.io\u002Fen\u002Flatest\u002F?badge=latest)\n[![PyPI - Python版本](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fpyversions\u002Flotus-ai)][#pypi-package]\n[![PyPI](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Flotus-ai)][#pypi-package]\n\n[#license-gh-package]: https:\u002F\u002Flbesson.mit-license.org\u002F\n[#arxiv-paper-package]: https:\u002F\u002Farxiv.org\u002Fabs\u002F2407.11418\n[#pypi-package]: https:\u002F\u002Fpypi.org\u002Fproject\u002Flotus-ai\u002F\n[#slack]: https:\u002F\u002Fjoin.slack.com\u002Ft\u002Flotus-fnm8919\u002Fshared_invite\u002Fzt-319k232lx-nEcLF~5w274dcQLmw2Wqyg\n[#discord]: https:\u002F\u002Fdiscord.gg\u002FZWQBurm5bt\n\u003C!--- 标签：结束 --->\n\nLOTUS是一个框架，使您能够轻松地使用LLM处理数据集，包括非结构化和结构化数据。它提供了一个**直观的类似Pandas的API**，提供了用于**将程序优化至最高1000倍加速**的算法，并通过与高质量参考算法相关的准确性保证，使基于LLM的数据处理变得**稳健可靠**。\n\nLOTUS代表**L**LMs **O**ver **T**ext, **U**nstructured and **S**tructured Data，它引入了[**语义运算符**](https:\u002F\u002Farxiv.org\u002Fabs\u002F2407.11418)。语义运算符将关系运算符的核心理念——专为声明式和稳健的_结构化数据_处理而设计——扩展到使用AI进行的_非结构化数据_处理。语义运算符表达力强大，可让您轻松实现所有数据密集型AI程序，从简单的RAG、文档提取、图像分类、LLM评判评估、非结构化数据分析，到复杂的研究型综合等。\n\n如遇问题或有功能需求，请提交问题，我们将尽快处理。如需分享反馈或您正在进行的应用，请在我们的[社区Discord][#discord]上留言，或发送邮件至lianapat@stanford.edu。\n\n# 安装\n\n## 使用uv（推荐）\n获取最新稳定版：\n```bash\n# 如果尚未安装uv，请先安装\ncurl -LsSf https:\u002F\u002Fastral.sh\u002Fuv\u002Finstall.sh | sh\n\n# 创建新项目或进入现有项目\nuv add lotus-ai\n```\n\n获取最新功能版：\n```bash\nuv add git+https:\u002F\u002Fgithub.com\u002Flotus-data\u002Flotus.git@main\n```\n\n## 使用pip\n获取最新稳定版：\n```bash\nconda create -n lotus python=3.10 -y\nconda activate lotus\npip install lotus-ai\n```\n\n若要获取最新功能版，也可按以下方式安装：\n```bash\nconda create -n lotus python=3.10 -y\nconda activate lotus\npip install git+https:\u002F\u002Fgithub.com\u002Flotus-data\u002Flotus.git@main\n```\n\n\n## 在Mac上运行\n如果您在Mac上使用pip，请通过conda安装Faiss：\n\n### 仅CPU版本\n```bash\nconda install -c pytorch faiss-cpu=1.8.0\n```\n\n### GPU(+CPU)版本\n```bash\nconda install -c pytorch -c nvidia faiss-gpu=1.8.0\n```\n\n如果您使用uv，faiss-cpu依赖项将自动处理。\n\n更多详情请参阅[通过Conda安装FAISS](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ffaiss\u002Fblob\u002Fmain\u002FINSTALL.md#installing-faiss-via-conda)。\n\n# 快速入门\n如果您已经熟悉Pandas，那么上手将会非常容易！下面我们提供一个使用`sem_filter`的简单示例。与所有语义运算符一样，它由一个**langex**参数指定，该参数以方括号中的一个或多个列名进行参数化——此处为`{title}`。`sem_filter`的langex是一个NL谓词，即可以评估为真\u002F假值的自然语言表达式。\n\n```python\nimport pandas as pd\nimport lotus\nfrom lotus.models import LM\n\n# 配置LM — 运行前请导出您的API密钥（例如OPENAI_API_KEY）\nlm = LM(model=\"gpt-4.1-nano\")\nlotus.settings.configure(lm=lm)\n\n# 来自开源项目的GitHub风格议题标题样本\nissues = pd.DataFrame({\n    \"title\": [\n        \"修复README中的拼写错误\",\n        \"为仪表板添加暗模式支持\",\n        \"重构整个认证系统以使用OAuth2\",\n        \"更新LICENSE中的版权年份\",\n        \"在微服务间实现分布式事务支持\",\n        \"更改设置页面上的按钮颜色\",\n        \"将数据库从Postgres 13无缝迁移到16\",\n        \"在错误信息中添加缺失的逗号\",\n        \"构建自定义查询计划器以替代第三方依赖\",\n        \"升级lodash以修复已知CVE漏洞\",\n        \"支持多区域主动-主动复制\",\n        \"移除utils.py中未使用的导入\"\n    ]\n})\n\n# 使用sem_filter查找适合首次贡献者的议题\ngood_first_issues = issues.sem_filter(\n    \"该{title}描述了一项小型、独立的任务，新的开源贡献者无需深入了解代码库即可完成\"\n)\n\nprint(\"适合新贡献者的优质议题：\\n\")\nprint(good_first_issues.to_string(index=False))\n\n# 如需打印总LLM用量，请取消注释\n# lm.print_total_usage()\n\n```\n\n### 教程\n\n以下是几个在 Google Colab 中的简短教程，帮助您快速上手。我们建议从 `[1] 语义算子与 LOTUS 简介` 开始，它将为您提供有用功能的概览，助您顺利入门。\n\n\u003Cdiv align=\"center\">\n\n| 教程                                           | 难度                                                      | Colab 链接                                                                                                                                                                                                    |\n|----------------------------------------------------|-----------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| 1. 语义算子与 LOTUS 简介             | ![](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLevel-Beginner-green.svg)      | [![在 Colab 中打开](https:\u002F\u002Fcolab.research.google.com\u002Fassets\u002Fcolab-badge.svg)](https:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1mP65YHHdD6mnZmC5-Uqm2uCXJ4-Kbkhu?usp=sharing)              |\n| 2. 基于智能体轨迹的故障分析                           | ![](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLevel-Intermediate-yellow.svg)      | [![在 Colab 中打开](https:\u002F\u002Fcolab.research.google.com\u002Fassets\u002Fcolab-badge.svg)](https:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1EJm9A8r_ShYxR0s218J70XhsopOgeT6k?usp=sharing)   |\n| 3. 使用 LOTUS 进行系统提示分析 | ![](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLevel-Intermediate-yellow.svg)      | [![在 Colab 中打开](https:\u002F\u002Fcolab.research.google.com\u002Fassets\u002Fcolab-badge.svg)](https:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1NSVQYOMp2GCre5ZRgvgs6BPGOa20ySMc?usp=sharing) |\n| 4. 处理多模态数据集                             | ![](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLevel-Intermediate-yellow.svg) | [![在 Colab 中打开](https:\u002F\u002Fcolab.research.google.com\u002Fassets\u002Fcolab-badge.svg)](https:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F18oaa12T6PrhHIYGw-L01gw1bDmTYaE_e)   |\n\u003C\u002Fdiv>\n\n## 核心概念：语义算子模型\nLOTUS 引入了语义算子编程模型。语义算子是对一个或多个数据集进行声明式转换的操作，由自然语言表达式参数化，并可通过多种基于 AI 的算法实现。语义算子无缝扩展了关系模型，可在包含传统结构化数据以及自由文本等非结构化字段的表上运行。这些基于语言的模块化算子使您可以使用高级逻辑编写基于 AI 的管道，而将优化工作交由查询引擎完成。每个算子都可以通过多种方式实现和优化，从而为执行计划提供了丰富的可能性，类似于关系算子。要深入了解语义算子模型，请阅读完整的[研究论文](https:\u002F\u002Farxiv.org\u002Fabs\u002F2407.11418)。\n\nLOTUS 提供了一系列类似 Pandas API 的语义算子，其中部分如下所述。如需了解更多关于 LOTUS 中提供的语义算子的信息，请查阅完整的[文档](https:\u002F\u002Flotus-ai.readthedocs.io\u002Fen\u002Flatest\u002F)、运行[Colab 教程](https:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1mP65YHHdD6mnZmC5-Uqm2uCXJ4-Kbkhu?usp=sharing)，或参考这些[示例](https:\u002F\u002Fgithub.com\u002FTAG-Research\u002Flotus\u002Ftree\u002Fmain\u002Fexamples\u002Fop_examples)。\n\n语义算子为**基于 LLM 的原语**提供统一的 API……\n| 算子   | 描述                                     |\n|------------|-------------------------------------------------|\n| sem_map      | 使用自然语言投影映射每条记录| \n| sem_filter   | 保留符合自然语言谓词的记录 |  \n| sem_extract  | 从每行提取一个或多个属性        |\n| sem_agg      | 对所有记录进行聚合（例如用于汇总）             |\n| sem_topk     | 按照某种自然语言排序标准对记录排序                 |\n| sem_join     | 根据自然语言谓词连接两个数据集       |\n\n……以及**基于嵌入的原语**：\n| 算子   | 描述                                     |\n|------------|-------------------------------------------------|\n| sem_sim_join | 根据语义相似度连接两个 DataFrame             |\n| sem_search   | 在文本列中执行语义搜索                |\n\n\n# 支持的模型\nLOTUS 中有 3 类主要模型：\n- `LM`：语言模型类。\n    - `LM` 类构建于 `LiteLLM` 库之上，支持任何被 `LiteLLM` 支持的模型。请参阅[此页面](CONTRIBUTING.md)，了解如何使用 `OpenAI`、`Ollama` 和 `vLLM` 等模型的示例。任何被 `LiteLLM` 支持的提供商都应能正常工作。更多信息请参阅 [litellm 的文档](https:\u002F\u002Flitellm.vercel.app)。\n- `RM`：检索模型类。\n    - 可以使用 `SentenceTransformers` 中的任何模型与 `SentenceTransformersRM` 类一起使用，只需将模型名称传递给 `model` 参数即可（参见[此处的示例](examples\u002Fop_examples\u002Fdedup.py)）。此外，`LiteLLMRM` 也可与任何被 `LiteLLM` 支持的模型一起使用（参见[此处的示例](examples\u002Fop_examples\u002Fsim_join.py)）。\n- `Reranker`：重排序模型类。\n    - 可以使用 `SentenceTransformers` 中的任何 `CrossEncoder` 与 `CrossEncoderReranker` 类一起使用，只需将模型名称传递给 `model` 参数即可（参见[此处的示例](examples\u002Fop_examples\u002Fsearch.py)）。\n\n# 贡献\n我们欢迎社区的贡献！无论您是报告 bug、提出功能建议，还是贡献代码，我们都准备了全面的模板和指南来帮助您开始。\n\n## 入门指南\n在开始贡献之前，请：\n\n1. **阅读我们的[贡献指南](CONTRIBUTING.md)** - 为贡献者提供的全面指南\n2. **检查现有问题** - 通过搜索现有问题和拉取请求避免重复\n3. **加入我们的社区** - 通过[Discord][#discord]与我们联系\n\n## 社区\n- **Discord**: [加入我们的社区][#discord]\n- **电子邮件**: lianapat@stanford.edu\n- **讨论**: [GitHub 讨论](https:\u002F\u002Fgithub.com\u002Flotus-data\u002Flotus\u002Fdiscussions)\n\n我们非常期待看到您使用 LOTUS 构建的内容！🚀\n如果您希望被列入用户名单并展示您的项目，请联系 lianapat@stanford.edu。\n\n# 参考文献\n如需了解 LOTUS 的最新动态，请在 X 平台上关注 [@lianapatel_]。\n\n如果您认为 LOTUS 或语义算子很有用，我们诚挚地希望您能按以下方式引用本工作：\n```bibtex\n@article{patel2025semanticoptimization,\n    title = {语义算子及其优化：在 LOTUS 中实现具有准确率保证的基于大语言模型的数据处理},\n    author = {Patel, Liana and Jha, Siddharth and Pan, Melissa and Gupta, Harshit and Asawa, Parth and Guestrin, Carlos and Zaharia, Matei},\n    year = {2025},\n    journal = {Proc. VLDB Endow.},\n    url = {https:\u002F\u002Fdoi.org\u002F10.14778\u002F3749646.3749685},\n}\n@article{patel2024semanticoperators,\n      title={语义算子：面向文本数据的丰富、基于 AI 的分析的声明式模型},\n      author={Liana Patel 和 Siddharth Jha、Parth Asawa、Melissa Pan、Carlos Guestrin 以及 Matei Zaharia},\n      year={2024},\n      eprint={2407.11418},\n      url={https:\u002F\u002Farxiv.org\u002Fabs\u002F2407.11418},\n}\n```","# LOTUS 快速上手指南\n\nLOTUS 是一个基于大语言模型（LLM）的数据处理框架，专为处理非结构化和结构化数据设计。它提供类似 Pandas 的直观 API，支持通过自然语言表达式（Semantic Operators）对数据进行过滤、映射、提取和聚合等操作，并内置优化算法以提升执行效率。\n\n## 环境准备\n\n- **操作系统**：Linux、macOS 或 Windows\n- **Python 版本**：推荐 Python 3.10\n- **前置依赖**：\n  - `conda`（推荐用于管理环境和安装 Faiss）\n  - LLM API Key（如 OpenAI API Key，需设置为环境变量 `OPENAI_API_KEY`）\n  - Mac 用户若使用 pip 安装，需手动安装 Faiss（见安装步骤）\n\n> **注意**：国内开发者如遇网络问题，可配置 Conda 或 Pip 国内镜像源加速下载。\n> - Conda 清华源：`https:\u002F\u002Fmirrors.tuna.tsinghua.edu.cn\u002Fanaconda\u002Fpkgs\u002Fmain\u002F`\n> - Pip 清华源：`https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple`\n\n## 安装步骤\n\n### 方式一：使用 uv（推荐）\n\n`uv` 是更快的 Python 包管理工具，能自动处理依赖（包括 Faiss）。\n\n```bash\n# 安装 uv\ncurl -LsSf https:\u002F\u002Fastral.sh\u002Fuv\u002Finstall.sh | sh\n\n# 创建项目并安装 lotus-ai\nuv add lotus-ai\n```\n\n如需体验最新功能（开发版）：\n```bash\nuv add git+https:\u002F\u002Fgithub.com\u002Flotus-data\u002Flotus.git@main\n```\n\n### 方式二：使用 pip + conda\n\n```bash\n# 创建并激活虚拟环境\nconda create -n lotus python=3.10 -y\nconda activate lotus\n\n# 安装 lotus-ai\npip install lotus-ai\n```\n\n**Mac 用户特别步骤**：\n若使用 pip 安装，需单独通过 conda 安装 Faiss：\n\n*CPU 版本：*\n```bash\nconda install -c pytorch faiss-cpu=1.8.0\n```\n\n*GPU 版本：*\n```bash\nconda install -c pytorch -c nvidia faiss-gpu=1.8.0\n```\n\n## 基本使用\n\nLOTUS 的核心是“语义算子”（Semantic Operators），允许你用自然语言描述数据处理逻辑。以下示例演示如何使用 `sem_filter` 筛选适合新手的 GitHub Issue。\n\n```python\nimport pandas as pd\nimport lotus\nfrom lotus.models import LM\n\n# 1. 配置大模型 (确保已导出 OPENAI_API_KEY)\nlm = LM(model=\"gpt-4.1-nano\")\nlotus.settings.configure(lm=lm)\n\n# 2. 准备数据 (模拟 GitHub Issue 标题)\nissues = pd.DataFrame({\n    \"title\": [\n        \"Fix typo in README\",\n        \"Add dark mode support to dashboard\",\n        \"Refactor entire auth system to use OAuth2\",\n        \"Update copyright year in LICENSE\",\n        \"Implement distributed transaction support across microservices\",\n        \"Change button color on settings page\",\n        \"Migrate database from Postgres 13 to 16 with zero downtime\",\n        \"Add missing comma in error message\",\n        \"Build custom query planner to replace third-party dependency\",\n        \"Bump lodash to fix known CVE\",\n        \"Support multi-region active-active replication\",\n        \"Remove unused import in utils.py\",\n    ]\n})\n\n# 3. 使用 sem_filter 进行语义过滤\n# 语法：df.sem_filter(\"自然语言描述 {列名}\")\ngood_first_issues = issues.sem_filter(\n    \"The {title} describes a small, self-contained task that a new open source contributor could tackle without deep knowledge of the codebase\"\n)\n\n# 4. 查看结果\nprint(\"Good first issues for new contributors:\\n\")\nprint(good_first_issues.to_string(index=False))\n```\n\n### 核心语义算子速查\n\n| 算子 | 功能描述 |\n| :--- | :--- |\n| `sem_map` | 使用自然语言对每条记录进行转换\u002F映射 |\n| `sem_filter` | 保留符合自然语言谓词的记录 |\n| `sem_extract` | 从每行提取特定属性 |\n| `sem_agg` | 对所有记录进行聚合（如总结） |\n| `sem_topk` | 按自然语言标准排序并取前 K 个 |\n| `sem_join` | 基于自然语言条件连接两个数据集 |\n| `sem_sim_join` | 基于语义相似度连接两个 DataFrame |\n| `sem_search` | 在文本列上执行语义搜索 |\n\n更多高级用法请参考官方 Colab 教程或文档。","某电商数据团队需要处理十万条包含用户评论、商品描述等非结构化文本的数据集，以筛选出所有提及“电池续航差”且情感负面的反馈用于产品改进。\n\n### 没有 lotus 时\n- **开发门槛高**：工程师需手动编写复杂的正则表达式或调用原生 LLM API 循环处理，代码冗长且难以维护。\n- **执行效率极低**：逐条串行调用大模型接口，处理十万条数据耗时数天，无法满足快速迭代需求。\n- **语义理解偏差**：传统关键词匹配无法识别“电量掉得快”、“充一次用不久”等同义表达，导致大量关键漏网之鱼。\n- **缺乏优化机制**：无法自动平衡查询成本与准确率，要么花费高昂代币全量扫描，要么因采样不足导致结论失真。\n\n### 使用 lotus 后\n- **代码简洁直观**：仅需一行类似 Pandas 的 `sem_filter` 代码，配合自然语言谓词即可定义复杂筛选逻辑，上手零成本。\n- **千倍速度提升**：lotus 内置的语义算子自动优化执行计划，利用向量化和缓存技术，将原本数天的任务缩短至分钟级。\n- **精准语义捕获**：基于嵌入（Embeddings）和大模型推理，准确识别各种变相表达的负面评价，确保分析结果无死角。\n- **智能成本管控**：框架自动在准确性与计算资源间寻找最优解，在保证高召回率的同时大幅降低 Token 消耗。\n\nlotus 让开发者能用写 Pandas 的简单方式，实现大规模非结构化数据的高效、精准与大模型原生化处理。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Flotus-data_lotus_cb8c2757.png","lotus-data","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Flotus-data_5002d175.png",null,"https:\u002F\u002Fgithub.com\u002Flotus-data",[77],{"name":78,"color":79,"percentage":80},"Python","#3572A5",100,1572,139,"2026-04-03T07:48:36","Apache-2.0","Linux, macOS","非必需。支持 CPU 运行；若需 GPU 加速，需 NVIDIA GPU 并安装 faiss-gpu（依赖 CUDA，具体版本未说明，由 conda 自动管理）","未说明",{"notes":89,"python":90,"dependencies":91},"推荐使用 uv 或 conda 进行环境管理。在 macOS 上使用 pip 安装时，必须通过 conda 单独安装 Faiss（CPU 或 GPU 版本）。若使用 uv，Faiss 依赖会自动处理。该工具基于 LiteLLM，支持任何 LiteLLM 兼容的大模型提供商（如 OpenAI, Ollama, vLLM 等）。","3.10",[92,93,94,95,96,97],"lotus-ai","faiss-cpu>=1.8.0","faiss-gpu>=1.8.0","LiteLLM","SentenceTransformers","pandas",[35,16,14],[100,101,102,97,103,104,105,106,107,108],"ai-data-processing","data","llm","python","semantic-operators","semantic-search","unstructured-data","llm-data-processing","llm-document-processing","2026-03-27T02:49:30.150509","2026-04-06T18:53:51.508286",[112,117,122,127,132,136],{"id":113,"question_zh":114,"answer_zh":115,"source_url":116},19808,"如何在 Windows 或不同 Python 版本中正确安装并导入 lotus-ai？","建议使用 conda 创建干净的虚拟环境并安装。具体步骤如下：\n1. 创建环境：`conda create -n lotus python=3.10 -y`\n2. 激活环境：`conda activate lotus`\n3. 安装包：`pip install lotus-ai`\n4. 在代码中使用 `import lotus` 进行导入。\n如果仍然遇到问题，请确保已正确导出 API 密钥，并参考官方快速开始示例代码进行验证。","https:\u002F\u002Fgithub.com\u002Flotus-data\u002Flotus\u002Fissues\u002F195",{"id":118,"question_zh":119,"answer_zh":120,"source_url":121},19809,"如何在 Lotus 中使用通过 vLLM 部署的 Qwen 模型（解决 'model isn't mapped yet' 错误）？","有两种主要解决方法：\n方法一（推荐）：启动 vLLM 时使用 `--served-model-name` 参数指定一个简单的模型名称（例如 `qwen`），然后在 Lotus 初始化时使用该名称：\n```python\nlm = LM(model='hosted_vllm\u002Fqwen', api_base='http:\u002F\u002Flocalhost:8010\u002Fv1')\n```\n方法二（临时修补）：修改本地 LiteLLM 库源码。找到 `litellm\u002Futils.py` 文件中的 `_get_model_info_helper` 函数，将判断条件 `if custom_llm_provider == \"huggingface\":` 修改为 `if custom_llm_provider == \"huggingface\" or custom_llm_provider == \"hosted_vllm\":`，以支持 hosted_vllm 提供商。","https:\u002F\u002Fgithub.com\u002Flotus-data\u002Flotus\u002Fissues\u002F94",{"id":123,"question_zh":124,"answer_zh":125,"source_url":126},19810,"如何配置 Lotus 以使用自定义缓存（如 SQLite）和特定的语言模型及检索模型？","可以通过 `CacheConfig` 和 `CacheFactory` 创建缓存实例，并在初始化 `LM` 时传入。完整配置示例如下：\n```python\nfrom lotus.models import LM, CacheConfig, CacheType, CacheFactory\nimport lotus\n\n# 配置缓存\ncache_config = CacheConfig(cache_type=CacheType.SQLITE, max_size=1000)\ncache = CacheFactory.create_cache(cache_config)\n\n# 初始化 LM 并绑定缓存\nlm = LM(\n    api_key=\"YOUR_API_KEY\",\n    model=\"gpt-4o-mini\",\n    cache=cache,\n)\n\n# 配置全局设置\nlotus.settings.configure(\n    lm=lm,\n    rm=lotus.models.LiteLLMRM(model=\"text-embedding-3-small\")\n)\n```\n此配置允许模型调用被缓存，从而减少重复调用的成本。","https:\u002F\u002Fgithub.com\u002Flotus-data\u002Flotus\u002Fissues\u002F127",{"id":128,"question_zh":129,"answer_zh":130,"source_url":131},19811,"Lotus 是否支持将 DataFrame 序列化为 JSON 或 XML 格式以提升模型效果？","是的，Lotus 已经支持标准序列化格式。早期版本使用自定义格式，但现在可以通过设置 `serialization_format` 来使用 JSON 或 XML 等标准格式。XML 格式特别受到推荐（例如 Anthropic 建议），因为它更符合模型训练分布。该功能已通过相关 PR 合并，利用 pandas 内置的 `to_xml` 等功能实现。用户可以在任务指令配置中指定所需的序列化格式。","https:\u002F\u002Fgithub.com\u002Flotus-data\u002Flotus\u002Fissues\u002F40",{"id":133,"question_zh":134,"answer_zh":135,"source_url":116},19812,"如何在运行 Lotus 管道后查看总的 LLM Token 消耗量？","配置好语言模型（LM）后，可以直接调用 `lm.print_total_usage()` 方法来打印总的输入和输出 Token 消耗量。示例代码如下：\n```python\nimport lotus\nfrom lotus.models import LM\n\nlm = LM(model=\"gpt-4o-mini\")\nlotus.settings.configure(lm=lm)\n\n# ... 执行你的 lotus 管道操作 ...\n\n# 打印总用量\nlm.print_total_usage()\n```\n这将显示累积的 Token 使用情况，帮助监控成本。",{"id":137,"question_zh":138,"answer_zh":139,"source_url":116},19813,"如何使用 Lotus 执行语义连接（sem_join）操作？","首先配置好 LM 和 RM（检索模型），然后直接在 pandas DataFrame 上调用 `.sem_join()` 方法。需要提供一个包含占位符的自然语言描述字符串来定义连接逻辑。示例如下：\n```python\nimport pandas as pd\nimport lotus\nfrom lotus.models import LM\n\n# 配置模型\nlm = LM(model=\"gpt-4o-mini\")\nlotus.settings.configure(lm=lm)\n\n# 准备数据\ncourses_df = pd.DataFrame({\"Course Name\": [\"History of the Atlantic World\", \"Riemannian Geometry\"]})\nskills_df = pd.DataFrame({\"Skill\": [\"Math\", \"Computer Science\"]})\n\n# 执行语义连接\n# 占位符 {Course Name} 和 {Skill} 会被实际列值替换\nres = courses_df.sem_join(skills_df, \"Taking {Course Name} will help me learn {Skill}\")\nprint(res)\n```",[141,146,151],{"id":142,"version":143,"summary_zh":144,"released_at":145},117832,"v1.1.4","## 变更内容\n* 删除 .idea 文件夹，此前因误操作被合并。由 @vincentzed 在 https:\u002F\u002Fgithub.com\u002Flotus-data\u002Flotus\u002Fpull\u002F175 中完成。\n* 为 LM 类添加显式限流功能。由 @ankitasun 在 https:\u002F\u002Fgithub.com\u002Flotus-data\u002Flotus\u002Fpull\u002F185 中完成。\n* 修复因升级 litellm 版本导致的 logprobs 错误。由 @sidjha1 在 https:\u002F\u002Fgithub.com\u002Flotus-data\u002Flotus\u002Fpull\u002F188 中完成。\n* [进行中] 支持文档分块功能。由 @StanChan03 在 https:\u002F\u002Fgithub.com\u002Flotus-data\u002Flotus\u002Fpull\u002F190 中完成。\n* [进行中] 代码清理。由 @liana313 在 https:\u002F\u002Fgithub.com\u002Flotus-data\u002Flotus\u002Fpull\u002F192 中完成。\n* 支持零样本思维链推理用于过滤。由 @sidjha1 在 https:\u002F\u002Fgithub.com\u002Flotus-data\u002Flotus\u002Fpull\u002F197 中完成。\n* 评估套件。由 @harshitgupta412 在 https:\u002F\u002Fgithub.com\u002Flotus-data\u002Flotus\u002Fpull\u002F207 中完成。\n* 修复超时问题。由 @harshitgupta412 在 https:\u002F\u002Fgithub.com\u002Flotus-data\u002Flotus\u002Fpull\u002F208 中完成。\n\n## 新贡献者\n* @vincentzed 在 https:\u002F\u002Fgithub.com\u002Flotus-data\u002Flotus\u002Fpull\u002F175 中完成了首次贡献。\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Flotus-data\u002Flotus\u002Fcompare\u002Fv1.1.3...v1.1.4","2025-10-07T00:10:57",{"id":147,"version":148,"summary_zh":149,"released_at":150},117833,"v1.1.3","## 变更内容\n* @sidjha1 在 https:\u002F\u002Fgithub.com\u002Flotus-data\u002Flotus\u002Fpull\u002F152 中添加了本地 Weaviate VS 的示例\n* @vincent-4 在 https:\u002F\u002Fgithub.com\u002Flotus-data\u002Flotus\u002Fpull\u002F154 中运行了 ruff 格式化工具\n* @ankitasun 在 https:\u002F\u002Fgithub.com\u002Flotus-data\u002Flotus\u002Fpull\u002F149 中增加了对 You.com、Bing 和 Tavily 网络搜索引擎的支持\n* @harshitgupta412 在 https:\u002F\u002Fgithub.com\u002Flotus-data\u002Flotus\u002Fpull\u002F162 中修正了 Tavily 的返回键值\n* @sidjha1 在 https:\u002F\u002Fgithub.com\u002Flotus-data\u002Flotus\u002Fpull\u002F161 中添加了关于 LLM 使用限制的文档\n* @ankitasun 在 https:\u002F\u002Fgithub.com\u002Flotus-data\u002Flotus\u002Fpull\u002F163 中添加了网络搜索引擎的相关依赖\n* @StanChan03 在 https:\u002F\u002Fgithub.com\u002Flotus-data\u002Flotus\u002Fpull\u002F142 中为 Filter 和 Map 添加了 DeepSeek CoT 支持\n* @harshitgupta412 在 https:\u002F\u002Fgithub.com\u002Flotus-data\u002Flotus\u002Fpull\u002F170 中为 sem_topk 和 sem_Agg 添加了 group by 的测试\n* @StanChan03 在 https:\u002F\u002Fgithub.com\u002Flotus-data\u002Flotus\u002Fpull\u002F171 中实现了 top_k 的 DeepSeek CoT 支持\n* @sidjha1 在 https:\u002F\u002Fgithub.com\u002Flotus-data\u002Flotus\u002Fpull\u002F153 中添加了 Qdrant VS\n* @dmatch01 在 https:\u002F\u002Fgithub.com\u002Flotus-data\u002Flotus\u002Fpull\u002F178 中更新了 CONTRIBUTING.md，以反映当前的 Git 组织结构\n* @dmatch01 在 https:\u002F\u002Fgithub.com\u002Flotus-data\u002Flotus\u002Fpull\u002F181 中更新了 requirements.txt，将 litellm 版本号升级，以修复 WatsonX 的 litellm 提供商相关 bug\n\n## 新贡献者\n* @vincent-4 在 https:\u002F\u002Fgithub.com\u002Flotus-data\u002Flotus\u002Fpull\u002F154 中完成了首次贡献\n* @ankitasun 在 https:\u002F\u002Fgithub.com\u002Flotus-data\u002Flotus\u002Fpull\u002F149 中完成了首次贡献\n* @dmatch01 在 https:\u002F\u002Fgithub.com\u002Flotus-data\u002Flotus\u002Fpull\u002F178 中完成了首次贡献\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Flotus-data\u002Flotus\u002Fcompare\u002Fv1.1.0...v1.1.3","2025-06-29T23:10:13",{"id":152,"version":153,"summary_zh":154,"released_at":155},117834,"v1.1.0","稳定版本","2025-03-15T21:52:16"]