[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-deepsense-ai--ragbits":3,"tool-deepsense-ai--ragbits":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 真正成长为懂上",146793,2,"2026-04-08T23:32:35",[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 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",108111,"2026-04-08T11:23:26",[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},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":54,"name":55,"github_repo":56,"description_zh":57,"stars":58,"difficulty_score":10,"last_commit_at":59,"category_tags":60,"status":17},4487,"LLMs-from-scratch","rasbt\u002FLLMs-from-scratch","LLMs-from-scratch 是一个基于 PyTorch 的开源教育项目，旨在引导用户从零开始一步步构建一个类似 ChatGPT 的大型语言模型（LLM）。它不仅是同名技术著作的官方代码库，更提供了一套完整的实践方案，涵盖模型开发、预训练及微调的全过程。\n\n该项目主要解决了大模型领域“黑盒化”的学习痛点。许多开发者虽能调用现成模型，却难以深入理解其内部架构与训练机制。通过亲手编写每一行核心代码，用户能够透彻掌握 Transformer 架构、注意力机制等关键原理，从而真正理解大模型是如何“思考”的。此外，项目还包含了加载大型预训练权重进行微调的代码，帮助用户将理论知识延伸至实际应用。\n\nLLMs-from-scratch 特别适合希望深入底层原理的 AI 开发者、研究人员以及计算机专业的学生。对于不满足于仅使用 API，而是渴望探究模型构建细节的技术人员而言，这是极佳的学习资源。其独特的技术亮点在于“循序渐进”的教学设计：将复杂的系统工程拆解为清晰的步骤，配合详细的图表与示例，让构建一个虽小但功能完备的大模型变得触手可及。无论你是想夯实理论基础，还是为未来研发更大规模的模型做准备",90106,"2026-04-06T11:19:32",[35,15,13,14],{"id":62,"github_repo":63,"name":64,"description_en":65,"description_zh":66,"ai_summary_zh":67,"readme_en":68,"readme_zh":69,"quickstart_zh":70,"use_case_zh":71,"hero_image_url":72,"owner_login":73,"owner_name":74,"owner_avatar_url":75,"owner_bio":76,"owner_company":77,"owner_location":77,"owner_email":77,"owner_twitter":77,"owner_website":78,"owner_url":79,"languages":80,"stars":103,"forks":104,"last_commit_at":105,"license":106,"difficulty_score":32,"env_os":107,"env_gpu":108,"env_ram":107,"env_deps":109,"category_tags":118,"github_topics":120,"view_count":32,"oss_zip_url":77,"oss_zip_packed_at":77,"status":17,"created_at":130,"updated_at":131,"faqs":132,"releases":162},5724,"deepsense-ai\u002Fragbits","ragbits","Building blocks for rapid development of GenAI applications ","Ragbits 是一套专为加速生成式 AI（GenAI）应用开发而设计的模块化构建工具。它旨在解决开发者在构建可靠、可扩展的 RAG（检索增强生成）系统和多智能体工作流时，面临的模型切换繁琐、数据处理复杂以及架构耦合度高等痛点。\n\n无论是需要快速原型的初创团队，还是追求生产级稳定性的资深工程师，Ragbits 都能提供灵活的支持。其核心优势在于极高的灵活性与工程化能力：开发者可以通过 LiteLLM 无缝切换超过 100 种大语言模型或运行本地模型，并利用 Python 泛型实现类型安全的调用，大幅减少运行时错误。在数据处理方面，Ragbits 支持解析 PDF、表格等 20 多种格式，结合视觉语言模型（VLMs）提取复杂内容，并能通过 Ray 架构实现大规模数据的分布式并行处理。\n\n此外，Ragbits 内置了基于 A2A 协议的多智能体协作机制和 MCP（模型上下文协议），让智能体能够轻松访问实时网络数据和数据库。项目还集成了 OpenTelemetry 实时监控、Promptfoo 测试框架以及命令行调试工具，帮助团队从开发到部署全程掌控应用性能。如果你希望用更少的代码搭建出结构","Ragbits 是一套专为加速生成式 AI（GenAI）应用开发而设计的模块化构建工具。它旨在解决开发者在构建可靠、可扩展的 RAG（检索增强生成）系统和多智能体工作流时，面临的模型切换繁琐、数据处理复杂以及架构耦合度高等痛点。\n\n无论是需要快速原型的初创团队，还是追求生产级稳定性的资深工程师，Ragbits 都能提供灵活的支持。其核心优势在于极高的灵活性与工程化能力：开发者可以通过 LiteLLM 无缝切换超过 100 种大语言模型或运行本地模型，并利用 Python 泛型实现类型安全的调用，大幅减少运行时错误。在数据处理方面，Ragbits 支持解析 PDF、表格等 20 多种格式，结合视觉语言模型（VLMs）提取复杂内容，并能通过 Ray 架构实现大规模数据的分布式并行处理。\n\n此外，Ragbits 内置了基于 A2A 协议的多智能体协作机制和 MCP（模型上下文协议），让智能体能够轻松访问实时网络数据和数据库。项目还集成了 OpenTelemetry 实时监控、Promptfoo 测试框架以及命令行调试工具，帮助团队从开发到部署全程掌控应用性能。如果你希望用更少的代码搭建出结构清晰、易于维护的 AI 应用，Ragbits 是一个值得尝试的专业选择。","\u003Cdiv align=\"center\">\n\n\u003Ch1>🐰 Ragbits\u003C\u002Fh1>\n\n*Building blocks for rapid development of GenAI applications*\n\n[Homepage](https:\u002F\u002Fdeepsense.ai\u002Frd-hub\u002Fragbits\u002F) | [Documentation](https:\u002F\u002Fragbits.deepsense.ai) | [Contact](https:\u002F\u002Fdeepsense.ai\u002Fcontact\u002F)\n\n\u003Ca href=\"https:\u002F\u002Ftrendshift.io\u002Frepositories\u002F13966\" target=\"_blank\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fdeepsense-ai_ragbits_readme_1145cd82417e.png\" alt=\"deepsense-ai%2Fragbits | Trendshift\" style=\"width: 250px; height: 55px;\" width=\"250\" height=\"55\"\u002F>\u003C\u002Fa>\n\n\n[![PyPI - License](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fl\u002Fragbits)](https:\u002F\u002Fpypi.org\u002Fproject\u002Fragbits)\n[![PyPI - Version](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Fragbits)](https:\u002F\u002Fpypi.org\u002Fproject\u002Fragbits)\n[![PyPI - Python Version](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fpyversions\u002Fragbits)](https:\u002F\u002Fpypi.org\u002Fproject\u002Fragbits)\n\n\u003C\u002Fdiv>\n\n---\n\n## Features\n\n### 🔨 Build Reliable & Scalable GenAI Apps\n\n- **Swap LLMs anytime** – Switch between [100+ LLMs via LiteLLM](https:\u002F\u002Fragbits.deepsense.ai\u002Fstable\u002Fhow-to\u002Fllms\u002Fuse_llms\u002F) or run [local models](https:\u002F\u002Fragbits.deepsense.ai\u002Fstable\u002Fhow-to\u002Fllms\u002Fuse_local_llms\u002F).\n- **Type-safe LLM calls** – Use Python generics to [enforce strict type safety](https:\u002F\u002Fragbits.deepsense.ai\u002Fstable\u002Fhow-to\u002Fprompts\u002Fuse_prompting\u002F#how-to-configure-prompts-output-data-type) in model interactions.\n- **Bring your own vector store** – Connect to [Qdrant](https:\u002F\u002Fragbits.deepsense.ai\u002Fstable\u002Fapi_reference\u002Fcore\u002Fvector-stores\u002F#ragbits.core.vector_stores.qdrant.QdrantVectorStore), [PgVector](https:\u002F\u002Fragbits.deepsense.ai\u002Fstable\u002Fapi_reference\u002Fcore\u002Fvector-stores\u002F#ragbits.core.vector_stores.pgvector.PgVectorStore), and more with built-in support.\n- **Developer tools included** – [Manage vector stores](https:\u002F\u002Fragbits.deepsense.ai\u002Fstable\u002Fcli\u002Fmain\u002F#ragbits-vector-store), query pipelines, and [test prompts from your terminal](https:\u002F\u002Fragbits.deepsense.ai\u002Fstable\u002Fquickstart\u002Fquickstart1_prompts\u002F#testing-the-prompt-from-the-cli).\n- **Modular installation** – Install only what you need, reducing dependencies and improving performance.\n\n### 📚 Fast & Flexible RAG Processing\n\n- **Ingest 20+ formats** – Process PDFs, HTML, spreadsheets, presentations, and more. Process data using [Docling](https:\u002F\u002Fgithub.com\u002Fdocling-project\u002Fdocling), [Unstructured](https:\u002F\u002Fgithub.com\u002FUnstructured-IO\u002Funstructured) or create a custom parser.\n- **Handle complex data** – Extract tables, images, and structured content with built-in VLMs support.\n- **Connect to any data source** – Use prebuilt connectors for S3, GCS, Azure, or implement your own.\n- **Scale ingestion** – Process large datasets quickly with [Ray-based parallel processing](https:\u002F\u002Fragbits.deepsense.ai\u002Fstable\u002Fhow-to\u002Fdocument_search\u002Fdistributed_ingestion\u002F#how-to-ingest-documents-in-a-distributed-fashion).\n\n### 🤖 Build Multi-Agent Workflows with Ease\n\n- **Multi-agent coordination** – Create teams of specialized agents with role-based collaboration using [A2A protocol](https:\u002F\u002Fragbits.deepsense.ai\u002Fstable\u002Ftutorials\u002Fagents) for interoperability.\n- **Real-time data integration** – Leverage [Model Context Protocol (MCP)](https:\u002F\u002Fragbits.deepsense.ai\u002Fstable\u002Fhow-to\u002Fagents\u002Fprovide_mcp_tools) for live web access, database queries, and API integrations.\n- **Conversation state management** – Maintain context across interactions with [automatic history tracking](https:\u002F\u002Fragbits.deepsense.ai\u002Fstable\u002Fhow-to\u002Fagents\u002Fdefine_and_use_agents\u002F#conversation-history).\n\n### 🚀 Deploy & Monitor with Confidence\n\n- **Real-time observability** – Track performance with [OpenTelemetry](https:\u002F\u002Fragbits.deepsense.ai\u002Fstable\u002Fhow-to\u002Fproject\u002Fuse_tracing\u002F#opentelemetry-trace-handler) and [CLI insights](https:\u002F\u002Fragbits.deepsense.ai\u002Fstable\u002Fhow-to\u002Fproject\u002Fuse_tracing\u002F#cli-trace-handler).\n- **Built-in testing** – Validate prompts [with promptfoo](https:\u002F\u002Fragbits.deepsense.ai\u002Fstable\u002Fhow-to\u002Fprompts\u002Fpromptfoo\u002F) before deployment.\n- **Auto-optimization** – Continuously evaluate and refine model performance.\n- **Chat UI** – Deploy [chatbot interface](https:\u002F\u002Fragbits.deepsense.ai\u002Fstable\u002Fhow-to\u002Fchatbots\u002Fapi\u002F) with API, persistance and user feedback.\n\n## Installation\n\n### Stable Release\n\nTo get started quickly, you can install the latest stable release with:\n\n```sh\npip install ragbits\n```\n\n### Nightly Builds\n\nFor the latest development features, you can install nightly builds that are automatically published from the `main` branch:\n\n```sh\npip install ragbits --pre\n```\n\n**Note:** Nightly builds include the latest features and bug fixes but may be less stable than official releases. They follow the version format `X.Y.Z.devYYYYMMDDHHMM`.\n\n### Package Contents\n\nThis is a starter bundle of packages, containing:\n\n- [`ragbits-core`](https:\u002F\u002Fgithub.com\u002Fdeepsense-ai\u002Fragbits\u002Ftree\u002Fmain\u002Fpackages\u002Fragbits-core) - fundamental tools for working with prompts, LLMs and vector databases.\n- [`ragbits-agents`](https:\u002F\u002Fgithub.com\u002Fdeepsense-ai\u002Fragbits\u002Ftree\u002Fmain\u002Fpackages\u002Fragbits-agents) - abstractions for building agentic systems.\n- [`ragbits-document-search`](https:\u002F\u002Fgithub.com\u002Fdeepsense-ai\u002Fragbits\u002Ftree\u002Fmain\u002Fpackages\u002Fragbits-document-search) - retrieval and ingestion piplines for knowledge bases.\n- [`ragbits-evaluate`](https:\u002F\u002Fgithub.com\u002Fdeepsense-ai\u002Fragbits\u002Ftree\u002Fmain\u002Fpackages\u002Fragbits-evaluate) - unified evaluation framework for Ragbits components.\n- [`ragbits-guardrails`](https:\u002F\u002Fgithub.com\u002Fdeepsense-ai\u002Fragbits\u002Ftree\u002Fmain\u002Fpackages\u002Fragbits-guardrails) - utilities for ensuring the safety and relevance of responses.\n- [`ragbits-chat`](https:\u002F\u002Fgithub.com\u002Fdeepsense-ai\u002Fragbits\u002Ftree\u002Fmain\u002Fpackages\u002Fragbits-chat) - full-stack infrastructure for building conversational AI applications.\n- [`ragbits-cli`](https:\u002F\u002Fgithub.com\u002Fdeepsense-ai\u002Fragbits\u002Ftree\u002Fmain\u002Fpackages\u002Fragbits-cli) - `ragbits` shell command for interacting with Ragbits components.\n\nAlternatively, you can use individual components of the stack by installing their respective packages.\n\n## Quickstart\n\n### Basics\n\nTo define a prompt and run LLM:\n\n```python\nimport asyncio\nfrom pydantic import BaseModel\nfrom ragbits.core.llms import LiteLLM\nfrom ragbits.core.prompt import Prompt\n\nclass QuestionAnswerPromptInput(BaseModel):\n    question: str\n\nclass QuestionAnswerPrompt(Prompt[QuestionAnswerPromptInput, str]):\n    system_prompt = \"\"\"\n    You are a question answering agent. Answer the question to the best of your ability.\n    \"\"\"\n    user_prompt = \"\"\"\n    Question: {{ question }}\n    \"\"\"\n\nllm = LiteLLM(model_name=\"gpt-4.1-nano\")\n\nasync def main() -> None:\n    prompt = QuestionAnswerPrompt(QuestionAnswerPromptInput(question=\"What are high memory and low memory on linux?\"))\n    response = await llm.generate(prompt)\n    print(response)\n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n```\n\n### Document Search\n\nTo build and query a simple vector store index:\n\n```python\nimport asyncio\nfrom ragbits.core.embeddings import LiteLLMEmbedder\nfrom ragbits.core.vector_stores import InMemoryVectorStore\nfrom ragbits.document_search import DocumentSearch\n\nembedder = LiteLLMEmbedder(model_name=\"text-embedding-3-small\")\nvector_store = InMemoryVectorStore(embedder=embedder)\ndocument_search = DocumentSearch(vector_store=vector_store)\n\nasync def run() -> None:\n    await document_search.ingest(\"web:\u002F\u002Fhttps:\u002F\u002Farxiv.org\u002Fpdf\u002F1706.03762\")\n    result = await document_search.search(\"What are the key findings presented in this paper?\")\n    print(result)\n\nif __name__ == \"__main__\":\n    asyncio.run(run())\n```\n\n### Retrieval-Augmented Generation\n\nTo build a simple RAG pipeline:\n\n```python\nimport asyncio\nfrom collections.abc import Iterable\nfrom pydantic import BaseModel\nfrom ragbits.core.embeddings import LiteLLMEmbedder\nfrom ragbits.core.llms import LiteLLM\nfrom ragbits.core.prompt import Prompt\nfrom ragbits.core.vector_stores import InMemoryVectorStore\nfrom ragbits.document_search import DocumentSearch\nfrom ragbits.document_search.documents.element import Element\n\nclass QuestionAnswerPromptInput(BaseModel):\n    question: str\n    context: Iterable[Element]\n\nclass QuestionAnswerPrompt(Prompt[QuestionAnswerPromptInput, str]):\n    system_prompt = \"\"\"\n    You are a question answering agent. Answer the question that will be provided using context.\n    If in the given context there is not enough information refuse to answer.\n    \"\"\"\n    user_prompt = \"\"\"\n    Question: {{ question }}\n    Context: {% for chunk in context %}{{ chunk.text_representation }}{%- endfor %}\n    \"\"\"\n\nllm = LiteLLM(model_name=\"gpt-4.1-nano\")\nembedder = LiteLLMEmbedder(model_name=\"text-embedding-3-small\")\nvector_store = InMemoryVectorStore(embedder=embedder)\ndocument_search = DocumentSearch(vector_store=vector_store)\n\nasync def run() -> None:\n    question = \"What are the key findings presented in this paper?\"\n\n    await document_search.ingest(\"web:\u002F\u002Fhttps:\u002F\u002Farxiv.org\u002Fpdf\u002F1706.03762\")\n    chunks = await document_search.search(question)\n\n    prompt = QuestionAnswerPrompt(QuestionAnswerPromptInput(question=question, context=chunks))\n    response = await llm.generate(prompt)\n    print(response)\n\nif __name__ == \"__main__\":\n    asyncio.run(run())\n```\n\n### Agentic RAG\n\nTo build an agentic RAG pipeline:\n\n```python\nimport asyncio\nfrom ragbits.agents import Agent\nfrom ragbits.core.embeddings import LiteLLMEmbedder\nfrom ragbits.core.llms import LiteLLM\nfrom ragbits.core.vector_stores import InMemoryVectorStore\nfrom ragbits.document_search import DocumentSearch\n\nembedder = LiteLLMEmbedder(model_name=\"text-embedding-3-small\")\nvector_store = InMemoryVectorStore(embedder=embedder)\ndocument_search = DocumentSearch(vector_store=vector_store)\n\nllm = LiteLLM(model_name=\"gpt-4.1-nano\")\nagent = Agent(llm=llm, tools=[document_search.search])\n\nasync def main() -> None:\n    await document_search.ingest(\"web:\u002F\u002Fhttps:\u002F\u002Farxiv.org\u002Fpdf\u002F1706.03762\")\n    response = await agent.run(\"What are the key findings presented in this paper?\")\n    print(response.content)\n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n```\n\n### Chat UI\n\nTo expose your GenAI application through Ragbits API:\n\n```python\nfrom collections.abc import AsyncGenerator\nfrom ragbits.agents import Agent, ToolCallResult\nfrom ragbits.chat.api import RagbitsAPI\nfrom ragbits.chat.interface import ChatInterface\nfrom ragbits.chat.interface.types import ChatContext, ChatResponse, LiveUpdateType\nfrom ragbits.core.embeddings import LiteLLMEmbedder\nfrom ragbits.core.llms import LiteLLM, ToolCall\nfrom ragbits.core.prompt import ChatFormat\nfrom ragbits.core.vector_stores import InMemoryVectorStore\nfrom ragbits.document_search import DocumentSearch\n\nembedder = LiteLLMEmbedder(model_name=\"text-embedding-3-small\")\nvector_store = InMemoryVectorStore(embedder=embedder)\ndocument_search = DocumentSearch(vector_store=vector_store)\n\nllm = LiteLLM(model_name=\"gpt-4.1-nano\")\nagent = Agent(llm=llm, tools=[document_search.search])\n\nclass MyChat(ChatInterface):\n    async def setup(self) -> None:\n        await document_search.ingest(\"web:\u002F\u002Fhttps:\u002F\u002Farxiv.org\u002Fpdf\u002F1706.03762\")\n\n    async def chat(\n        self,\n        message: str,\n        history: ChatFormat,\n        context: ChatContext,\n    ) -> AsyncGenerator[ChatResponse]:\n        async for result in agent.run_streaming(message):\n            match result:\n                case str():\n                    yield self.create_live_update(\n                        update_id=\"1\",\n                        type=LiveUpdateType.START,\n                        label=\"Answering...\",\n                    )\n                    yield self.create_text_response(result)\n                case ToolCall():\n                    yield self.create_live_update(\n                        update_id=\"2\",\n                        type=LiveUpdateType.START,\n                        label=\"Searching...\",\n                    )\n                case ToolCallResult():\n                    yield self.create_live_update(\n                        update_id=\"2\",\n                        type=LiveUpdateType.FINISH,\n                        label=\"Search\",\n                        description=f\"Found {len(result.result)} relevant chunks.\",\n                    )\n\n        yield self.create_live_update(\n            update_id=\"1\",\n            type=LiveUpdateType.FINISH,\n            label=\"Answer\",\n        )\n\nif __name__ == \"__main__\":\n    api = RagbitsAPI(MyChat)\n    api.run()\n```\n\n## Rapid development\n\nCreate Ragbits projects from templates:\n\n```sh\nuvx create-ragbits-app\n```\n\nExplore `create-ragbits-app` repo [here](https:\u002F\u002Fgithub.com\u002Fdeepsense-ai\u002Fcreate-ragbits-app). If you have a new idea for a template, feel free to contribute!\n\n## Documentation\n\n- [Tutorials](https:\u002F\u002Fragbits.deepsense.ai\u002Fstable\u002Ftutorials\u002Fintro) - Get started with Ragbits in a few minutes\n- [How-to](https:\u002F\u002Fragbits.deepsense.ai\u002Fstable\u002Fhow-to\u002Fprompts\u002Fuse_prompting) - Learn how to use Ragbits in your projects\n- [CLI](https:\u002F\u002Fragbits.deepsense.ai\u002Fstable\u002Fcli\u002Fmain) - Learn how to run Ragbits in your terminal\n- [API reference](https:\u002F\u002Fragbits.deepsense.ai\u002Fstable\u002Fapi_reference\u002Fcore\u002Fprompt) - Explore the underlying Ragbits API\n\n## Contributing\n\nWe welcome contributions! Please read [CONTRIBUTING.md](https:\u002F\u002Fgithub.com\u002Fdeepsense-ai\u002Fragbits\u002Ftree\u002Fmain\u002FCONTRIBUTING.md) for more information.\n\n## License\n\nRagbits is licensed under the [MIT License](https:\u002F\u002Fgithub.com\u002Fdeepsense-ai\u002Fragbits\u002Ftree\u002Fmain\u002FLICENSE).\n","\u003Cdiv align=\"center\">\n\n\u003Ch1>🐰 Ragbits\u003C\u002Fh1>\n\n*用于快速开发生成式AI应用的构建模块*\n\n[首页](https:\u002F\u002Fdeepsense.ai\u002Frd-hub\u002Fragbits\u002F) | [文档](https:\u002F\u002Fragbits.deepsense.ai) | [联系我们](https:\u002F\u002Fdeepsense.ai\u002Fcontact\u002F)\n\n\u003Ca href=\"https:\u002F\u002Ftrendshift.io\u002Frepositories\u002F13966\" target=\"_blank\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fdeepsense-ai_ragbits_readme_1145cd82417e.png\" alt=\"deepsense-ai%2Fragbits | Trendshift\" style=\"width: 250px; height: 55px;\" width=\"250\" height=\"55\"\u002F>\u003C\u002Fa>\n\n\n[![PyPI - 许可证](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fl\u002Fragbits)](https:\u002F\u002Fpypi.org\u002Fproject\u002Fragbits)\n[![PyPI - 版本](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Fragbits)](https:\u002F\u002Fpypi.org\u002Fproject\u002Fragbits)\n[![PyPI - Python版本](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fpyversions\u002Fragbits)](https:\u002F\u002Fpypi.org\u002Fproject\u002Fragbits)\n\n\u003C\u002Fdiv>\n\n---\n\n## 功能\n\n### 🔨 构建可靠且可扩展的生成式AI应用\n\n- **随时切换大模型** – 可通过LiteLLM在100多种大模型之间切换（[详情](https:\u002F\u002Fragbits.deepsense.ai\u002Fstable\u002Fhow-to\u002Fllms\u002Fuse_llms\u002F)），或运行本地模型（[详情](https:\u002F\u002Fragbits.deepsense.ai\u002Fstable\u002Fhow-to\u002Fllms\u002Fuse_local_llms\u002F)）。\n- **类型安全的大模型调用** – 使用Python泛型，在模型交互中强制实现严格的类型安全性（[详情](https:\u002F\u002Fragbits.deepsense.ai\u002Fstable\u002Fhow-to\u002Fprompts\u002Fuse_prompting\u002F#how-to-configure-prompts-output-data-type)）。\n- **自定义向量存储** – 内置支持连接到Qdrant（[详情](https:\u002F\u002Fragbits.deepsense.ai\u002Fstable\u002Fapi_reference\u002Fcore\u002Fvector-stores\u002F#ragbits.core.vector_stores.qdrant.QdrantVectorStore)）、PgVector（[详情](https:\u002F\u002Fragbits.deepsense.ai\u002Fstable\u002Fapi_reference\u002Fcore\u002Fvector-stores\u002F#ragbits.core.vector_stores.pgvector.PgVectorStore)）等，也可轻松集成其他向量数据库。\n- **内置开发者工具** – 可通过命令行管理向量存储（[详情](https:\u002F\u002Fragbits.deepsense.ai\u002Fstable\u002Fcli\u002Fmain\u002F#ragbits-vector-store)）、查询管道，并从终端测试提示词（[详情](https:\u002F\u002Fragbits.deepsense.ai\u002Fstable\u002Fquickstart\u002Fquickstart1_prompts\u002F#testing-the-prompt-from-the-cli)）。\n- **模块化安装** – 只需安装所需组件，减少依赖项并提升性能。\n\n### 📚 快速灵活的RAG处理\n\n- **支持20+种格式** – 可处理PDF、HTML、电子表格、演示文稿等多种文件格式。可使用Docling（[GitHub链接](https:\u002F\u002Fgithub.com\u002Fdocling-project\u002Fdocling)）、Unstructured（[GitHub链接](https:\u002F\u002Fgithub.com\u002FUnstructured-IO\u002Funstructured)）进行数据处理，或自定义解析器。\n- **处理复杂数据** – 内置视觉语言模型支持，可提取表格、图像及结构化内容。\n- **连接任意数据源** – 提供S3、GCS、Azure等预构建连接器，也可自行实现自定义连接。\n- **规模化数据摄取** – 利用基于Ray的并行处理技术，快速处理大规模数据集（[详情](https:\u002F\u002Fragbits.deepsense.ai\u002Fstable\u002Fhow-to\u002Fdocument_search\u002Fdistributed_ingestion\u002F#how-to-ingest-documents-in-a-distributed-fashion)）。\n\n### 🤖 轻松构建多智能体工作流\n\n- **多智能体协作** – 使用A2A协议创建角色分工明确的智能体团队，实现互操作性（[教程](https:\u002F\u002Fragbits.deepsense.ai\u002Fstable\u002Ftutorials\u002Fagents)）。\n- **实时数据集成** – 借助模型上下文协议（MCP），实现对网页、数据库查询及API的实时访问（[详情](https:\u002F\u002Fragbits.deepsense.ai\u002Fstable\u002Fhow-to\u002Fagents\u002Fprovide_mcp_tools)）。\n- **对话状态管理** – 通过自动历史记录跟踪功能，保持跨轮次交互的上下文一致性（[详情](https:\u002F\u002Fragbits.deepsense.ai\u002Fstable\u002Fhow-to\u002Fagents\u002Fdefine_and_use_agents\u002F#conversation-history)）。\n\n### 🚀 放心部署与监控\n\n- **实时可观测性** – 使用OpenTelemetry（[详情](https:\u002F\u002Fragbits.deepsense.ai\u002Fstable\u002Fhow-to\u002Fproject\u002Fuse_tracing\u002F#opentelemetry-trace-handler)）和CLI洞察工具（[详情](https:\u002F\u002Fragbits.deepsense.ai\u002Fstable\u002Fhow-to\u002Fproject\u002Fuse_tracing\u002F#cli-trace-handler)）追踪系统性能。\n- **内置测试工具** – 在部署前使用Promptfoo验证提示词的有效性（[详情](https:\u002F\u002Fragbits.deepsense.ai\u002Fstable\u002Fhow-to\u002Fprompts\u002Fpromptfoo\u002F)）。\n- **自动优化** – 持续评估并优化模型性能。\n- **聊天UI** – 提供完整的聊天机器人接口（[详情](https:\u002F\u002Fragbits.deepsense.ai\u002Fstable\u002Fhow-to\u002Fchatbots\u002Fapi\u002F)），支持API调用、数据持久化及用户反馈收集。\n\n## 安装\n\n### 稳定版\n\n若想快速上手，可安装最新稳定版：\n\n```sh\npip install ragbits\n```\n\n### 夜间构建版\n\n如需体验最新的开发功能，可安装从`main`分支自动发布的夜间构建版：\n\n```sh\npip install ragbits --pre\n```\n\n**注意：** 夜间构建版包含最新功能和错误修复，但稳定性可能不如正式发布版。其版本号格式为`X.Y.Z.devYYYYMMDDHHMM`。\n\n### 包含内容\n\n此入门级软件包包含以下核心组件：\n\n- [`ragbits-core`](https:\u002F\u002Fgithub.com\u002Fdeepsense-ai\u002Fragbits\u002Ftree\u002Fmain\u002Fpackages\u002Fragbits-core) - 处理提示词、大模型和向量数据库的基础工具。\n- [`ragbits-agents`](https:\u002F\u002Fgithub.com\u002Fdeepsense-ai\u002Fragbits\u002Ftree\u002Fmain\u002Fpackages\u002Fragbits-agents) - 用于构建智能体系统的抽象层。\n- [`ragbits-document-search`](https:\u002F\u002Fgithub.com\u002Fdeepsense-ai\u002Fragbits\u002Ftree\u002Fmain\u002Fpackages\u002Fragbits-document-search) - 用于知识库的检索与数据摄取管道。\n- [`ragbits-evaluate`](https:\u002F\u002Fgithub.com\u002Fdeepsense-ai\u002Fragbits\u002Ftree\u002Fmain\u002Fpackages\u002Fragbits-evaluate) - Ragbits组件的统一评估框架。\n- [`ragbits-guardrails`](https:\u002F\u002Fgithub.com\u002Fdeepsense-ai\u002Fragbits\u002Ftree\u002Fmain\u002Fpackages\u002Fragbits-guardrails) - 用于确保响应安全性和相关性的实用工具。\n- [`ragbits-chat`](https:\u002F\u002Fgithub.com\u002Fdeepsense-ai\u002Fragbits\u002Ftree\u002Fmain\u002Fpackages\u002Fragbits-chat) - 构建对话式AI应用的全栈基础设施。\n- [`ragbits-cli`](https:\u002F\u002Fgithub.com\u002Fdeepsense-ai\u002Fragbits\u002Ftree\u002Fmain\u002Fpackages\u002Fragbits-cli) - 用于与Ragbits组件交互的命令行工具。\n\n此外，您也可以单独安装各个组件以满足特定需求。\n\n## 快速入门\n\n### 基础示例\n\n定义提示词并调用大模型：\n\n```python\nimport asyncio\nfrom pydantic import BaseModel\nfrom ragbits.core.llms import LiteLLM\nfrom ragbits.core.prompt import Prompt\n\nclass QuestionAnswerPromptInput(BaseModel):\n    question: str\n\nclass QuestionAnswerPrompt(Prompt[QuestionAnswerPromptInput, str]):\n    system_prompt = \"\"\"\n    你是一位问答助手。请尽最大努力回答问题。\n    \"\"\"\n    user_prompt = \"\"\"\n    问题：{{ question }}\n    \"\"\"\n\nllm = LiteLLM(model_name=\"gpt-4.1-nano\")\n\nasync def main() -> None:\n    prompt = QuestionAnswerPrompt(QuestionAnswerPromptInput(question=\"Linux中的高内存和低内存是什么？\"))\n    response = await llm.generate(prompt)\n    print(response)\n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n```\n\n### 文档搜索\n\n构建并查询一个简单的向量存储索引：\n\n```python\nimport asyncio\nfrom ragbits.core.embeddings import LiteLLMEmbedder\nfrom ragbits.core.vector_stores import InMemoryVectorStore\nfrom ragbits.document_search import DocumentSearch\n\nembedder = LiteLLMEmbedder(model_name=\"text-embedding-3-small\")\nvector_store = InMemoryVectorStore(embedder=embedder)\ndocument_search = DocumentSearch(vector_store=vector_store)\n\nasync def run() -> None:\n    await document_search.ingest(\"web:\u002F\u002Fhttps:\u002F\u002Farxiv.org\u002Fpdf\u002F1706.03762\")\n    result = await document_search.search(\"这篇论文的主要发现是什么？\")\n    print(result)\n\nif __name__ == \"__main__\":\n    asyncio.run(run())\n```\n\n### 检索增强生成\n\n构建一个简单的 RAG 流程：\n\n```python\nimport asyncio\nfrom collections.abc import Iterable\nfrom pydantic import BaseModel\nfrom ragbits.core.embeddings import LiteLLMEmbedder\nfrom ragbits.core.llms import LiteLLM\nfrom ragbits.core.prompt import Prompt\nfrom ragbits.core.vector_stores import InMemoryVectorStore\nfrom ragbits.document_search import DocumentSearch\nfrom ragbits.document_search.documents.element import Element\n\nclass QuestionAnswerPromptInput(BaseModel):\n    question: str\n    context: Iterable[Element]\n\nclass QuestionAnswerPrompt(Prompt[QuestionAnswerPromptInput, str]):\n    system_prompt = \"\"\"\n    你是一位问答代理。请根据提供的上下文回答问题。\n    如果给定的上下文中信息不足，请拒绝回答。\n    \"\"\"\n    user_prompt = \"\"\"\n    问题：{{ question }}\n    上下文：{% for chunk in context %}{{ chunk.text_representation }}{%- endfor %}\n    \"\"\"\n\nllm = LiteLLM(model_name=\"gpt-4.1-nano\")\nembedder = LiteLLMEmbedder(model_name=\"text-embedding-3-small\")\nvector_store = InMemoryVectorStore(embedder=embedder)\ndocument_search = DocumentSearch(vector_store=vector_store)\n\nasync def run() -> None:\n    question = \"这篇论文的主要发现是什么？\"\n\n    await document_search.ingest(\"web:\u002F\u002Fhttps:\u002F\u002Farxiv.org\u002Fpdf\u002F1706.03762\")\n    chunks = await document_search.search(question)\n\n    prompt = QuestionAnswerPrompt(QuestionAnswerPromptInput(question=question, context=chunks))\n    response = await llm.generate(prompt)\n    print(response)\n\nif __name__ == \"__main__\":\n    asyncio.run(run())\n```\n\n### 智能体式 RAG\n\n构建一个智能体式的 RAG 流程：\n\n```python\nimport asyncio\nfrom ragbits.agents import Agent\nfrom ragbits.core.embeddings import LiteLLMEmbedder\nfrom ragbits.core.llms import LiteLLM\nfrom ragbits.core.vector_stores import InMemoryVectorStore\nfrom ragbits.document_search import DocumentSearch\n\nembedder = LiteLLMEmbedder(model_name=\"text-embedding-3-small\")\nvector_store = InMemoryVectorStore(embedder=embedder)\ndocument_search = DocumentSearch(vector_store=vector_store)\n\nllm = LiteLLM(model_name=\"gpt-4.1-nano\")\nagent = Agent(llm=llm, tools=[document_search.search])\n\nasync def main() -> None:\n    await document_search.ingest(\"web:\u002F\u002Fhttps:\u002F\u002Farxiv.org\u002Fpdf\u002F1706.03762\")\n    response = await agent.run(\"这篇论文的主要发现是什么？\")\n    print(response.content)\n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n```\n\n### 聊天 UI\n\n通过 Ragbits API 公开你的生成式 AI 应用程序：\n\n```python\nfrom collections.abc import AsyncGenerator\nfrom ragbits.agents import Agent, ToolCallResult\nfrom ragbits.chat.api import RagbitsAPI\nfrom ragbits.chat.interface import ChatInterface\nfrom ragbits.chat.interface.types import ChatContext, ChatResponse, LiveUpdateType\nfrom ragbits.core.embeddings import LiteLLMEmbedder\nfrom ragbits.core.llms import LiteLLM, ToolCall\nfrom ragbits.core.prompt import ChatFormat\nfrom ragbits.core.vector_stores import InMemoryVectorStore\nfrom ragbits.document_search import DocumentSearch\n\nembedder = LiteLLMEmbedder(model_name=\"text-embedding-3-small\")\nvector_store = InMemoryVectorStore(embedder=embedder)\ndocument_search = DocumentSearch(vector_store=vector_store)\n\nllm = LiteLLM(model_name=\"gpt-4.1-nano\")\nagent = Agent(llm=llm, tools=[document_search.search])\n\nclass MyChat(ChatInterface):\n    async def setup(self) -> None:\n        await document_search.ingest(\"web:\u002F\u002Fhttps:\u002F\u002Farxiv.org\u002Fpdf\u002F1706.03762\")\n\n    async def chat(\n        self,\n        message: str,\n        history: ChatFormat,\n        context: ChatContext,\n    ) -> AsyncGenerator[ChatResponse]:\n        async for result in agent.run_streaming(message):\n            match result:\n                case str():\n                    yield self.create_live_update(\n                        update_id=\"1\",\n                        type=LiveUpdateType.START,\n                        label=\"正在回答...\",\n                    )\n                    yield self.create_text_response(result)\n                case ToolCall():\n                    yield self.create_live_update(\n                        update_id=\"2\",\n                        type=LiveUpdateType.START,\n                        label=\"正在搜索...\",\n                    )\n                case ToolCallResult():\n                    yield self.create_live_update(\n                        update_id=\"2\",\n                        type=LiveUpdateType.FINISH,\n                        label=\"搜索\",\n                        description=f\"找到了 {len(result.result)} 个相关片段。\",\n                    )\n\n        yield self.create_live_update(\n            update_id=\"1\",\n            type=LiveUpdateType.FINISH,\n            label=\"答案\",\n        )\n\nif __name__ == \"__main__\":\n    api = RagbitsAPI(MyChat)\n    api.run()\n```\n\n## 快速开发\n\n从模板创建 Ragbits 项目：\n\n```sh\nuvx create-ragbits-app\n```\n\n可在 [这里](https:\u002F\u002Fgithub.com\u002Fdeepsense-ai\u002Fcreate-ragbits-app) 探索 `create-ragbits-app` 仓库。如果你有新的模板创意，欢迎贡献！\n\n## 文档\n\n- [教程](https:\u002F\u002Fragbits.deepsense.ai\u002Fstable\u002Ftutorials\u002Fintro) - 几分钟内开始使用 Ragbits\n- [操作指南](https:\u002F\u002Fragbits.deepsense.ai\u002Fstable\u002Fhow-to\u002Fprompts\u002Fuse_prompting) - 学习如何在你的项目中使用 Ragbits\n- [CLI](https:\u002F\u002Fragbits.deepsense.ai\u002Fstable\u002Fcli\u002Fmain) - 学习如何在终端中运行 Ragbits\n- [API 参考](https:\u002F\u002Fragbits.deepsense.ai\u002Fstable\u002Fapi_reference\u002Fcore\u002Fprompt) - 探索底层的 Ragbits API\n\n## 贡献\n\n我们欢迎贡献！请阅读 [CONTRIBUTING.md](https:\u002F\u002Fgithub.com\u002Fdeepsense-ai\u002Fragbits\u002Ftree\u002Fmain\u002FCONTRIBUTING.md) 以获取更多信息。\n\n## 许可证\n\nRagbits 采用 [MIT 许可证](https:\u002F\u002Fgithub.com\u002Fdeepsense-ai\u002Fragbits\u002Ftree\u002Fmain\u002FLICENSE) 许可。","# Ragbits 快速上手指南\n\nRagbits 是一个用于快速构建生成式 AI（GenAI）应用的模块化框架，提供从 LLM 调用、RAG 流水线到多智能体协作的全套构建块。\n\n## 环境准备\n\n在开始之前，请确保您的开发环境满足以下要求：\n\n*   **操作系统**：Linux, macOS 或 Windows\n*   **Python 版本**：3.10 或更高版本\n*   **包管理器**：pip\n*   **前置依赖**：建议创建虚拟环境以避免依赖冲突\n    ```bash\n    python -m venv venv\n    source venv\u002Fbin\u002Factivate  # Windows 用户使用: venv\\Scripts\\activate\n    ```\n\n> **提示**：国内开发者若遇到 PyPI 下载缓慢问题，可使用清华或阿里镜像源加速安装。\n\n## 安装步骤\n\n### 1. 安装稳定版\n安装包含核心功能、代理、文档搜索和聊天界面的完整套件：\n\n```sh\npip install ragbits\n```\n\n**使用国内镜像源加速安装：**\n```sh\npip install ragbits -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple\n```\n\n### 2. 安装夜间构建版（可选）\n如需体验最新开发特性（可能不够稳定）：\n\n```sh\npip install ragbits --pre\n```\n\n### 3. 模块化安装（可选）\nRagbits 支持按需安装子模块，例如仅安装核心功能：\n```sh\npip install ragbits-core\n```\n\n## 基本使用\n\n以下是几个核心场景的最小化代码示例，所有示例均需异步运行。\n\n### 1. 基础 LLM 调用\n定义一个类型安全的 Prompt 并调用 LLM：\n\n```python\nimport asyncio\nfrom pydantic import BaseModel\nfrom ragbits.core.llms import LiteLLM\nfrom ragbits.core.prompt import Prompt\n\nclass QuestionAnswerPromptInput(BaseModel):\n    question: str\n\nclass QuestionAnswerPrompt(Prompt[QuestionAnswerPromptInput, str]):\n    system_prompt = \"\"\"\n    You are a question answering agent. Answer the question to the best of your ability.\n    \"\"\"\n    user_prompt = \"\"\"\n    Question: {{ question }}\n    \"\"\"\n\nllm = LiteLLM(model_name=\"gpt-4.1-nano\")\n\nasync def main() -> None:\n    prompt = QuestionAnswerPrompt(QuestionAnswerPromptInput(question=\"What are high memory and low memory on linux?\"))\n    response = await llm.generate(prompt)\n    print(response)\n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n```\n\n### 2. 构建简单 RAG 流水线\n实现文档摄入、向量检索与生成的完整流程：\n\n```python\nimport asyncio\nfrom collections.abc import Iterable\nfrom pydantic import BaseModel\nfrom ragbits.core.embeddings import LiteLLMEmbedder\nfrom ragbits.core.llms import LiteLLM\nfrom ragbits.core.prompt import Prompt\nfrom ragbits.core.vector_stores import InMemoryVectorStore\nfrom ragbits.document_search import DocumentSearch\nfrom ragbits.document_search.documents.element import Element\n\nclass QuestionAnswerPromptInput(BaseModel):\n    question: str\n    context: Iterable[Element]\n\nclass QuestionAnswerPrompt(Prompt[QuestionAnswerPromptInput, str]):\n    system_prompt = \"\"\"\n    You are a question answering agent. Answer the question that will be provided using context.\n    If in the given context there is not enough information refuse to answer.\n    \"\"\"\n    user_prompt = \"\"\"\n    Question: {{ question }}\n    Context: {% for chunk in context %}{{ chunk.text_representation }}{%- endfor %}\n    \"\"\"\n\nllm = LiteLLM(model_name=\"gpt-4.1-nano\")\nembedder = LiteLLMEmbedder(model_name=\"text-embedding-3-small\")\nvector_store = InMemoryVectorStore(embedder=embedder)\ndocument_search = DocumentSearch(vector_store=vector_store)\n\nasync def run() -> None:\n    question = \"What are the key findings presented in this paper?\"\n\n    # 摄入文档 (支持本地路径或 URL)\n    await document_search.ingest(\"web:\u002F\u002Fhttps:\u002F\u002Farxiv.org\u002Fpdf\u002F1706.03762\")\n    \n    # 检索相关片段\n    chunks = await document_search.search(question)\n\n    # 生成回答\n    prompt = QuestionAnswerPrompt(QuestionAnswerPromptInput(question=question, context=chunks))\n    response = await llm.generate(prompt)\n    print(response)\n\nif __name__ == \"__main__\":\n    asyncio.run(run())\n```\n\n### 3. 智能体 RAG (Agentic RAG)\n将文档搜索作为工具赋予智能体，使其自主决定何时检索：\n\n```python\nimport asyncio\nfrom ragbits.agents import Agent\nfrom ragbits.core.embeddings import LiteLLMEmbedder\nfrom ragbits.core.llms import LiteLLM\nfrom ragbits.core.vector_stores import InMemoryVectorStore\nfrom ragbits.document_search import DocumentSearch\n\nembedder = LiteLLMEmbedder(model_name=\"text-embedding-3-small\")\nvector_store = InMemoryVectorStore(embedder=embedder)\ndocument_search = DocumentSearch(vector_store=vector_store)\n\nllm = LiteLLM(model_name=\"gpt-4.1-nano\")\n# 将 search 方法注册为工具\nagent = Agent(llm=llm, tools=[document_search.search])\n\nasync def main() -> None:\n    await document_search.ingest(\"web:\u002F\u002Fhttps:\u002F\u002Farxiv.org\u002Fpdf\u002F1706.03762\")\n    response = await agent.run(\"What are the key findings presented in this paper?\")\n    print(response.content)\n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n```","某金融科技公司研发团队急需构建一个能解析复杂财报（含表格、图表）并支持多轮问答的智能投研助手。\n\n### 没有 ragbits 时\n- **数据解析困难**：面对 PDF 中的财务报表和混合图文，需手动编写繁琐的解析脚本，难以提取结构化数据，导致知识库构建周期长达数周。\n- **模型切换成本高**：业务需要对比不同大模型效果，但每次切换供应商都要重构底层调用代码，缺乏统一的类型安全约束，调试耗时且易出错。\n- **协作开发低效**：多智能体协作逻辑需从零搭建，缺乏标准的上下文记忆管理和实时数据接入协议，团队在集成数据库查询功能时反复踩坑。\n- **运维监控缺失**：上线后无法实时追踪 RAG 链路的性能瓶颈，缺乏内置的提示词测试工具，只能依靠用户反馈被动优化。\n\n### 使用 ragbits 后\n- **高效处理复杂文档**：利用内置的 Docling 解析器和 VLM 支持，一键提取财报中的表格与图像内容，将数据入库时间从数周缩短至数小时。\n- **灵活适配模型架构**：通过 LiteLLM 集成轻松在 100+ 模型间无缝切换，利用 Python 泛型确保输出类型安全，快速验证最佳模型组合。\n- **快速构建智能工作流**：基于 A2A 协议和 MCP 标准，迅速组建具备角色分工的多智能体团队，实现实时数据库查询与历史对话状态的自动管理。\n- **全链路可观测性**：集成 OpenTelemetry 实时监控链路性能，配合 promptfoo 在部署前完成提示词自动化测试，显著提升系统稳定性。\n\nragbits 通过模块化组件将复杂的 GenAI 应用开发转化为积木式组装，让团队专注于业务逻辑而非底层基建。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fdeepsense-ai_ragbits_577047e3.png","deepsense-ai","deepsense.ai","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fdeepsense-ai_cb2b3650.png","",null,"http:\u002F\u002Fdeepsense.ai","https:\u002F\u002Fgithub.com\u002Fdeepsense-ai",[81,85,89,93,97,100],{"name":82,"color":83,"percentage":84},"Python","#3572A5",80,{"name":86,"color":87,"percentage":88},"TypeScript","#3178c6",19.7,{"name":90,"color":91,"percentage":92},"JavaScript","#f1e05a",0.1,{"name":94,"color":95,"percentage":96},"HTML","#e34c26",0,{"name":98,"color":99,"percentage":96},"CSS","#663399",{"name":101,"color":102,"percentage":96},"Shell","#89e051",1635,135,"2026-04-08T16:47:07","MIT","未说明","非必需（支持通过 LiteLLM 调用云端 API 或使用本地模型；若运行本地模型则取决于具体模型需求）",{"notes":110,"python":111,"dependencies":112},"该工具为模块化设计，支持按需安装子包（如 ragbits-core, ragbits-agents 等）以减少依赖。默认示例使用云端 LLM（如 GPT-4），若需运行本地模型或进行大规模文档并行处理（基于 Ray），则对硬件有额外要求。支持多种向量数据库（Qdrant, PgVector）和文档解析后端（Docling, Unstructured），需根据所选组件安装相应依赖。","3.9+",[113,114,115,116,117],"pydantic","litellm","ray","opentelemetry","promptfoo",[35,13,14,119],"其他",[121,122,123,124,125,126,127,128,129],"rag","document-search","evaluation","guardrails","agents","llms","optimization","prompts","vector-stores","2026-03-27T02:49:30.150509","2026-04-09T09:31:18.126649",[133,138,143,148,153,158],{"id":134,"question_zh":135,"answer_zh":136,"source_url":137},25949,"为什么在调用 LLM 时，Prompt 中的 context（上下文）没有被正确填充？","这是一个已知的 Bug，在版本 1.2.2 之前，当使用迭代器或生成器作为上下文输入时，chat 属性可能无法正确渲染。维护者已发布补丁版本 1.2.2 修复了此问题。请升级您的 ragbits 库到 1.2.2 或更高版本即可解决。相关修复代码已在 Pull Request #768 中合并。","https:\u002F\u002Fgithub.com\u002Fdeepsense-ai\u002Fragbits\u002Fissues\u002F766",{"id":139,"question_zh":140,"answer_zh":141,"source_url":142},25950,"如何在 Ragbits 中为 Agent 配置工具列表（Tools）？","Ragbits 从版本 1.1 开始正式支持 Agent 功能及工具调用。您无需手动处理提示词中的工具列表，只需升级到 1.1 及以上版本，并参考官方提供的 Agent 教程来创建工作流。教程地址：https:\u002F\u002Fragbits.deepsense.ai\u002Ftutorials\u002Fagents\u002F","https:\u002F\u002Fgithub.com\u002Fdeepsense-ai\u002Fragbits\u002Fissues\u002F611",{"id":144,"question_zh":145,"answer_zh":146,"source_url":147},25951,"是否可以将 VectorStore（向量存储）和 Embedder（嵌入模型）分离以提高可扩展性？","目前 Ragbits 默认将两者耦合，主要是为了防止不同嵌入模型产生的向量空间不匹配导致索引错误，以及满足某些向量数据库（如 pgvector）需要预先知道向量维度的要求。如果您需要分离以实现分布式计算（例如在 GPU 机器上计算嵌入，在 IO 密集型机器上存储），可以通过以下变通方法实现：1. 读取文档并缓存到对象存储；2. 单独计算嵌入并缓存结果；3. 将缓存的嵌入加载到数据库。但需注意，当前实现在此流程下的缓存管理较为复杂。","https:\u002F\u002Fgithub.com\u002Fdeepsense-ai\u002Fragbits\u002Fissues\u002F603",{"id":149,"question_zh":150,"answer_zh":151,"source_url":152},25952,"Few-shot（少样本学习）功能是否支持图片输入？","是的，该功能已被规划并实施。设计方案是扩展 `FewShotExample` 类型以包含可选的图片输入列表。在处理逻辑上，系统会返回 OpenAI 格式的完整对话（包含图片等非文本元素）。如果用户尝试将图片传递给不支持视觉的模型，系统将抛出异常。具体的格式转换逻辑由 LLM 类中的 `_format_chat_for_llm` 方法负责处理。","https:\u002F\u002Fgithub.com\u002Fdeepsense-ai\u002Fragbits\u002Fissues\u002F155",{"id":154,"question_zh":155,"answer_zh":156,"source_url":157},25953,"如何在 Prompt 中正确添加和管理 Few-shot 示例？","为了明确区分模板和历史消息，Ragbits 对 Prompt 接口进行了重构：1. 将静态字段 `additional_messages` 重命名为 `few_shots`；2. 移除了 `add_user_message` 和 `add_assistant_message` 方法，改用单一的 `add_few_shot` 方法（同时接收问题和答案）；3. `chat` 方法生成的对话顺序现在严格遵循：系统提示词 -> 静态 few_shots -> 通过 `add_few_shot` 动态添加的消息 -> 用户提示词。请确保使用新的 `add_few_shot` 方法来添加示例。","https:\u002F\u002Fgithub.com\u002Fdeepsense-ai\u002Fragbits\u002Fissues\u002F51",{"id":159,"question_zh":160,"answer_zh":161,"source_url":157},25954,"Prompt 类中的 `system_message` 和 `user_message` 字段代表什么？命名是否有更新？","这些字段代表渲染后的提示词文本。为了避免混淆（让人误以为是聊天历史中的单条消息），维护者决定将其重命名。`system_message` 和 `user_message` 已分别更改为 `rendered_system_prompt` 和 `rendered_user_prompt`，以更准确地反映它们是经过模板渲染后的静态提示词内容，而非动态的消息对象。",[163,168,173,178,183,188,193,198,203,208,213,218,223,228,233,238,243,248,253,258],{"id":164,"version":165,"summary_zh":166,"released_at":167},163302,"v1.6.2","# 1.6.2（2026-03-26）\n\n- ragbits-chat 更新至 v1.6.2 版本\n- ragbits-document-search 更新至 v1.6.2 版本\n- ragbits-agents 更新至 v1.6.2 版本\n- ragbits-evaluate 更新至 v1.6.2 版本\n- ragbits-core 更新至 v1.6.2 版本\n- ragbits-cli 更新至 v1.6.2 版本\n- ragbits-guardrails 更新至 v1.6.2 版本","2026-03-31T11:28:25",{"id":169,"version":170,"summary_zh":171,"released_at":172},163303,"v1.6.1","# 1.6.1（2026-03-19）\n\n- ragbits-chat 更新至 v1.6.1 版本\n- ragbits-document-search 更新至 v1.6.1 版本\n- ragbits-agents 更新至 v1.6.1 版本\n- ragbits-evaluate 更新至 v1.6.1 版本\n- ragbits-core 更新至 v1.6.1 版本\n- ragbits-cli 更新至 v1.6.1 版本\n- ragbits-guardrails 更新至 v1.6.1 版本","2026-03-24T13:16:22",{"id":174,"version":175,"summary_zh":176,"released_at":177},163304,"v1.6.0","# 1.6.0 (2026-03-17)\n\n## 变更\n\n- ragbits-agents 更新至版本 v1.6.0\n- ragbits-chat 更新至版本 v1.6.0\n- ragbits-cli 更新至版本 v1.6.0\n- ragbits-document-search 更新至版本 v1.6.0\n- ragbits-evaluate 更新至版本 v1.6.0\n- ragbits-guardrails 更新至版本 v1.6.0\n- ragbits-core 更新至版本 v1.6.0","2026-03-18T10:49:34",{"id":179,"version":180,"summary_zh":181,"released_at":182},163305,"v1.5.0","# 1.5.0 (2026-02-19)\n\n## 变更\n\n- ragbits-agents 更新至版本 v1.5.0\n- ragbits-chat 更新至版本 v1.5.0\n- ragbits-cli 更新至版本 v1.5.0\n- ragbits-document-search 更新至版本 v1.5.0\n- ragbits-evaluate 更新至版本 v1.5.0\n- ragbits-guardrails 更新至版本 v1.5.0\n- ragbits-core 更新至版本 v1.5.0","2026-02-25T13:09:04",{"id":184,"version":185,"summary_zh":186,"released_at":187},163306,"v1.4.2","# 1.4.2（2026-02-18）\n\n## 变更\n\n- ragbits-agents 更新至版本 v1.4.2\n- ragbits-chat 更新至版本 v1.4.2\n- ragbits-cli 更新至版本 v1.4.2\n- ragbits-document-search 更新至版本 v1.4.2\n- ragbits-evaluate 更新至版本 v1.4.2\n- ragbits-guardrails 更新至版本 v1.4.2\n- ragbits-core 更新至版本 v1.4.2","2026-02-18T16:17:45",{"id":189,"version":190,"summary_zh":191,"released_at":192},163307,"v1.4.1","# 1.4.1（2026-02-08）\n\n## 变更\n\n- ragbits-agents 更新至版本 v1.4.1\n- ragbits-chat 更新至版本 v1.4.1\n- ragbits-cli 更新至版本 v1.4.1\n- ragbits-document-search 更新至版本 v1.4.1\n- ragbits-evaluate 更新至版本 v1.4.1\n- ragbits-guardrails 更新至版本 v1.4.1\n- ragbits-core 更新至版本 v1.4.1","2026-02-10T10:07:49",{"id":194,"version":195,"summary_zh":196,"released_at":197},163308,"v1.4.0","# 1.4.0 (2026-02-04)\n\n## 更改\n\n- ragbits-agents 更新至版本 v1.4.0\n- ragbits-chat 更新至版本 v1.4.0\n- ragbits-cli 更新至版本 v1.4.0\n- ragbits-document-search 更新至版本 v1.4.0\n- ragbits-evaluate 更新至版本 v1.4.0\n- ragbits-guardrails 更新至版本 v1.4.0\n- ragbits-core 更新至版本 v1.4.0","2026-02-05T13:59:37",{"id":199,"version":200,"summary_zh":201,"released_at":202},163309,"v1.3.0","# 1.3.0 (2025-09-11)  \n## 🔐 认证、智能体增强与性能提升  \n\n本次发布从端到端强化了认证机制，升级了智能体功能与追踪能力，优化了 UI 和开发者体验，并通过更智能的懒加载实现了更快的启动速度——同时还修复了一些重要问题。  \n\n## ✨ 核心特性与亮点  \n\n### 智能体  \n- CLI 中的智能体：直接在命令行中运行和管理智能体，加速迭代效率。  \n- 强制工具调用：可在必要时强制要求特定工具的调用。  \n- 工具调用追踪：对智能体内的工具调用进行详细追踪，提升可观测性。  \n- PydanticAI 智能体支持：新增兼容层，支持在 Ragbits 中运行基于 PydanticAI 的智能体。  \n- AgentRunContext 中的依赖注入：在智能体运行过程中实现更清晰的依赖注入与状态管理。  \n\n### 认证  \n- 后端认证聊天：将安全的后端认证会话无缝集成到聊天流程中。  \n- UI 认证令牌存储：在客户端持久化并复用认证令牌，使会话更加流畅。  \n- 初始 UI 认证插件：可插拔的认证模块，便于自定义 UI 认证策略。  \n- 标准化聊天类型系统：统一各聊天组件的类型定义，确保集成更安全、更一致。  \n- 教程与操作指南：新增 Ragbits 聊天指南，帮助开发者快速上手构建认证应用。  \n\n### UI 优化  \n- 持久化用户设置 v2：跨会话的设置持久化更加 robust 且可靠。  \n- 使用量组件：内置 UI 用于展示 token\u002F使用量及资源消耗情况。  \n- 清除消息事件：提供程序化事件，用于清除消息并重置对话。  \n- 页面标题与图标：为应用外壳提供便捷的品牌化与自定义选项。  \n\n### 向量存储  \n- PgVector 大向量支持：支持长度超过 2,000 的向量，从而适配更大规模的嵌入模型。  \n\n### Ragbits 文档搜索  \n- PPTX 解析器：原生支持导入和解析 PowerPoint (.pptx) 文档。  \n\n### 开发者体验与评估  \n- 自动生成 TypeScript 类型：自动为客户端生成 TS 类型，确保客户端与服务端接口保持同步。  \n- 自动化 UI 构建系统：简化 UI 构建流程，实现更快速、更可靠的打包。  \n- 评估器并行批次（可选）：ragbits.evaluate.Evaluator 支持以并行方式执行批次任务，从而提升速度。  \n\n### 性能  \n- LiteLLM 懒加载优化：显著优化加载时间，提升应用响应速度。  \n- 通用懒加载：通过延迟加载非关键依赖和初始化项，进一步缩短启动时间。  \n\n## Bug 修复与稳定性改进  \n- 修复了导致打包失败的 UI 构建问题。  \n- 修正了在特定启动条件下出现的无限初始化循环问题。  \n- 解决了历史记录消失以及 ChatOptions 发送消息异常的问题。  \n- 去除了 LiteLLM 过多的日志输出噪音。  \n- 防止 prompt 重复消费同一个迭代器。","2025-09-11T13:58:33",{"id":204,"version":205,"summary_zh":206,"released_at":207},163310,"v1.2.2","## 变更内容\n* 发布（ragbits-core）：由 @ds-ragbits-robot 在 https:\u002F\u002Fgithub.com\u002Fdeepsense-ai\u002Fragbits\u002Fpull\u002F770 中更新至 v1.2.2\n\n\n**完整变更日志**：https:\u002F\u002Fgithub.com\u002Fdeepsense-ai\u002Fragbits\u002Fcompare\u002Fv1.2.1...v1.2.2","2025-08-09T18:33:54",{"id":209,"version":210,"summary_zh":211,"released_at":212},163311,"v1.2.1","# 1.2.1（2025-08-04）\n\n## 修改\n\n- ragbits-chat 更新至版本 v1.2.1\n- ragbits-cli 更新至版本 v1.2.1\n- ragbits-document-search 更新至版本 v1.2.1\n- ragbits-evaluate 更新至版本 v1.2.1\n- ragbits-guardrails 更新至版本 v1.2.1\n- ragbits-core 更新至版本 v1.2.1","2025-08-05T08:55:56",{"id":214,"version":215,"summary_zh":216,"released_at":217},163312,"v1.2.0","## 1.2.0 (2025-08-01)\r\n\r\n### 🚀 Enhanced User Experience & Core Improvements\r\n\r\nThis release delivers a comprehensive upgrade across the entire Ragbits ecosystem, featuring major UI enhancements with image support and conversation history, powerful new agent capabilities with native OpenAI tools integration, advanced core engine improvements including reasoning models and Google Drive integration, plus important stability fixes and performance optimizations.\r\n\r\n### ✨ Key Features & Highlights\r\n\r\n#### Ragbits UI Major Enhancements\r\n- **Image Support:** Attach images to responses from your chatbot! Ragbits will create a gallery under agent response with all the images.\r\n- **Conversation History:** In Ragbits 1.2.0 history of conversations can be saved client-side, so your users can go back to the chat they never ended!\r\n- **Share Functionality:** New share functionality you can copy payload to the clipboard and send it to somebody else - pasting the payload will open exactly the same chat as you\r\n- **Parallel Conversations:** Support for multiple simultaneous conversations in the UI, enabling users to manage several chat sessions at once.\r\n- **Other Improvements:**\r\n    - User settings now persist across sessions\r\n    - UI elements on messages behave better when loading\r\n    - Updated Tailwind, React, and Vite\r\n    - More testing\r\n\r\n#### Core Engine Improvements\r\n- **Reasoning Models Support:** Added support for reasoning models and capturing their thinking blocks.\r\n- **Enhanced Attachment API:** New API for attaching images \u002F files in prompts.\r\n- **Enhanced Usage Tracking:** Split usage per model to calculate final cost.\r\n- **Google Drive Integration:** Added Google Drive Source.\r\n- **Batch Generation Support:** Added batch generation in LLM, improving performance for bulk operations.\r\n\r\n#### Agent Improvements\r\n- **Native OpenAI Tools Support:** Direct support for OpenAI's native tools: web_search, code_interpreter, image_generation.\r\n- **Agent Context:** Added Context object to Agents for easier state management and usage tracking.\r\n- **Token-based limits for agents**: Agents can now stop their processing when they reach X amount of tokens used.\r\n\r\n#### Bug Fixes & Stability\r\n- **Cost Calculation Fixes:** Resolved issues with cost calculation for some models.\r\n- **Tool Call Arguments:** Fixed improper conversion to JSON of tool call arguments.\r\n","2025-08-02T19:34:50",{"id":219,"version":220,"summary_zh":221,"released_at":222},163313,"v1.1.0","# 1.1.0 (2025-07-09)\n\n\n## 🤖 Agent Release\n\nThis release brings agentic capabilities to Ragbits, together with major user interface enhancements, expanded observability, new integrations, and core improvements.\n\n## ✨ Key Features & Highlights\n\n### Agents: Easily build agentic systems that proactively interact with their environment.\n\n- **Agent Interface:** Define agents by combining LLMs, prompts, and tools using the `ragbits-agents` package. Tool creation is streamlined—simply annotate Python functions, and Ragbits automatically handles type hints and docstrings for agent consumption.\n- **MCP Server Integration:** Connect your agents to hundreds of off-the-shelf tools by running or connecting to an MCP Server, instantly expanding agent capabilities.\n- **A2A Protocol Support:** Enable inter-agent communication with the new A2A Protocol. The `Agent.to_a2a()` method makes it seamless to register an agent as an A2A Card, share, and communicate via the bundled A2A Server.\n- **Streaming Responses:** All agents now support streaming by default—use `Agent.run_streaming()` to send results as they’re generated, improving responsiveness and UX.\n- **Tracing & Observability:** Built-in agent tracing support with multiple backends including OpenTelemetry, CLI, and Logfire, making it easy to monitor and debug agent reasoning and tool use.\n\n### Ragbits UI Improvements\n- **User Interface Improvements:** Richer, more interactive and customizable chat experiences.\n- **Live Updates:** Real-time notifications from the backend keep users in the loop—see searches, tool calls, and step-by-step reasoning as they happen.\n- **Message History Navigation:** Use up\u002Fdown arrows to effortlessly navigate and edit previous messages, streamlining user interactions.\n- **Follow-up Message Suggestions:** Applications can now suggest contextual follow-up questions. Show follow-up buttons in the UI by simply calling a backend method.\n- **TypeScript SDK:** Faster custom integrations! Access Ragbits API from your own interfaces using the new TypeScript SDK, available standalone or as React hooks.\n- **User Settings:** Define a Pydantic model to automatically generate a user settings form in the UI. These settings can customize chatbot behavior per-user—making it simple to add personalizable controls.\n- **Debug Mode:** Activate debug mode in the chat UI to view internal chat state, events, and other chatbot internals, greatly aiding development and troubleshooting.\n\n### Observability\n- **Comprehensive OpenTelemetry Metrics:** Now supporting all OpenTelemetry metric types for robust, expressive monitoring.\n- **Server Observability:** Improved observability into servers registered or available through RagbitsAPI, surfacing infrastructure insights.\n- **Grafana Dashboards:** New, ready-to-use Grafana dashboards are now bundled with `create-ragbits-app` for instant monitoring out of the box.\n- **Logfire Integration:** One-line setup to send traces and metrics directly to Pydantic Logfire, enabling comprehensive observability with minimal configuration.\n\n### Integrations\n- **Weaviate VectorStore:** Use Weaviate as a fully compatible VectorStore backend across Ragbits components such as document-search.\n\n### Developer Experience & Other Improvements\n- **RagbitsChatClient:** Introduced a new `RagbitsChatClient` for seamless interaction with RagbitsAPI from Python. Makes building custom python clients and integrations easier than ever.","2025-07-09T15:45:51",{"id":224,"version":225,"summary_zh":226,"released_at":227},163314,"v1.0.0","# 1.0.0 (2025-06-04)\n\n## 🎉 Major Release\n\nThis is the first stable release of ragbits, marking a significant milestone in the project's development.\nThe v1.0.0 release represents a mature, production-ready framework for building GenAI applications.\n\n## 🚀 New Features\n\n### ragbits-core\n- **Vector Store Improvements**:\n  - Automatic vector_size resolution by PgVectorStore\n  - Added get_vector_size method to all Embedders\n  - Added support for limiting VectorStore results by metadata\n- **Embeddings**: Refactored BagOfTokens model with model_name\u002Fencoding_name parameters moved to init\n- **Type Safety**: Renamed typevars InputT and OutputT to PromptInputT and PromptOutputT for better clarity\n- **Monitoring**: Added Prometheus & Grafana monitoring for LLMs using OpenTelemetry\n- **File Type Detection**: Switched from imghdr to filetype for image file type detection\n- **Utilities**: Added batched() helper method to utils\n\n### ragbits-document-search\n- **Advanced Document Processing**: Switch to docling as default document parser for improved document handling\n- **Batching Support**: Added elements batching for ingest strategies to improve performance\n- **Document Types**: Added support for JSONL file type and improved document file type detection\n- **Reranking Enhancements**:\n  - Added LLM reranker with optional score override\n  - Added score threshold to reranker options\n  - Retained score information from vector database or reranker in Element class\n- **Query Processing**: Added query rephraser options for better search results\n- **Error Handling**: Improved error handling for elements without enricher\n\n### ragbits-chat\n- **Persistence Support**: Added persistence component to save chat interactions from ragbits-chat with conversation_id parameter support\n- **State Management**: Added support for state updates in chat interfaces with automatic signature generation\n- **UI Improvements**: Refactored UI components to allow modifications and rebuilt UI with new dependencies\n- **API Integration**: Enhanced API integration with history context changes and feedback form integration\n\n### ragbits-evaluate\n- **Question Answering**: Added evaluations for question answering tasks\n- **Dataset Enhancements**:\n  - Added support for slicing datasets\n  - Support for custom column names in evaluation datasets\n  - Support for reference document ids and page numbers\n- **Batch Processing**: Adjusted evaluation pipeline interface to support batch processing\n- **Data Loading**: Separated load and map operations in data loaders","2025-06-04T12:44:29",{"id":229,"version":230,"summary_zh":231,"released_at":232},163315,"v0.20.1","# 0.20.1 (2025-06-04)\n\n## Changed\n\n- ragbits-chat updated to version v0.20.1\n- ragbits-cli updated to version v0.20.1\n- ragbits-document-search updated to version v0.20.1\n- ragbits-evaluate updated to version v0.20.1\n- ragbits-guardrails updated to version v0.20.1\n- ragbits-core updated to version v0.20.1","2025-06-04T10:10:48",{"id":234,"version":235,"summary_zh":236,"released_at":237},163316,"v0.20.0","# 0.20.0 (2025-06-03)\n\n## Changed\n\n- ragbits-chat updated to version v0.20.0\n- ragbits-cli updated to version v0.20.0\n- ragbits-document-search updated to version v0.20.0\n- ragbits-evaluate updated to version v0.20.0\n- ragbits-guardrails updated to version v0.20.0\n- ragbits-core updated to version v0.20.0","2025-06-03T14:25:33",{"id":239,"version":240,"summary_zh":241,"released_at":242},163317,"v0.19.1","# 0.19.1 (2025-05-27)\n\n## Changed\n\n- ragbits-chat updated to version v0.19.1\n- ragbits-cli updated to version v0.19.1\n- ragbits-document-search updated to version v0.19.1\n- ragbits-evaluate updated to version v0.19.1\n- ragbits-guardrails updated to version v0.19.1\n- ragbits-core updated to version v0.19.1","2025-05-27T18:00:10",{"id":244,"version":245,"summary_zh":246,"released_at":247},163318,"v0.19.0","# 0.19.0 (2025-05-27)\n\n## Changed\n\n- ragbits-chat updated to version v0.19.0\n- ragbits-cli updated to version v0.19.0\n- ragbits-document-search updated to version v0.19.0\n- ragbits-evaluate updated to version v0.19.0\n- ragbits-guardrails updated to version v0.19.0\n- ragbits-core updated to version v0.19.0","2025-05-27T17:11:18",{"id":249,"version":250,"summary_zh":251,"released_at":252},163319,"v0.18.0","# 0.18.0 (2025-05-22)\n\n## Changed\n\n- ragbits-chat updated to version v0.18.0\n- ragbits-cli updated to version v0.18.0\n- ragbits-document-search updated to version v0.18.0\n- ragbits-evaluate updated to version v0.18.0\n- ragbits-guardrails updated to version v0.18.0\n- ragbits-core updated to version v0.18.0","2025-05-22T12:54:05",{"id":254,"version":255,"summary_zh":256,"released_at":257},163320,"v0.17.1","# 0.17.1 (2025-05-09)\n\n## Changed\n\n- ragbits-chat updated to version v0.17.1\n- ragbits-cli updated to version v0.17.1\n- ragbits-document-search updated to version v0.17.1\n- ragbits-evaluate updated to version v0.17.1\n- ragbits-guardrails updated to version v0.17.1\n- ragbits-core updated to version v0.17.1","2025-05-12T09:30:46",{"id":259,"version":260,"summary_zh":261,"released_at":262},163321,"v0.17.0","# 0.17.0 (2025-05-06)\n\n## Changed\n\n- ragbits-chat updated to version v0.17.0\n- ragbits-cli updated to version v0.17.0\n- ragbits-document-search updated to version v0.17.0\n- ragbits-evaluate updated to version v0.17.0\n- ragbits-guardrails updated to version v0.17.0\n- ragbits-core updated to version v0.17.0","2025-05-06T11:42:40"]