easyStudy question · answer published in Prompt Engineering interview questions, so no pointspythonstructured-output
Parsing a JSON reply in Python
What does this Python code print?
import json
data = json.loads('{"tags": ["rag", "eval"], "score": null}')
print(len(data["tags"]), data["score"])Discussion 0
Join free to post in the discussion.
Related questions
- The required keyword in JSON SchemaAI Engineer (LLM & Generative AI)
- Getting reliable JSON outputAI Engineer (LLM & Generative AI)
- Tracing a retry helperAI Engineer (LLM & Generative AI)
- What schema-constrained output guaranteesAI Engineer (LLM & Generative AI)
- Cosine of a scaled vectorAI Engineer (LLM & Generative AI)
- Guaranteeing valid JSON outputAI Engineer (LLM & Generative AI)
- Field order in an output schemaAI Engineer (LLM & Generative AI)
- Field order in structured outputAI Engineer (LLM & Generative AI)