<p align="center">
    <picture>
        <img width="205" alt="Kiln AI Logo" src="https://github.com/user-attachments/assets/5fbcbdf7-1feb-45c9-bd73-99a46dd0a47f">
    </picture>
</p>
<h3 align="center">
    快速AI原型设计与数据集协作工具
</h3>

<p align="center">
  <a href="https://docs.getkiln.ai/docs/fine-tuning-guide"><strong>微调</strong></a> •
  <a href="https://docs.getkiln.ai/docs/synthetic-data-generation"><strong>合成数据生成</strong></a> • 
  <a href="https://docs.getkiln.ai/docs/collaboration"><strong>数据集协作</strong></a> • 
  <a href="https://docs.getkiln.ai"><strong>文档</strong></a>
</p>

|         |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| CI      | [![Build and Test](https://github.com/Kiln-AI/kiln/actions/workflows/build_and_test.yml/badge.svg)](https://github.com/Kiln-AI/kiln/actions/workflows/build_and_test.yml) [![Format and Lint](https://github.com/Kiln-AI/kiln/actions/workflows/format_and_lint.yml/badge.svg)](https://github.com/Kiln-AI/kiln/actions/workflows/format_and_lint.yml) [![Desktop Apps Build](https://github.com/Kiln-AI/kiln/actions/workflows/build_desktop.yml/badge.svg)](https://github.com/Kiln-AI/kiln/actions/workflows/build_desktop.yml) [![Web UI Build](https://github.com/Kiln-AI/kiln/actions/workflows/web_format_lint_build.yml/badge.svg)](https://github.com/Kiln-AI/kiln/actions/workflows/web_format_lint_build.yml) [![Test Count Badge](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/scosman/57742c1b1b60d597a6aba5d5148d728e/raw/test_count_kiln.json)](https://github.com/Kiln-AI/kiln/actions/workflows/test_count.yml) [![Test Coverage Badge](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/scosman/57742c1b1b60d597a6aba5d5148d728e/raw/library_coverage_kiln.json)](https://github.com/Kiln-AI/kiln/actions/workflows/test_count.yml) [![Docs](https://github.com/Kiln-AI/Kiln/actions/workflows/build_docs.yml/badge.svg)](https://github.com/Kiln-AI/Kiln/actions/workflows/build_docs.yml) |
| Package | [![PyPI - Version](https://img.shields.io/pypi/v/kiln-ai.svg?logo=pypi&label=PyPI&logoColor=gold)](https://pypi.org/project/kiln-ai/) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/kiln-ai.svg?logo=python&label=Python&logoColor=gold)](https://pypi.org/project/kiln-ai/)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| Meta    | [![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv) [![linting - Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff) [![Hatch project](https://img.shields.io/badge/%F0%9F%A5%9A-Hatch-4051b5.svg)](https://github.com/pypa/hatch) [![types - Pyright](https://img.shields.io/badge/types-pyright-blue.svg)](https://github.com/microsoft/pyright) [![Docs](https://img.shields.io/badge/docs-pdoc-blue)](https://kiln-ai.github.io/Kiln/kiln_core_docs/index.html)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| Apps    | [![MacOS](https://img.shields.io/badge/MacOS-black?logo=apple)](https://github.com/Kiln-AI/Kiln/releases/latest) [![Windows](https://img.shields.io/badge/Windows-0067b8.svg?logo=data:image/svg%2bxml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyBmaWxsPSIjZmZmIiB2aWV3Qm94PSIwIDAgMzIgMzIiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE2Ljc0MiAxNi43NDJ2MTQuMjUzaDE0LjI1M3YtMTQuMjUzek0xLjAwNCAxNi43NDJ2MTQuMjUzaDE0LjI1NnYtMTQuMjUzek0xNi43NDIgMS4wMDR2MTQuMjU2aDE0LjI1M3YtMTQuMjU2ek0xLjAwNCAxLjAwNHYxNC4yNTZoMTQuMjU2di0xNC4yNTZ6Ij48L3BhdGg+Cjwvc3ZnPg==)](https://github.com/Kiln-AI/Kiln/releases/latest) [![Linux](https://img.shields.io/badge/Linux-444444?logo=linux&logoColor=ffffff)](https://github.com/Kiln-AI/Kiln/releases/latest)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| Chat    | [![Discord](https://img.shields.io/badge/Discord-Kiln_AI-blue?logo=Discord&logoColor=white)](https://discord.gg/sVJEzDGu)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |

[<img width="220" alt="Download button" src="https://github.com/user-attachments/assets/a5d51b8b-b30a-4a16-a902-ab6ef1d58dc0">](https://github.com/Kiln-AI/Kiln/releases/latest) [<img width="220" alt="Quick start button" src="https://github.com/user-attachments/assets/aff1b35f-72c0-4286-9b28-40a415558359">](https://docs.getkiln.ai/getting-started/quickstart)

## 主要特色一览

- 🚀 **直观的桌面应用**: 一键即可在 Windows、MacOS 和 Linux 上使用的应用。 真正直观的设计。
- 🎛️ **微调功能**: 无需编写代码即可对 Llama、GPT4o 和 Mixtral 进行微调。 支持模型的自动无服务器部署。
- 🤖 **合成数据生成**: 通过我们的交互式可视化工具生成训练数据。
- 🤝 **团队协作**: 基于 Git 的版本控制系统适用于您的 AI 数据集。通过直观的用户界面，您可以轻松地与 QA、项目经理和领域专家在结构化数据（如示例、提示、评分、反馈和问题等）上进行协作。
- 📝 **提示生成**: 自动生成数据提示，包括思维链、少样本和多样本等。
- 🌐 **广泛支持多种模型和供应商**: 您可以通过 Ollama、OpenAI、OpenRouter、Fireworks、Groq、AWS 或任何兼容 OpenAI 的 API 使用各种模型。
- 🧑‍💻 **开源库与API接口**: 我们的 Python 库和 OpenAPI REST API 均采用 MIT 开源协议。
- 🔒 **隐私至上**: 我们无法查看您的数据。您可以自带 API 密钥，或使用 Ollama 在本地运行。
- 🗃️ **结构化数据**: 创建能够处理 JSON 的 AI 任务。
- 💰 **免费**: 我们的应用完全免费，且我们的库是开源的。

## 下载 Kiln 桌面应用

Kiln 桌面应用完全免费，支持 MacOS、Windows 和 Linux 系统。

[<img width="220" alt="Download button" src="https://github.com/user-attachments/assets/a5d51b8b-b30a-4a16-a902-ab6ef1d58dc0">](https://github.com/Kiln-AI/Kiln/releases/latest)

## 示范

在这个演示中，我仅用 18 分钟就创建了 9 个微调模型（包括 Llama 3.x、Mixtral 和 GPT-4o-mini），总成本不到 6 美元，效果非常出色。 [详情请见](guides/Fine%20Tuning%20LLM%20Models%20Guide.md)。

<a href="guides/Fine%20Tuning%20LLM%20Models%20Guide.md">
<img alt="Kiln Preview" src="https://github.com/user-attachments/assets/51db632b-be98-4fc6-a31c-0ba6fd54dcbb">
</a>

## 文档和指南

Kiln 非常易于上手，建议您启动桌面应用并开始使用。如有任何疑问或想深入了解，我们的 [文档随时为您解答](https://docs.getkiln.ai)。

- [快速入门](https://docs.getkiln.ai/getting-started/quickstart)
- [如何在 Kiln 中使用任何 AI 模型或服务提供商](https://docs.getkiln.ai/docs/models-and-ai-providers)
- [微调LLM模型](https://docs.getkiln.ai/docs/fine-tuning-guide)
- [指南：训练一个推理模型](https://docs.getkiln.ai/docs/guide-train-a-reasoning-model)
- [推理与思维链](https://docs.getkiln.ai/docs/reasoning-and-chain-of-thought)
- [合成数据生成](https://docs.getkiln.ai/docs/synthetic-data-generation)
- [与Kiln协作](https://docs.getkiln.ai/docs/collaboration)
- [数据评分与标签](https://docs.getkiln.ai/docs/reviewing-and-rating)
- [提示风格](https://docs.getkiln.ai/docs/prompts)
- [结构化数据 / JSON](https://docs.getkiln.ai/docs/structured-data-json)
- [组织Kiln数据集（标签与过滤器）](https://docs.getkiln.ai/docs/organizing-datasets)
- [我们的数据模型](https://docs.getkiln.ai/docs/kiln-datamodel)
- [修复响应](https://docs.getkiln.ai/docs/repairing-responses)
- [快捷键](https://docs.getkiln.ai/docs/keyboard-shortcuts)
- [隐私概览：隐私设计](https://docs.getkiln.ai/docs/privacy)

开发者可以参考我们的 [Kiln Python 库文档](https://kiln-ai.github.io/Kiln/kiln_core_docs/kiln_ai.html)。 了解如何将数据集加载到 Kiln 中，或在您的代码库或笔记本中使用 Kiln 数据集。

## 安装 Python 库

[![PyPI - Version](https://img.shields.io/pypi/v/kiln-ai.svg?logo=pypi&label=PyPI&logoColor=gold)](https://pypi.org/project/kiln-ai/) [![Docs](https://img.shields.io/badge/docs-pdoc-blue)](https://kiln-ai.github.io/Kiln/kiln_core_docs/index.html)

我们的开源[Python 库](https://pypi.org/project/kiln-ai/) 可以帮助您将 Kiln 数据集集成到自己的工作流程中，创建微调模型，在笔记本中使用 Kiln，构建自定义工具等！ [请查阅文档](https://kiln-ai.github.io/Kiln/kiln_core_docs/index.html) 获取更多示例。

```bash
pip install kiln-ai
```

## 了解更多

### 快速原型开发

新的模型和技术层出不穷。Kiln 让用户无需编写代码，就能轻松尝试多种方法，并在几次点击中进行比较。这有助于实现更高的质量和性能提升。

我们目前支持的内容包括：

- 多种提示技术：基础、少样本、多样本、修复与反馈
- 思维链 / 思考，可选择自定义“思考”指令
- 多种模型：GPT、Llama、Claude、Gemini、Mistral、Gemma、Phi
- 微调：利用您的 Kiln 数据集创建定制模型

未来，我们计划增加更多强大的无代码功能，如评估和 RAG。对于经验丰富的数据科学家，您现在就可以使用 Kiln 数据集和我们的 Python 库来实现这些技术。

### 跨技术与非技术团队协作

在开发 AI 产品时，通常有一位领域专家了解要解决的问题，而另一个技术团队则负责构建模型。Kiln 作为一个协作工具，有效地连接了这两个方面。

主题专家可以通过我们直观的桌面应用程序生成结构化数据集和评分，无需编写代码或使用技术工具。无需命令行或 GPU 支持。

数据科学家可以通过用户界面使用主题专家创建的数据集，或者利用我们的 Python 库进行深入分析。

QA 和 PM 能够更早地识别问题，并协助生成修复模型层问题所需的数据集内容。

数据集文件格式专为与 Git 配合使用而设计，旨在实现高效的协作和归属管理。多人可以同时贡献；通过使用 UUID 避免冲突，并在数据集中记录归属信息。你甚至可以在共享驱动器上共享数据集，使非技术团队成员无需了解 Git 即可参与数据和评估的贡献。

### 利用数据集打造高质量的 AI 产品

产品本身并不具备“数据集”，但 Kiln 可以帮助你创建一个。每次使用 Kiln 时，我们都会记录输入、输出、人工评分、反馈以及构建高质量模型所需的修复。使用得越多，积累的数据就越丰富。

随着数据集的扩大，您的模型质量会自动提升，因为模型会接触到更多优质内容和错误的示例。

如果你的产品目标发生变化或发现新的错误（这几乎是常态），你可以轻松地迭代数据集来解决问题。

## 贡献与开发

有关如何设置开发环境并参与 Kiln 项目的详细信息，请参阅 [CONTRIBUTING.md](CONTRIBUTING.md)。

## 引用

```bibtex
@software{kiln_ai,
  title = {Kiln: Rapid AI Prototyping and Dataset Collaboration Tool},
  author = {{Chesterfield Laboratories Inc.}},
  year = {2025},
  url = {https://github.com/Kiln-AI/Kiln},
  version = {latest}
}
```

## 许可证与商标

- Python 库： [MIT 许可协议](libs/core/LICENSE.txt)
- Python REST 服务器/API: [MIT 许可协议](libs/server/LICENSE.txt)
- 桌面应用程序：根据我们的 [EULA](app/EULA.md), 和 [源代码开放](/app)免费下载和使用. [许可协议](app/LICENSE.txt)
- Kiln 名称和标志是 Chesterfield Laboratories Inc的注册商标。

Copyright 2024 - Chesterfield Laboratories Inc.
版权所有 2024 - Chesterfield Laboratories Inc。