Auditi开源平台如何评估和改进LLM应用?(附AI Agent评估方法)
AI Summary (BLUF)
Auditi is an open-source platform for evaluating and improving LLM applications through automated LLM-as-a-judge evaluation, human annotation workflows, and advanced analytics. 原文翻译: Auditi是一个开源平台,通过自
Auditi: 开源 AI Agent 评估与可观测性平台

开源 AI Agent 评估与可观测性平台 通过自动化的 LLM-as-a-Judge 评估、人工标注工作流和高级分析,追踪、评估并改进您的 LLM 应用。
Open-source AI Agent Evaluation and Observability Platform tracks, evaluates, and improves your LLM applications through automated LLM-as-a-Judge evaluation, human annotation workflows, and advanced analytics.
核心特性
平台核心能力
Auditi 旨在为构建在大型语言模型之上的 AI Agent 和复杂应用提供一站式的评估、追踪与优化解决方案。其核心能力覆盖了从开发到生产监控的全生命周期。
Auditi is designed to provide a one-stop solution for evaluating, tracing, and optimizing AI Agents and complex applications built on large language models. Its core capabilities cover the entire lifecycle from development to production monitoring.
特性 | 描述 | 关键优势 |
|---|---|---|
自动追踪捕获 | 通过简单的装饰器或自动插桩,捕获 AI Agent 的每一次交互。 | 零侵入或低侵入式集成,无需大规模重构。 |
LLM-as-a-Judge 评估 | 使用可配置的 LLM 评估器,自动化评估 Agent 性能。 | 规模化、可重复的评估,减少人工成本。 |
人工标注工作流 | 带有可定制评分配置的标注队列,支持人机协同评估。 | 结合自动化与专家判断,确保评估质量。 |
高级分析看板 | 包含指标、趋势、相关性分析和异常检测的综合仪表盘。 | 数据驱动的洞见,快速定位性能瓶颈。 |
多供应商支持 | 兼容 OpenAI, Anthropic, Google Gemini 及 OpenAI 兼容 API。 | 避免供应商锁定,灵活适配技术栈。 |
成本追踪 | 基于供应商特定定价的自动成本计算,可通过定价 API 更新。 | 精细化成本管控,优化资源使用。 |
SDK 特性
SDK 设计以开发者体验为核心,力求用最少的代码改动实现最全面的可观测性。
The SDK is designed with developer experience at its core, aiming to achieve comprehensive observability with minimal code changes.
简单集成:通过 Python 装饰器或自动插桩实现,代码改动极小。
Simple Integration: Minimal code changes with Python decorators or auto-instrumentation.
灵活追踪:支持对 Agent、工具、LLM 调用、嵌入向量和检索操作进行追踪。
Flexible Tracing: Support for agents, tools, LLM calls, embeddings, and retrieval operations.
异步支持:完整支持
async/await异步编程模式。Async Support: Full support for async/await patterns.
供应商抽象:自动检测和处理不同的 LLM 供应商。
Provider Abstraction: Automatic detection and handling of different LLM providers.
自定义评估器:支持构建用户自定义的评估逻辑。
Custom Evaluators: Build your own evaluation logic.
快速开始
1. 安装与运行
通过 Docker Compose 可以快速启动包含所有依赖的完整 Auditi 服务栈。
You can quickly start the complete Auditi service stack with all dependencies via Docker Compose.
# 克隆仓库
git clone https://github.com/deduu/auditi.git
cd auditi
# 生成必要的密钥
python -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())"
python -c "import secrets; print(secrets.token_urlsafe(32))"
# 创建包含密钥的 .env 文件
echo "ENCRYPTION_KEY=<paste-encryption-key-here>" > .env
echo "JWT_SECRET=<paste-jwt-secret-here>" >> .env
# 启动所有服务
docker-compose up -d
重要提示:
ENCRYPTION_KEY用于加密数据库中存储的 LLM API 密钥。JWT_SECRET用于签发用户会话令牌。若未设置,每次重启服务都会生成临时密钥。详情请参阅安装指南。 Important:ENCRYPTION_KEYencrypts LLM API keys in the database.JWT_SECRETsigns user session tokens. Without these, ephemeral keys are generated on each restart. See the Installation Guide for details.
2. 身份验证
打开
http://localhost:5173并创建您的管理员账户。Open
http://localhost:5173and create your admin account.进入 设置 > API 密钥 并创建一个 API 密钥。
Go to Settings > API Keys and create an API key.
复制该密钥(仅显示一次)—— SDK 集成时需要用到它。
Copy the key (shown only once) — you'll need it for the SDK.
3. 集成到您的代码
通过几行代码即可实现对现有 LLM 调用的自动追踪。
Automatically trace your existing LLM calls with just a few lines of code.
import auditi
from openai import OpenAI
# 使用您的 API 密钥初始化
auditi.init(api_key="audi_...", base_url="http://localhost:8000")
# 自动插桩支持的库
auditi.instrument()
# 现在所有的 LLM 调用都会被自动追踪!
client = OpenAI()
response = client.chat.completions.create(
model="gpt-4",
messages=[{"role": "user", "content": "What is the capital of France?"}]
)
print(response.choices[0].message.content)
系统架构与配置
架构概览
Auditi 采用清晰的分层架构,确保各组件职责分离且易于扩展。
Auditi adopts a clear layered architecture to ensure separation of concerns and ease of extension.
SDK (Python) → HTTP POST → Backend (FastAPI/PostgreSQL) → REST API → Frontend (React/Vite)
SDK (Python) → HTTP POST → Backend (FastAPI/PostgreSQL) → REST API → Frontend (React/Vite)
SDK 负责从应用代码中收集追踪数据并发送至后端。后端基于 FastAPI 构建,提供数据处理、存储和 API 接口。前端则提供交互式的可视化仪表盘。
The SDK is responsible for collecting trace data from application code and sending it to the backend. The backend, built on FastAPI, handles data processing, storage, and API interfaces. The frontend provides an interactive visualization dashboard.
关键配置
部署时需关注以下核心环境变量。
The following core environment variables require attention during deployment.
变量 | 描述 | 必要性 |
|---|---|---|
| PostgreSQL 数据库连接字符串。 | 必需 |
| 用于加密 LLM API 密钥的 Fernet 密钥。 | 生产环境必需 |
| 用于签发 JWT 会话令牌的密钥。 | 生产环境必需 |
| 允许的 CORS 来源(逗号分隔)。 | 可选(默认本地开发配置) |
未来发展路线图
Auditi 项目持续演进,未来版本计划涵盖更广泛的企业级功能和应用场景。
The Auditi project is continuously evolving, with future versions planning to cover a wider range of enterprise-level features and use cases.
实时流式支持:对流式 LLM 响应进行追踪和评估。
Real-time streaming support: Trace and evaluate streaming LLM responses.
更多 LLM 供应商集成:扩展对开源及新兴模型 API 的支持。
More LLM provider integrations: Extend support for open-source and emerging model APIs.
A/B 测试框架:支持对不同的 Agent 配置或模型进行对比实验。
A/B testing framework: Support comparative experiments for different agent configurations or models.
高级可视化选项:提供更丰富、可定制的数据图表。
Advanced visualization options: Provide richer, customizable data charts.
云部署模板:提供针对主流云平台的一键部署方案。
Cloud deployment templates: Provide one-click deployment solutions for major cloud platforms.
社区与贡献
我们欢迎并感谢社区的每一位贡献者。您可以通过以下方式参与:
We welcome and appreciate every contributor from the community. You can participate in the following ways:
GitHub 讨论区:在 Discussions 中提问、分享想法或与其他用户交流。
GitHub Discussions: Ask questions, share ideas, and connect with other users in Discussions.
问题反馈:通过 GitHub Issues 报告错误或请求新功能。
Issues: Report bugs or request features via GitHub Issues.
贡献代码请遵循标准的 Fork 工作流,并参阅 CONTRIBUTING.md 了解详细指南。
To contribute code, please follow the standard Fork workflow and refer to CONTRIBUTING.md for detailed guidelines.
Auditi 基于 MIT 协议开源,详情请见 LICENSE 文件。
Auditi is open-sourced under the MIT License. See the LICENSE file for details.
常见问题(FAQ)
Auditi平台如何评估LLM应用性能?
Auditi通过自动化LLM-as-a-Judge评估和人工标注工作流来评估LLM应用,支持可配置的LLM评估器进行规模化评估,并结合专家判断确保质量。
如何快速开始使用Auditi进行集成?
可通过Docker Compose一键启动完整服务栈,使用Python装饰器或自动插桩实现简单集成,代码改动极小,支持异步编程和多种LLM供应商。
Auditi提供哪些核心分析功能?
平台提供高级分析看板,包含指标、趋势、相关性分析和异常检测的综合仪表盘,支持自动追踪捕获交互数据,实现数据驱动的性能优化。
版权与免责声明:本文仅用于信息分享与交流,不构成任何形式的法律、投资、医疗或其他专业建议,也不构成对任何结果的承诺或保证。
文中提及的商标、品牌、Logo、产品名称及相关图片/素材,其权利归各自合法权利人所有。本站内容可能基于公开资料整理,亦可能使用 AI 辅助生成或润色;我们尽力确保准确与合规,但不保证完整性、时效性与适用性,请读者自行甄别并以官方信息为准。
若本文内容或素材涉嫌侵权、隐私不当或存在错误,请相关权利人/当事人联系本站,我们将及时核实并采取删除、修正或下架等处理措施。 也请勿在评论或联系信息中提交身份证号、手机号、住址等个人敏感信息。