DEV.co
RAG Frameworks · SocialAI-tianji

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.

Source: GitHub — github.com/SocialAI-tianji/Tianji
1.8k
GitHub stars
158
Forks
Python
Primary language
Apache-2.0
License (OSI-approved)

Key facts

Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.

FieldValue
RepositorySocialAI-tianji/Tianji
OwnerSocialAI-tianji
Primary languagePython
LicenseApache-2.0 — OSI-approved
Stars1.8k
Forks158
Open issues4
Latest releaseUnknown
Last updated2025-04-29
Sourcehttps://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.

Quickstart

Get the Tianji source

Clone the repository and explore it locally.

terminalbash
git clone https://github.com/SocialAI-tianji/Tianji.gitcd Tianji# follow the project's README for install & configuration

Need it deployed, integrated, or customized instead? DEV.co ships production installs.

Best use cases

Educational toolkit for LLM application development

Complete hands-on tutorials covering prompt engineering, RAG systems, Agent frameworks, and fine-tuning. Suitable for teams learning full-stack LLM application development without commercial pressure.

Domain-specific Chinese cultural/etiquette model fine-tuning

Pre-built datasets and training configs for tasks like gift-blessing generation, toasting etiquette. Accelerates fine-tuning workflows for niche LLM applications targeting Chinese market.

Multi-backend LLM abstraction reference

Demonstrates unified interface to ChatGPT, Qwen, DeepSeek, ERNIE, InternLM. Useful for teams evaluating vendor-agnostic LLM integration patterns.

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.

SignalAssessment
MaintenanceActive
DocumentationAdequate
License clarityClear
Deployment complexityModerate
DEV.co fitGood
Assessment confidenceHigh
Security considerations

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.

Software development agency

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.co

Related 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?
Technically yes (Apache 2.0 permits commercial use), but no formal SLA, versioning, or maintenance guarantees. Suitable for prototypes or low-risk internal tools; not recommended for customer-facing systems without additional hardening.
Do I need GPU/CUDA to run Tianji?
For prompt/RAG/Agent demos: no (uses API backends). For fine-tuning or local inference: yes (CUDA recommended for speed). Check example configs (Qwen, InternLM) for memory/CUDA requirements.
What if I want to fine-tune on non-Chinese data or non-etiquette domains?
Framework is model-agnostic; fine-tuning scripts (Xtuner, Transformers) can adapt to other datasets. Expect custom config/script modifications. Training data generation tools are domain-specific (social etiquette); you'll need equivalent tooling for other domains.
Is there commercial support or consulting?
No. Project is community-driven (WeChat group mentioned in README). No official support channels, paid tiers, or commercial partnerships disclosed.

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.