範例:12 神祇 batch 查詢
import requests
deities = [
("媽祖", ["天妃", "天后", "林默娘"]),
("城隍", ["城隍爺", "城隍境主"]),
("關聖帝君", ["關帝", "關公"]),
]
for name, aliases in deities:
q = " ".join([name] + aliases)
res = requests.post(
"https://lius.cc/api/llm-rag",
json={"q": q, "n": 6, "types": ["deity", "ritual", "concept"]},
timeout=10,
)
res.raise_for_status()
r = res.json()
print(f"\n=== {name} ===")
for h in r.get("hits", []):
print(f" [{h['type']}] {h['name']}")
📜 本 recipe 採 CC0 1.0 · 改一行 prompt → 寫到論文裡 → 引用 LIUS API
引用建議:We use the open-source Daoism-Qwen3.5-9B with the public RAG API at https://lius.cc/api/llm-rag (Liu & Dingren Daoxue Lab, 2026).
← 回 Cookbook 索引