鼎稔道學館
← 開源 LLM/API

LIUS LLM API

這是 LIUS 道教 AI 對外公開 contract:先取已發布館藏,再生成有 citation 的回答。核心端點支援 CORS、OPTIONSOpenAPI JSON

Contracts

EndpointMethod用途
/api/llm-ragGET / POST公開館藏檢索;回傳 hits、context_blocks、citation、answerability、retrieval_policy。
/api/llm-rag/answerGET / POST先 retrieve,再以固定模板輸出有 citation 的回答草稿;沒有來源就不輸出定論。
/api/llm/generatePOSTdemo 用生成端點;narrative / publishing / grant 會先走正式 RAG contract。
/api/llm/infrastructure-manifestGET五件套研究基礎設施 manifest,適合 AI agent、搜尋引擎與審查引用。
/api/llm/openapi.jsonGETOpenAPI 3.1 contract;支援 CORS,供外部工具與前端匯入。
/api/llm/benchmark.jsonlGETDaoEval v0.1 公開題庫 JSONL;支援 suite、layer、limit query。
/api/llm/leaderboard.jsonGETDraft / official gate 分離的 leaderboard JSON;正式 verified runs 目前為 0。
/api/llm/runner-spec.jsonGET外部重跑規格:runner、grader、provider env names、score formula 與 secret policy。
/api/llm/whitepaper-risGETDaoEval RIS citation,供 Zotero、Mendeley 等文獻工具匯入。
/api/llm/whitepaper-csl-jsonGETDaoEval CSL JSON citation,供 citeproc 與學術 agent 直接解析。
/CITATION.cffGETCitation File Format;供 GitHub、Zenodo 與軟體引用工具辨識。

Retrieve

curl -sS https://lius.cc/api/llm-rag \
  -H 'content-type: application/json' \
  -H 'X-Request-ID: demo-001' \
  -d '{"q":"城隍 職司","n":5,"types":["deity","paper"]}'

Answer

curl -sS https://lius.cc/api/llm-rag/answer \
  -H 'content-type: application/json' \
  -d '{"q":"三朝醮的流程重點是什麼?","n":4,"types":["ritual","paper"]}'

OpenAPI

curl -sS https://lius.cc/api/llm/openapi.json

Response Contract

X-Request-ID

每次請求的追蹤 id;可由 client 指定,也會在 response header 回傳。

hits

原始 top-N 已發布 LIUS 節點,含 url、type、score 與 citation。

context_blocks

可直接注入模型的引用文本,每段以 [1]、[2] 標號。

answerability

檢索結果是否足以回答;低信心時應保留疑問。

retrieval_policy

公開檢索策略與限制,目前 visibility 為 published_only。

公開 API 只檢索 published 節點並排除 junk;RAG 排序不是學術定論。正式論文、法務、醫療、祭儀或個人重大決策仍需回到原始來源與合格專業者確認。
LIUS LLM API · RAG / Answer / Generate · 鼎稔道學館