Tianji  by SocialAI-tianji

LLM app for navigating social situations with nuanced understanding

created 1 year ago
1,465 stars

Top 28.6% on sourcepulse

GitHubView on GitHub
Project Summary

Tianji is an open-source project focused on developing large language models for traditional Chinese social etiquette scenarios. It targets developers and users looking to build AI applications for nuanced human interactions, offering tutorials and tools for prompt engineering, RAG, Agents, and LLM fine-tuning. The project aims to equip users with full-stack development capabilities for LLM applications in specific social contexts.

How It Works

Tianji employs a multi-faceted approach to address social etiquette. It leverages pure prompt engineering for direct LLM interaction, Agent frameworks (like MetaGPT) for more complex, customized responses, and RAG with knowledge bases for retrieving specific etiquette rules. Additionally, it supports fine-tuning various LLM bases (e.g., InternLM, Qwen) using techniques like LoRA with curated social etiquette datasets. This combination allows for both general conversational ability and specialized knowledge retrieval and generation.

Quick Start & Requirements

  • Install: pip install -e .
  • Prerequisites: Python environment. API keys for services like ZhipuAI or Siliconflow are required and configured via a .env file. For network search capabilities in Agent mode, a TAVILY_API_KEY is needed. Hugging Face token (HF_TOKEN) may be required for certain model downloads.
  • Running Demos:
    • Prompt WebUI: python3 run/tianji_prompt_webui.py
    • Agent WebUI: streamlit run run/metagpt_webui.py
    • RAG LangChain: python run/demo_rag_langchain_onlinellm.py
  • Resources: Requires API keys and potentially significant compute for fine-tuning. Model downloads can be large.
  • Links: Hugging Face Data, OpenXLab Wish App

Highlighted Details

  • Specializes in seven key social interaction domains: toasting etiquette, hospitality, gifting, well-wishing, communication, awkward situation resolution, and conflict management.
  • Provides open-source datasets and tools for data manufacturing and cleaning, specifically for social etiquette scenarios.
  • Supports a range of LLM providers including ChatGPT, ZhipuAI, ERNIE, DeepSeek, InternLM, and Qwen.
  • Includes example fine-tuned models for specific scenarios like "sending blessings" with style variations.

Maintenance & Community

The project actively updates its modules and models, with recent activity including model version updates, Agent module refactoring, and knowledge base enhancements. It encourages community contributions via Pull Requests and provides guidance for replicating the project. Links to community resources like WeChat groups are mentioned.

Licensing & Compatibility

The README does not explicitly state a license. However, the open-source nature and availability of code and data on Hugging Face suggest a permissive approach, though specific terms for commercial use or closed-source linking are not detailed.

Limitations & Caveats

The project is still under active development, with several roadmap items indicating ongoing work, such as adding intent recognition and expanding supported API calls. Some Hugging Face repositories may require specific access permissions. The absence of a clearly stated license could be a barrier for some users.

Health Check
Last commit

3 months ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
0
Star History
149 stars in the last 90 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems).

LangBot by langbot-app

0.8%
13k
IM bot platform for the LLM era
created 2 years ago
updated 2 hours ago
Feedback? Help us improve.