> For the complete documentation index, see [llms.txt](https://docs.codewords.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.codewords.ai/automations/prompt-engineering.md).

# Prompt engineering

Tips and tricks for prompting Cody so you get better automations faster.

One of the easiest ways to get more out of CodeWords is learning how to talk to Cody well.

Treat Cody as both a place to ideate and an assistant that builds automations. These tips help you get clearer results, faster.

### Start simple

Think in terms of a minimum viable automation — a basic version you can test before you add complexity.

Build the core first, then add features, logic, and integrations once it’s working. If you’re unsure, describe the goal and ask Cody what a simple version would look like.

LLMs work better with information in chunks. Starting small gives you more control and usually gets you to a good result sooner.

### Provide numbered steps

For more complex builds, numbered steps help.

For example, if you’re building a content workflow and want Cody to use brand guidelines at a certain stage, ask Cody to request those guidelines when it reaches that step. That keeps the first prompt shorter and easier to follow.

### Give extra context

Share context about your role, a repetitive task you want to automate, or day-to-day friction. You can do this at the start, or after the core workflow works and you’re ready to extend it.

You can also ideate with Cody around your industry and challenges.

{% hint style="info" %}
**Example:** “I run a digital marketing agency managing social media for 25 local restaurants. My biggest challenge is creating enough content while tracking what performs best.”
{% endhint %}

### Be specific when you know the outcome

If you already know the problem and tools, say so — you’ll get there faster.

{% hint style="info" %}

1. “Create a workflow that scrapes website X, summarises the content, and emails me the result”
2. “Build a workflow that scrapes Google review data for restaurants and saves it into a CSV”
3. “Build something that can extract text from an image of a handwritten letter”
4. “Create a workflow that transcribes a YouTube video, distills it into notes, and stores it in my Google Doc”
   {% endhint %}

If you’re still figuring it out, vague aims are fine too:

{% hint style="info" %}

1. “I need something for social media”
2. “Make a workflow that helps with marketing”
3. “I want to automate my business”
   {% endhint %}

Cody won’t jump straight into building — it’ll ask clarifying questions and suggest ideas. That’s intentional.

### Upload reference images

Attach reference images with the **+** button in chat.

That’s useful when you’re targeting a specific integration, or when you’ve found an automation example you want to replicate. References help Cody see what you mean.

### Isolate testing

When something breaks, keep the debug focus narrow:

* Ask Cody to test integrations separately before it starts building
* Ask Cody to isolate and debug one failing section until it’s fixed

### Focus on outcomes, not tools

Describe what you want to achieve. Cody often suggests a better approach than the tool you first had in mind.

**Focus on&#x20;*****what*****:**

* “I want to extract product prices from competitor websites every week.”
* “I want to analyze customer reviews and tell me the main themes.”
* “I want to automatically respond to simple customer emails.”

Give enough detail for smart decisions:

{% hint style="info" %}
“Build me a lead generation workflow that:

* Finds marketing agency owners on LinkedIn
* In the US, with 10–50 employees
* Gets their contact info and company details
* Outputs to a Google Sheet for my sales team
* Processes about 50 leads per week.”
  {% endhint %}

### Be specific about data

Extra detail about your data helps Cody align the build and suggest refinements.

**Example:**

I have a Google Spreadsheet with:

* Column A: Customer names
* Column B: Their LinkedIn URLs
* Column C: Company names
* About 200 rows updated weekly

I want to add job titles and company size in columns D and E.

Say where results should go, which integrations you use, and what notifications you need.

**Example:**

When the workflow finds new leads, I want it to:

* Add them to my HubSpot CRM in the ‘Marketing Qualified’ pipeline
* Send a Slack message to our #sales channel with the count
* Email me a summary if it finds more than 10 high-priority leads

Cody will ask follow-up questions when something is missing — you don’t have to anticipate every edge case yourself.

### Version history

If you want to go back to an earlier version of a workflow you built in chat, use [Version history and restore](https://docs.codewords.ai/automations/version-history-and-restore-chat).

You can also ask Cody to undo the last set of changes while you’re still in the chat.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.codewords.ai/automations/prompt-engineering.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
