Emergent

Building Your App › Prompt Engineering

Prompting - Basics

Here's the ABCs of working with Emergent and how you should prompt the agent to get the best and most efficient results.

Why This Matters

The foundation of every app in Emergent is a good initial prompt - and perhaps more importantly, good etiquette when it comes to continuously prompting the agent and iterating.

If this bit is crystal-clear, you'll be building production level apps in no time flat. Get it wrong, and you might waste hours of your time.

Info

This tutorial is for general use: We'll break every concept down into easy to understand chunks, with examples of what to do and what to avoid.

Prompting Cheat-Sheet

Do ThisDon't Do This
- Begin with clear business context and user needs- Overwhelm the agent with massive requirement lists
- Focus on 2-3 essential features initially- Combine bug/UI fixes with new feature development
- Resolve issues before expanding functionality- Skip testing or ignore errors
- Provide specific examples and clear guidelines- Use vague descriptions like "it's not working"
- Read what the agent tells you - it contains crucial information- Stop the agent mid-process to give new instructions

The Basics - Prompting Mindset

The most basic first step while working with Emergent is the two-brain approach.

Your Brain: The vision of the finished product, understanding user needs, business logic, priorities for development cycles.

Emergent's Brain: Technical depth, code patterns, end-to-end testing and optimization of code.

The moment you understand this separation (and start prompting the agent keeping it in mind), the app building process becomes streamlined.

Success

You: Handle the product vision, list of features, customer needs Agent: Handles code implementation, integrations, and testing.

Part 1: The Initial Prompt

General Rule of Thumb: Start with the "Why" and "Who"

Before writing the features you want in detail, explain the basic idea, why you're building it and for whom to Emergent.

For example:

I'm building a productivity app for busy entrepreneurs who struggle 
to track their daily tasks, mood, and expenses in one place. 
The goal is to help founders stay organized and maintain 
work-life balance while building their companies.

Core features needed:
1. Task management with drag-and-drop kanban board
2. Daily mood/energy journaling
3. Simple expense tracking

Let's start with the task management feature first.

Tip

This works because the more context Emergent has, the better decisions it will make when it comes to code implementation and technical decisions. The goal is to keep the agent aware of the core problem statement.

Part 2: Iterating with the agent

Once the first prompt yields decent results, you might feel the app can be developed fully in the next prompt. It's important you do not list every feature you have thought of at this point.

Best Practices for Iterations:

  1. Identify the most important features - what's the one feature your clients need the most?
  2. List out 2-3 features that deliver the most value once your MVP and core feature is working flawlessly. (For help with troubleshooting your app, refer to the troubleshooting section.)
  3. Always build in steps or iterations - let the agent build out one core pillar of the app before moving to the next!

Success

Good Example: Build a founder's productivity app with these core features: 1. Task board with To Do, In Progress, Done columns 2. Simple note-taking for ideas and thoughts 3. Basic expense logging with categories Focus on clean, intuitive design that works well on both desktop and mobile.

Warning

Avoid This: Build a complete productivity platform with task management, calendar integration, team collaboration, advanced analytics, custom reporting, email notifications, mobile apps, dark mode, user authentication, payment processing, AI recommendations, social features, and export functionality.

Part 3: The Importance of Testing

The most important part of building an app is iterating. Once you implement a set of features, test the whole app thoroughly before adding any more features.

Here's the testing checklist:

View Live Preview

Click on the preview button and view the temporary, live preview link for your app. For details, visit this section.

Click All Buttons

Try to click every link, button and CTA in your app or website. Try to find broken elements (so your users don't find them later.)

Test on Different Screens

View your website on multiple screen sizes - how does it look on PC? Does it need to be mobile optimized?

Check Data Persistence

Do check that data is getting saved and is loading correctly when refreshing the website.

Info

In case you need help with troubleshooting your app, check out our troubleshooting guide!

Part 4: Thinking Mode with the agent

There are cases where you do not need to start building the app instantly, but rather want to discuss and brainstorm app ideas with the agent.

Here is the one prompt you need if you want your agent to be your thinking buddy instead of the code architect for a little while-

I'm considering adding team collaboration features, but I'm not sure about the approach. 
Let's discuss the options and trade-offs before writing any code.

Don't start coding yet - just help me think through this.

With that, we have covered the basics of how to talk to the agent effectively to see the best results in the shortest possible time. Here's a snapshot:

1

Prompting Mindset

Give clear direction to the agent in manageable chunks

2

Build Incrementally

Your follow-up prompts should be iterative - avoid overloading the agent with information and directions while it builds out your idea and adds features

3

Test Extensively

Ensure you test each new feature and the entire app flow end-to-end before moving onto the next

4

Separate Fixes

Do not mix major feature updates and minor UI fixes in the same prompt - maintain the division of steps in your prompts

5

Save Regularly

Ensure you push your changes to GitHub regularly for optimal workflow - you should also embrace rolling back to a stable state if something major breaks

Made with Emergent