← Back to SinkAlert Dashboard

🇹🇭 ThaiLLM Deep Research

Comprehensive research on integrating ThaiLLM into SinkAlert for the BDI Hackathon 2026 Special Prize.

🏆 Key Insight: ThaiLLM creator Patipan Prasertsom (Lead Applied Scientist, BDI) is a judge. Using ThaiLLM superficially = losing the Special Prize. Using it deeply across a multi-model agentic pipeline = winning.

1. What Is ThaiLLM?

ThaiLLM is BDI's flagship national AI project — an open-weight, Apache 2.0 licensed Thai Large Language Model ecosystem. It is both an open model AND accessible via API.

Foundation Model

ThaiLLM/ThaiLLM-8B — continued pre-training of Qwen3-8B-Base on ~63B tokens (31.5B Thai + 24B English + 8B curated government, medical, legal, finance, news, education data).

Collaborative Ecosystem: Built by BDI, NECTEC, VISTEC, AIEAT, AIAT. Computing sponsored by Ministry of Digital Economy and Society.

2. Available Models

Core ThaiLLM Models (HuggingFace)

ModelSizeTypeKey Feature
ThaiLLM/ThaiLLM-8B8BFoundationQwen3-based, needs fine-tuning
ThaiLLM/ThaiLLM-8B-ToolUse8BTool CallingRL-tuned, 99.9% routing accuracy
ThaiLLM/ThaiLLM-8B-MedApp8BMedicalFine-tuned for appointments, reminders
ThaiLLM/ThaiLLM-30B30BMoEQwen3-MoE, higher capacity

Partner Instruct Models (Fine-tuned from ThaiLLM-8B)

ModelOrganizationKey Feature
Typhoon-SSCB 10X🏆 Tool calling via vLLM (hermes parser), 32K context
THaLLE-0.2KBTG LabsThinking/non-thinking modes, best Thai benchmarks
OpenThaiGPTAIEATAPI-hosted, tool calling examples
PathummaNECTECThinking variant, complex reasoning
KhanomTanLLM2PyThaiNLPGGUF quantized, easy local deployment

3. API Access

Official ThaiLLM Playground API (BDI's own infrastructure)

Base URL: https://thaillm.or.th/vllm-qwen/v1
Model: Qwen/Qwen3-30B-A3B-Instruct-2507-FP8
Protocol: OpenAI-compatible (/v1/chat/completions)
Auth: API key required (contact BDI for hackathon access)

This is the most authoritative API for the hackathon. Found in the visai-ai/thaillm-workshop .env.example as LLM_ARENA_1_BASE_URL.

OpenThaiGPT API (via Siam.AI)

Base URL: https://api.aieat.or.th/v1
Model: openthaigpt-1.5-7b-instruct
Auth: Dummy key (public research access)
Features: Tool calling, function calling
GitHub: github.com/OpenThaiGPT/openthaigpt1.5_api_examples

4. Thai Language Performance

BenchmarkImprovement vs Qwen3Score
ThaiExam (A-Level)+36 pp
Belebele-Thai+46 pp0.388 → 0.845
MMLU-Thai+2 pp
M3Exam+5.7 pp
THaLLE-0.2 (Thinking mode)M3 Exam 0.779, Flare CFA 0.852

5. SinkAlert Integration Strategy

4-Model Agentic Pipeline:
1️⃣ ThaiLLM-8B-ToolUse → Routes citizen LINE reports (99.9% accuracy)
2️⃣ Typhoon-S → Generates Thai-language road collapse alerts
3️⃣ THaLLE-0.2 → Complex reasoning: multi-factor risk analysis
4️⃣ ThaiLLM Playground API → Final alert synthesis on BDI's own infra

LINE Bot Architecture

LINE Messaging API → Your Server → ThaiLLM API
                    ↓
   1. Citizen sends "ถนนแถวสุขุมวิทซอย 22 ทรุดตัว"
   2. ThaiLLM-ToolUse classifies: damage_type=SUBSIDENCE, severity=HIGH
   3. Typhoon-S generates Thai response: "ขอบคุณสำหรับการแจ้งเตือน..."
   4. Risk data logged to SinkAlert pipeline

Daily DOH Reports

Pipeline: InSAR Data + Environmental Data → ThaiLLM Summary

คุณคือนักธรณีวิทยา AI ของกรมทางหลวง
กรุณาสรุปรายงานความเสี่ยงถนนทรุดตัวประจำวัน:
1. บทสรุปผู้บริหาร
2. พื้นที่เสี่ยงสูงสุด 5 อันดับ  
3. แนวโน้มการทรุดตัว
4. ข้อเสนอแนะสำหรับเจ้าหน้าที่
5. แผนปฏิบัติการเร่งด่วน

Special Prize Strategy 🏆

  1. Use ThaiLLM-8B-ToolUse for function calling — only purpose-built tool-calling Thai model
  2. Integrate with ThaiLLM Playground API (thaillm.or.th) — direct BDI connection
  3. Multi-model pipeline: Typhoon-S (chat) + THaLLE (reasoning) + ToolUse (routing)
  4. Demonstrate RAG with Thai-specific retrieval (adapt visai-ai/thaillm-fact-vector-db pattern)
  5. Show LINE Bot — uniquely Thai use case, 55M users, judges will appreciate
  6. Fine-tune ToolUse on road safety tools — publish dataset on HuggingFace

6. Key References

ResourceURL
ThaiLLM HuggingFacehuggingface.co/ThaiLLM
Official Playground APIthaillm.or.th
OpenThaiGPT APIapi.aieat.or.th/v1
ThaiLLM Workshop (Docker)github.com/visai-ai/thaillm-workshop
ThaiLLM Fact Vector DBgithub.com/visai-ai/thaillm-fact-vector-db
Typhoon-S (SCB 10X)huggingface.co/typhoon-ai/...
THaLLE-0.2 (KBTG)huggingface.co/KBTG-Labs/...
OpenThaiGPT Examplesgithub.com/OpenThaiGPT/...
GGUF Quantized Modelshuggingface.co/mradermacher
BDI Hackathon Pagebdi.or.th/bkkhackathon2026/