Third task verb: transform. Take text and produce different text with the same meaning — translation, rephrasing, reformatting.
result = Agent(model).run_sync("Translate to Spanish: 'Hello, how are you today?'")
print(result.output)
# something like: "Hola, ¿cómo estás hoy?"LLMs are excellent at transform. It's a pure language task with abundant training data — every English-to-Spanish parallel corpus contributed to the weights.
The pattern: input text + transformation directive.
result = Agent(model).run_sync(f"{directive}: {text}")| Directive | Example |
|---|---|
| Translate to X | "Translate to Spanish: ..." |
| Rewrite as formal | "Rewrite this email more formally: ..." |
| Convert to bullets | "Convert this paragraph to a bulleted list: ..." |
| Tone shift | "Rewrite this in a casual tone: ..." |
| Genre shift | "Rewrite this technical doc as if for a 10-year-old: ..." |
Create a free account to get started. Paid plans unlock all tracks.
Third task verb: transform. Take text and produce different text with the same meaning — translation, rephrasing, reformatting.
result = Agent(model).run_sync("Translate to Spanish: 'Hello, how are you today?'")
print(result.output)
# something like: "Hola, ¿cómo estás hoy?"LLMs are excellent at transform. It's a pure language task with abundant training data — every English-to-Spanish parallel corpus contributed to the weights.
The pattern: input text + transformation directive.
result = Agent(model).run_sync(f"{directive}: {text}")| Directive | Example |
|---|---|
| Translate to X | "Translate to Spanish: ..." |
| Rewrite as formal | "Rewrite this email more formally: ..." |
| Convert to bullets | "Convert this paragraph to a bulleted list: ..." |
| Tone shift | "Rewrite this in a casual tone: ..." |
| Genre shift | "Rewrite this technical doc as if for a 10-year-old: ..." |