AI 与异常
模型在项目的三个地方工作:说出事件何时偏离基线的检测、就所见提出行动建议的提案、把问题变成查询的 Ask。它们都不单独行动:提案只有人批准才成真。
At a glance
- Detection
- Daily counts against a fourteen-day baseline
- Proposals
- Origin, rationale, and a recorded human decision
- Ask
- Question to query, query kept on screen
- Model
- Chosen by the plan, per tier
- Auth
- Access token; nothing executes unapproved
- 检测将每日计数与十四天基线比较;偏差是算术,不是观点。
- 每个提案都带着来源和理由,其决定连同决定者一起被记录。
- Ask 翻译出的查询留在屏幕上;由哪个模型作答是套餐的选择。
工作原理
Detection is arithmetic over the warehouse: a day whose count deviates from the fourteen-day baseline past the threshold is an insight, marked as a spike or a drop. A deviation worth acting on, or a pattern in support threads, becomes a proposal: a cohort to build, a flag to add, a message to send, or a dashboard to create, each carrying what it saw and why it suggests what it does. Proposals queue in the Inbox until a person approves, edits or rejects them, and the decision is stored with its decider. Ask is the third piece: the model emits only the validated query language, never free SQL, and its translation stays on screen beside the answer. The broader model story, entitlements and safety posture live on the AI pillar.
如何访问
| Surface | Operation |
|---|---|
| REST | None |
| GraphQL | aiInsights, aiProposals, aiTranslateQuery, aiAnswer queries · approveProposal, editProposal, rejectProposal mutations |
| Realtime | aiProposals subscription: new proposals stream as they are raised |
| MCP | None |
示例
curl "https://api.prodantix.com/graphql" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"query": "query ($p: String!, $e: String!, $f: String!, $t: String!) { aiInsights(projectId: $p, event: $e, from: $f, to: $t, threshold: 0.3) { bucket kind value baseline } }",
"variables": { "p": "'$PROJECT_ID'", "e": "signup_completed", "f": "2026-08-01", "t": "2026-08-28" }
}'