Tianji
Tianji is a Python-based LLM application framework focused on teaching traditional Chinese social scenarios (etiquette, gift-giving, toasting). It provides tutorials and implementations for prompt engineering, RAG (retrieval-augmented generation), Agent-based systems, and model fine-tuning using open models like Qwen and InternLM.
Key facts
Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.
| Field | Value |
|---|---|
| Repository | SocialAI-tianji/Tianji |
| Owner | SocialAI-tianji |
| Primary language | Python |
| License | Apache-2.0 — OSI-approved |
| Stars | 1.8k |
| Forks | 158 |
| Open issues | 4 |
| Latest release | Unknown |
| Last updated | 2025-04-29 |
| Source | https://github.com/SocialAI-tianji/Tianji |
What Tianji is
Project combines LangChain/LlamaIndex RAG implementations, MetaGPT Agent framework, Transformer/Xtuner fine-tuning (LoRA, full), and support for multiple LLM backends (ChatGPT, Qwen, DeepSeek, ERNIE). Active development with latest push April 2025; 1.8k stars, minimal issue backlog, no formal release versioning.
Get the Tianji source
Clone the repository and explore it locally.
git clone https://github.com/SocialAI-tianji/Tianji.gitcd Tianji# follow the project's README for install & configurationNeed it deployed, integrated, or customized instead? DEV.co ships production installs.
Best use cases
Implementation considerations
- Installation via `pip install -e .` requires local setup; no container/pre-built images provided. Verify dependency compatibility with your Python/CUDA environment.
- Mandatory .env configuration for API keys (ZhipuAI, SiliconFlow). Plan secret management strategy for team deployment.
- RAG modules depend on external frameworks (LangChain, LlamaIndex); verify framework versions align with Tianji's expected APIs before integrating.
- Fine-tuning examples use Qwen models; adapting to other base models may require config rewriting (Xtuner/Transformer-specific).
- Data downloading from HuggingFace; slow/restricted access may require HF_ENDPOINT mirror and HF_TOKEN configuration.
When to avoid it — and what to weigh
- Production-grade reliability required — No versioned releases, unstable code history (last push April 2025), and design focused on education rather than production robustness. Agent module marked 'under repair'.
- Closed-source or proprietary model dependencies preferred — Framework tightly integrated with open models (Qwen, InternLM). Limited support for closed-model workflows; requires API keys for online inference.
- Non-English-speaking audience support — Entire codebase, documentation, and training data are Chinese-centric. English README exists but is secondary; localizations minimal.
- Minimal maintenance commitment acceptable — Project maintained by single/small team (SocialAI-tianji org, ~158 forks). No commercial backing or SLA guarantees.
License & commercial use
Apache License 2.0 (permissive OSI license). Permits commercial use, modification, and distribution with attribution and liability disclaimer. No restrictions on derivative works or business use.
Apache 2.0 explicitly permits commercial use. However, underlying LLM models (Qwen, InternLM, Baidu ERNIE, DeepSeek) may have distinct commercial licensing terms—verify each model's license separately before production deployment. No commercial support or warranty from Tianji project.
DEV.co evaluation signals
Editorial assessment — not user reviews. Directional, with an explicit confidence level.
| Signal | Assessment |
|---|---|
| Maintenance | Active |
| Documentation | Adequate |
| License clarity | Clear |
| Deployment complexity | Moderate |
| DEV.co fit | Good |
| Assessment confidence | High |
API key management via .env file is basic; no encryption at rest or in transit enforcement. No explicit security audit or vulnerability disclosure policy disclosed. Production use would require secrets rotation, API rate limiting, and LLM prompt injection/jailbreak mitigation strategies (not addressed in project).
Alternatives to consider
LangChain / LlamaIndex (standalone)
Mature, independently maintained frameworks with broader LLM support. Use if you need production-grade RAG without domain-specific (Chinese etiquette) bias.
MetaGPT (standalone)
Dedicated Agent framework with better documentation and larger community. Choose if Agent-first architecture is priority over unified educational toolkit.
Eliminate model fine-tuning and deployment burden. Preferred if production reliability, SLAs, and vendor support outweigh cost and data privacy concerns.
Build on Tianji with DEV.co software developers
Explore Tianji's step-by-step tutorials and pre-built examples for prompt engineering, RAG systems, and fine-tuning. Apache 2.0 licensed. Start learning on GitHub.
Talk to DEV.coRelated open-source tools
Surfaced by semantic similarity across the DEV.co open-source index.
Related on DEV.co
Explore the category and the services that help you build with it.
Tianji FAQ
Can I use Tianji models in production?
Do I need GPU/CUDA to run Tianji?
What if I want to fine-tune on non-Chinese data or non-etiquette domains?
Is there commercial support or consulting?
Software developers & web developers for hire
From first prototype to production, DEV.co delivers software development services around tools like Tianji. Our software development agency staffs experienced software developers and web developers for custom software development, web development, integrations, and ongoing support across rag frameworks and beyond.
Ready to build LLM applications?
Explore Tianji's step-by-step tutorials and pre-built examples for prompt engineering, RAG systems, and fine-tuning. Apache 2.0 licensed. Start learning on GitHub.