Files
prompt-to-signature/agent.json
2025-11-04 22:51:27 -05:00

46 lines
2.4 KiB
JSON

{
"signature_generator.generator": {
"traces": [],
"train": [],
"demos": [],
"signature": {
"instructions": "Generate a DSPy signature with proper field types.\n\nIMPORTANT: For ANY structured/nested JSON output with multiple fields or nested objects:\n- DO NOT use a simple str field with JSON instructions\n- ALWAYS use type='pydantic' with a complete PydanticModelSchema\n- Define the full nested structure with all fields properly typed\n\nExamples:\n- Simple output: \"answer: str\" is fine\n- Complex output like medical records, forms, multi-field objects: MUST use pydantic models",
"fields": [
{
"prefix": "Prompt:",
"description": "Natural language description of the desired functionality."
},
{
"prefix": "Task Description:",
"description": "Clear description of what the signature aims to accomplish."
},
{
"prefix": "Signature Fields:",
"description": "List of input and output fields for the signature.\n\n CRITICAL RULES:\n 1. If the prompt describes a structured output with multiple nested fields (e.g., medical records, user profiles, complex forms), you MUST use type='pydantic' with a full PydanticModelSchema\n 2. NEVER use type='str' with a description like 'JSON string containing...' for complex outputs\n 3. For Pydantic models: define ALL nested fields properly in the schema with correct types\n 4. Simple outputs (single values) can use basic types like str, int, bool\n 5. Use Literal types for enumerated values (e.g., severity levels, status codes)\n\n Examples:\n - BAD: structured_output: str = \"A JSON containing patient data...\"\n - GOOD: medical_record: MedicalRecord (with full PydanticModelSchema defining all nested fields)\n \n "
},
{
"prefix": "Signature Name:",
"description": "Suggested class name for the signature (PascalCase)"
}
]
},
"lm": {
"model": "openrouter/anthropic/claude-haiku-4.5",
"model_type": "chat",
"cache": true,
"num_retries": 3,
"finetuning_model": null,
"launch_kwargs": {},
"train_kwargs": {},
"temperature": 1.0,
"max_tokens": 16000
}
},
"metadata": {
"dependency_versions": {
"python": "3.11",
"dspy": "3.0.3",
"cloudpickle": "3.1"
}
}
}