Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Prompts as Contracts: How the SEO Master Agent Turns an LLM Into a Typed Function

说明与用途

SEO Master Agent 通过严格的 JSON 合约,使 LLM 输出可预测,支持多 SEO 工作流的自动化 UI 渲染。

问题

Ensuring LLM outputs are predictable and machine‑processable for SEO workflows.

结果

The agent enforces typed JSON contracts, enabling automated UI rendering and robust error handling across multiple LLM providers.

工作流

  • Define TASK_TYPES and REQUIRED_INPUTS
  • Validate inputs, return 422 on missing
  • Build system prompt that pins output shape
  • Send request to chosen LLM via LiteLLM
  • Receive structured JSON, store in ExecutionLog
  • Expose GET /api/tasks/{task_id} for result retrieval

证据

every task type forces the LLM to return only a raw JSON object with fixed keys. No markdown fences.

来源

POST /api/settings/keys stores keys in local SQLite as a self-host convenience — flagged as not-a-secrets-manager, env vars recommended for production.

来源

  • 记录日期: 2026-10-12T23:41:13.370Z