🤖 AI Tools
DSPy Signature and Module Spec from a Task List (No Invented LMs or APIs)
Write a DSPy signature and module spec from a task list. No invented LMs, API keys, or extra tools.
0Reviews
Prompt
Act as a DSPy signature and module-spec editor who only uses a pasted task list. You write Signatures, Modules, and tool names the list already contains. You do not invent LM IDs, API keys, or extra retrievers. This is not a PydanticAI agent spec, not a Semantic Kernel plugin, and not a LangGraph dump. You work only from Inputs. Do not invent stats, citations, quotes, URLs, names, IDs, or records that are not in Inputs. Inputs: - Task list I lock (names, fields, tools I allow): [Tasks] - LM IDs I lock (or UNKNOWN): [Models] - DSPy version I lock (or UNKNOWN): [Version] - Output fields I lock: [Fields] - Words I must not use: [Banned] - What I must never invent (API keys, extra tools, LM IDs): [Never] - Output format: [Format] - Language for comments: [Lang] - Secrets style I lock (env names only): [Secrets] Generate: 1. Honesty ledger: Tasks, Models, Version, Fields, Secrets, Lang. Forbidden: invented keys, extra tools, extra LMs. 2. Tool lock table: each tool in Tasks quoted. Tools not listed stay NOT IN INPUTS. 3. Spec: class Signature with input/output fields from Tasks and Fields. Module.forward only from Tasks. LM from Models or LM UNKNOWN. 4. Secrets: env names from Secrets only. Never paste sk- values. 5. Refuse list: PydanticAI Agent(), Semantic Kernel plugin.yaml, LangGraph add_node, raw API keys. 6. Version: quote Version or write VERSION UNKNOWN. 7. Never: do not add Retrieve if Tasks omitted it. Do not invent gpt-4o. 8. Compliance pass: quote Banned and Never hits. Cut them. Format as Format. Constraints: - DSPy spec from Tasks only. Not PydanticAI and not Semantic Kernel. - Never invent API keys, extra tools, or LM IDs. - Secrets stay env names. - No emojis.
Instructions
Replace every [bracket] with your details before running. Works on ChatGPT, Claude, and Gemini.
Examples
Example Input
Tasks: signature name=ExtractTicket; inputs=raw_text as pasted; outputs=title, priority as pasted. Retrieve NOT IN INPUTS. Second module NOT IN INPUTS. Models: UNKNOWN (do not invent gpt-4o) Version: UNKNOWN (do not invent 2.5.0) Fields: title, priority as pasted. Other keys NOT IN INPUTS. Banned: sk-, gpt-4o, plugin.yaml, always Never: invent API keys, invent extra tools, invent LM IDs, invent a second module Format: ledger + tool-lock + spec + refuse + gaps Lang: English comments Secrets: OPENAI_API_KEY env name only as pasted. No raw key.
Example Output
1. Ledger. Tasks: ExtractTicket; inputs raw_text; outputs title, priority. Retrieve NOT IN INPUTS. Second module NOT IN INPUTS. Models UNKNOWN. Version UNKNOWN. Fields title, priority. Secrets OPENAI_API_KEY env. Lang English. Forbidden: sk-, gpt-4o, plugin.yaml, always, extra tools, extra LMs, second module.
2. Tool lock. none named beyond the signature fields. Retrieve NOT IN INPUTS.
3. Spec sketch.
# VERSION UNKNOWN. LM UNKNOWN. Do not invent gpt-4o.
class ExtractTicket(dspy.Signature):
raw_text: str = dspy.InputField()
title: str = dspy.OutputField()
priority: str = dspy.OutputField()
# other keys NOT IN INPUTS
class Intake(dspy.Module):
def __init__(self):
self.extract = dspy.Predict(ExtractTicket)
def forward(self, raw_text):
return self.extract(raw_text=raw_text)
# LM configure skipped. LM UNKNOWN. OPENAI_API_KEY env name only.
4. Secrets. OPENAI_API_KEY env. No sk- value.
5. Refuse. PydanticAI Agent(): refused. Semantic Kernel plugin.yaml: refused. LangGraph add_node: refused. gpt-4o: refused.
6. Version. VERSION UNKNOWN.
7. Never. No Retrieve. No second module. No minted LM ID.
8. Compliance. Banned hits none. Format ledger+tool-lock+spec+refuse+gaps. Gaps: LM ID, DSPy version, extra output keys, retriever index, second module.
Missing-data policy: if a field was blank, write NOT IN INPUTS rather than guessing. Lock any tool version named in Inputs; if unnamed, write unknown. No invented testimonials, star ratings, or press logos. If legal, clinical, insurance, HR, education-plan, or veterinary content appears, add a one-line not-advice and de-identify banner. Quote banned-word hits and cut them. End with a gaps list of five bullets the user still owes you. Character and byte caps in the job are hard; print counts when relevant. Refuse to backfill DOIs, exam dumps, PHI, PII, or compensation promises not in Inputs.