Vly Logo
Best Practices

Prompt efficiency

Structure your prompts for maximum clarity and best results

Well-structured prompts lead to better results, fewer misunderstandings, and faster development cycles. Master these techniques to communicate more effectively with vly.ai's AI agent.

Prompt structure fundamentals

Lead with the action

Start prompts with what you want to accomplish:

Effective structure:

"Create a user profile page with avatar upload, editable bio, and account settings sections"

Less effective:

"So I'm thinking users probably need a way to manage their profiles and stuff, maybe upload pictures, edit information..."

Use the pyramid principle

Structure information from general to specific:

1. Main request: "Build a product recommendation system"
2. Key requirements: "Based on user browsing history and similar users"
3. Specific details: "Show 4 recommended products, update daily, include 'Why recommended' explanations"
4. Implementation notes: "Use collaborative filtering algorithm, store in user preferences table"

Provide complete context upfront

Include all necessary information in the initial request:

"Create a responsive pricing table with 3 tiers (Basic $9/mo, Pro $29/mo, Enterprise custom), highlight the Pro tier, include feature comparisons, and add 'Get Started' buttons that link to /signup?plan=tier-name"

Clear requirement specification

Use concrete examples

Replace vague descriptions with specific examples:

Vague:

"Make the navigation look modern and clean"

Specific:

"Style the navigation with a white background, centered logo, horizontal menu items with hover effects, and a blue CTA button on the right"

Define success criteria

Explain what the finished result should accomplish:

"Build a search feature that finds products by name or category, shows results in a grid layout, displays 'No results found' for empty searches, and includes filter options for price range and availability"

Specify constraints and preferences

Include important limitations or requirements:

"Add image upload functionality with 5MB file size limit, accept JPG/PNG formats only, automatically resize to 800px width, and show upload progress"

Effective modification requests

Reference specific elements

Point to exact components or features:

"In the ProductCard component, change the 'Add to Cart' button color to green and increase the font weight to semibold"

Describe the current state and desired change

Help the AI understand what needs to change:

"The mobile menu currently slides in from the left. Change it to slide down from the top instead"

Use visual and functional references

Connect changes to existing patterns:

"Make the blog post cards match the styling of the project cards we created earlier, but replace the project status with publication date"

Advanced prompting techniques

Progressive disclosure

Build complexity gradually:

Step 1:

"Create a basic dashboard with user stats and recent activity"

Step 2:

"Add interactive charts to the dashboard showing user engagement over time"

Step 3:

"Include filtering options for the dashboard data by date range and activity type"

Conditional logic

Handle different scenarios in single requests:

"Display user avatar if available, otherwise show initials with colored background. Use green for admin users, blue for premium users, gray for regular users"

Template-based requests

Reference successful patterns:

"Create a testimonial section using the same layout pattern as the team section but with review cards instead of team member cards"

Context management

Build on conversation history

Reference previous work without repetition:

"Add the same responsive behavior we implemented for the header to the footer navigation"

Establish shared vocabulary

Create shorthand for project-specific concepts:

First use: "Create product cards with image, title, price, and add-to-cart functionality"
Later: "Add the same product card layout to the wishlist page"

Reference established patterns

Point to existing implementations:

"Use the same error handling approach as the login form for the registration form"

Asset integration prompts

Batch asset requests

Include multiple files efficiently:

"Create a photo gallery using @photo1.jpg through @photo6.jpg with lightbox functionality and thumbnail navigation"

Contextual asset usage

Provide clear instructions for asset implementation:

"Use @company-logo.svg in the header (max height 40px), @hero-image.jpg as the landing page background (cover positioning), and @icon-set.zip icons throughout the interface"

Error prevention strategies

Anticipate misunderstandings

Address potential confusion proactively:

"Add a sidebar to the dashboard (on the left side, not floating overlay) with navigation links to different sections"

Specify what NOT to change

Prevent unwanted modifications:

"Update the color scheme for the product pages but keep the header and footer styling exactly as they are"

Include fallback behavior

Handle edge cases in the request:

"Display user's full name if available, otherwise show username, or 'Anonymous User' if neither exists"

Testing and validation prompts

Request built-in testing

Include testing as part of implementation:

"Add form validation to the contact form and test with various input scenarios including empty fields, invalid emails, and special characters"

Specify acceptance criteria

Define what successful implementation looks like:

"The search autocomplete should show suggestions after 2 characters, limit to 5 results, highlight matching text, and be navigable with arrow keys"

Prompt optimization checklist

Before sending a prompt, verify:

  • Clear action: Is the main request obvious?
  • Complete context: Have I included all necessary information?
  • Specific details: Are requirements concrete and measurable?
  • Referenced elements: Have I pointed to relevant existing components?
  • Success criteria: Is it clear what the result should accomplish?
  • Constraints included: Have I mentioned important limitations?

Common prompt improvements:

Generic → Specific:

Before: "Make it look better"
After: "Increase spacing between elements, use consistent button sizes, and align text to a grid"

Vague → Concrete:

Before: "Add some user features"
After: "Add user profile editing, password change functionality, and account deletion option"

Scattered → Organized:

Before: Multiple small requests sent separately
After: One comprehensive request with clear structure

Iterative refinement

Building on feedback

Use results to improve subsequent prompts:

"The product grid looks great. For the next similar grid (blog posts), use the same spacing and hover effects but optimize the content layout for text-heavy cards"

Learning from successful patterns

Document what works well:

  • Note effective phrase patterns that consistently produce good results
  • Track successful request structures for different types of changes
  • Build a personal library of proven prompt templates

Effective prompting is a skill that improves with practice. Start with these fundamentals and adapt them based on your experience with different types of requests and project requirements.