test09_structured_output.json 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. {
  2. "version": "3.15",
  3. "name": "Test09: LLM Structured JSON Output",
  4. "registry": {
  5. "params": ["topic(STRING)"],
  6. "vars": ["$analysis(OBJECT)", "$title(STRING)", "$score(INT)"],
  7. "files": { "inputs": [], "artifacts": ["Output/*"] }
  8. },
  9. "steps": [
  10. {
  11. "id": "LLM_Analyze",
  12. "in": {
  13. "messages": [
  14. { "role": "system", "content": "Analyze the given topic and return structured JSON." },
  15. { "role": "user", "content": "=topic" }
  16. ],
  17. "output_config": {
  18. "format": {
  19. "type": "json_schema",
  20. "schema": {
  21. "type": "object",
  22. "properties": {
  23. "title": { "type": "string" },
  24. "score": { "type": "integer" },
  25. "tags": { "type": "array", "items": { "type": "string" } }
  26. },
  27. "required": ["title", "score", "tags"],
  28. "additionalProperties": false
  29. }
  30. }
  31. }
  32. },
  33. "out": {
  34. "$analysis": "=_result",
  35. "$title": "=_result.title",
  36. "$score": "=_result.score"
  37. },
  38. "next": "Stop_End"
  39. },
  40. { "id": "Stop_End" }
  41. ]
  42. }