(no commit message)

This commit is contained in:
2025-11-04 11:00:14 -05:00
parent 9fbbbf4135
commit 8adeb14943
7 changed files with 452 additions and 51 deletions

View File

@@ -1,22 +1,26 @@
{
"signature_generator.generator": {
"signature_generator.generator.predict": {
"traces": [],
"train": [],
"demos": [],
"signature": {
"instructions": "Given the fields `prompt`, produce the fields `task_description`, `signature_fields`, `signature_name`.",
"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"
"description": "Natural language description of the desired functionality."
},
{
"prefix": "Reasoning: Let's think step by step in order to",
"description": "${reasoning}"
},
{
"prefix": "Task Description:",
"description": "Clear description of what the signature accomplishes"
"description": "Clear description of what the signature aims to accomplish."
},
{
"prefix": "Signature Fields:",
"description": "List of input and output fields for the signature"
"description": "List of input and output fields for the signature.\n\nCRITICAL RULES:\n1. 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\n2. NEVER use type='str' with a description like 'JSON string containing...' for complex outputs\n3. For Pydantic models: define ALL nested fields properly in the schema with correct types\n4. Simple outputs (single values) can use basic types like str, int, bool\n5. Use Literal types for enumerated values (e.g., severity levels, status codes)\n\nExamples:\n- BAD: structured_output: str = \"A JSON containing patient data...\"\n- GOOD: medical_record: MedicalRecord (with full PydanticModelSchema defining all nested fields)"
},
{
"prefix": "Signature Name:",
@@ -25,15 +29,15 @@
]
},
"lm": {
"model": "gemini/gemini-2.5-pro-preview-03-25",
"model": "gpt-5-2025-08-07",
"model_type": "chat",
"cache": true,
"num_retries": 3,
"finetuning_model": null,
"launch_kwargs": {},
"train_kwargs": {},
"temperature": 0.7,
"max_tokens": 4096
"temperature": 1.0,
"max_completion_tokens": 16000
}
},
"metadata": {