Prompt Engineering with Weaver
Weaver can assemble a workflow from almost any instruction. But if you give it a vague prompt, it will ask follow-up questions and slow you down. If you give it a clear, structured prompt, Weaver has everything it needs to build the agent immediately with no follow-up questions.
Write every prompt with Goal → Inputs → Skills → Outputs → Constraints.
That structure gives Weaver complete context and reduces back-and-forth.
1. Why Prompt Engineering Matters
Prompts are the blueprint Weaver uses to create workflows. Clear prompts produce modular, testable agents that run correctly on the first try. Ambiguous prompts create guesswork and messy flows.
If you want ready-made examples, see the Prompt Library. This page teaches you how to write prompts yourself.
2. The Standard Prompt Structure
Every strong Weaver prompt includes these five sections:
Template
Goal: [Outcome in one clear sentence]
Inputs:
- [Required user inputs]
- [Optional inputs if needed]
Skills:
1. [Actionable step 1]
2. [Actionable step 2]
3. [Actionable step 3]
Outputs:
- [Exact format: JSON schema, Markdown, table, file]
Constraints:
- [Word limits, item caps, tone, audience]
- [Formatting rules or compliance needs]
When you provide all five sections, Weaver has no missing context and it builds the agent right away instead of asking questions.
3. Writing Effective Prompts
Be Specific with Goals
Goals
❌ Vague: "Write about Kyoto."
✅ Clear: "Draft a 600-word blog about Kyoto with three sections: food, culture, and transport."
Break Work into Skills
Skills
Goal: Weekly sales digest
Skills:
1. Fetch weekly_sales.csv from S3
2. Summarise data into 5 bullet points
3. Generate bar chart PNG
4. Email digest to
[email protected]
Define Outputs and Constraints
Constraints
Goal: Create a 5-minute finance podcast script.
Skills:
1. Gather 3 finance stories
2. Write intro, 3 sections, and a closing
3. Add one host aside per story
Outputs:
- Markdown with sections: Intro, Story 1, Story 2, Story 3, Closing
Constraints:
- Max 700 words
- Conversational tone
- Exclude stock tips
4. Advanced Prompt Techniques
Add Modifiers
Use constraints to sharpen results.
Advanced
Goal: Write a one-page product brief.
Inputs:
- product_name
- competitor_names[]
Skills:
1. Research competitors
2. Summarise positioning
3. Write product brief
Outputs:
- Markdown with headings
Constraints:
- Limit to 350 words
- Reading level: Year 9
- Include at least 3 reference links
Few-Shot Anchors
Show Weaver the format you want by including one example.
Style
Goal: Generate a 120-word LinkedIn post.
Skills:
1. Capture one clear benefit
2. Add two use cases
3. End with a question
Constraints:
- Professional but warm tone
- 120 words max
Example to follow:
"We reduced CSV import time by 70%. Teams can now clean data and build reports in one session. What would you import first?"
Multimodal Prompts
Weaver can parse URLs and images directly.
Multimodal
Goal: Convert a blog post into a help guide.
Inputs:
- blog_url: string
Skills:
1. Read the blog content at {blog_url}
2. Extract step-by-step instructions
3. Rewrite as a numbered help guide
Outputs:
- Markdown with H2 headings and steps
Constraints:
- Preserve technical terms from the source
Multimodal
Goal: Build an agent from a workflow diagram.
Inputs:
- diagram_file: PNG or SVG
Skills:
1. Parse the diagram
2. Identify components and connections
3. Recreate the workflow in Canvas
Outputs:
- Complete wired agent
Constraints:
- Use labels from the diagram as component names
5. Debugging and Iteration
When results are off, refine the prompt rather than rewriting the entire agent.
Debugging
The summary was too long. Limit it to 150 words. Format as bullet points only.
Debugging
Return JSON with these keys only: title, slug, summary, keywords[]. No other keys. Missing values = null.
For full troubleshooting, see Debugging with Weaver.
6. Common Mistakes and Fixes
Mistake | Why It Fails | What To Do Instead |
---|
Vague goal | Weaver lacks context and asks follow-ups | State a measurable outcome in one sentence |
One giant skill | Hard to test or debug | Break into 3–5 numbered steps |
Missing constraints | Outputs sprawl or vary | Specify format, tone, and limits |
Unlimited output | Token waste and errors | Add caps (e.g., 200 words, 5 bullets) |
Ambiguous tone | Wrong style or locale | Define audience, tone, and language (e.g., UK English) |
Next Steps