Creating Your First Prompt

Creating Your First Prompt

Prompts are instructional frameworks that guide how AI systems process and respond to inputs. They establish the rules of engagement for AI interactions, ensuring consistent and effective responses across different contexts.

This guide walks you through creating a simple weather assistant prompt. It's perfect for learning because it's useful, easy to understand, and shows all the key concepts.

What You'll Build

By the end of this guide, you'll have a working prompt that guides your AI assistant in providing weather information. Your AI will know exactly how to respond when someone asks about weather conditions.

Time needed: About 2 minutes

Before You Start

Make sure you have a Ctxpack account and you're logged into the dashboard. If you don't have an account yet, sign up at ctxpack.com.

If you're following along with our weather example, you should have already created a weather tool and a weather response template resource.

Step 1: Navigate to Prompts

  1. Open your Ctxpack dashboard
  2. Click "Prompts" in the left sidebar
  3. Click "Add Prompt" button in the top right

You'll see a form where you can define your prompt's content and behavior.

create-weather-prompt.webp

Step 2: Basic Prompt Information

Fill in these fields:

Name: weather-assistant-prompt

Keep the name simple and descriptive. Your AI will see this name when selecting prompts, so make it clear what the prompt does.

Step 3: Define the Prompt Content

This is where you provide the instructions that guide your AI's behavior. For our weather assistant, we want it to be helpful, friendly, and follow a specific process.

In the Content field, enter:

You are a helpful weather assistant. When users ask about weather:

1. Use the get-place-meteo-information tool to fetch current conditions
2. Use `place_id` as the input parameter. This is usually a city name like winnipeg or new-york-city
3. Format your response using the weather-response-template
4. Be conversational and include helpful context like whether it's good weather for outdoor activities
5. If the weather data seems unusual, mention it
6. Always include the temperature in both Celsius and Fahrenheit for user convenience, but always remember to take a friendly jab towards countries using Fahrenheit instead of the better Celsius option 

Keep responses concise but informative.

I want to get weather information from city: {city_name}

This prompt does several important things:

  • It establishes the AI's role as a weather assistant
  • It provides step-by-step instructions for handling weather requests
  • It references the tool and resource we created earlier
  • It gives guidance on tone and style
  • It includes a parameter {{city_name}} that can be customized by the user

Prompts use placeholders indicated by {{ and }} that can be added to the text body. These will be requested to be filled in by the user at runtime by the AI Client.

Step 4: Add Arguments

Arguments allow users to customize the prompt when they use it. For our weather prompt, we want users to be able to specify which city they're interested in.

  1. Click "Add Argument"
  2. Enter "city_name" as the argument name
  3. Check "Required" to make this a mandatory parameter
  4. Click "Add Argument" to save it

Now when users select this prompt, they'll be prompted to enter a city name.

Step 5: Save Your Prompt

Click "Save Prompt" to create your prompt.

Your prompt is now created and ready to use in context packs.

What Just Happened?

You created a guide for how your AI should handle weather-related questions. This prompt:

  1. Tells the AI what role to play (a helpful weather assistant)
  2. Provides specific instructions on how to get and present weather information
  3. References the tools and resources the AI should use
  4. Includes customization options through arguments

Understanding the Components

Prompt Content: The instructions that guide the AI's behavior.

Arguments: Customizable parameters that users can set when using the prompt.

References to Tools and Resources: Instructions for the AI to use specific tools (like your weather tool) and resources (like your response template).

Common Issues and Solutions

AI doesn't follow the prompt instructions

  • Make sure your instructions are clear and specific
  • Check that the tools and resources you reference actually exist
  • Verify that your prompt is included in a context pack

Arguments don't work

  • Ensure you clicked "Add Argument" after entering the argument details
  • Check that the argument name in your prompt content matches exactly (including case)
  • Make sure the argument is properly formatted with double curly braces: {{argument_name}}

Prompt saves but doesn't work in AI clients

Next Steps

Now that you have a working prompt, you can:

Add it to a context pack so your AI can actually use it. Prompts need to be bundled into packs before AI clients can access them.

Create more prompts for different scenarios. You could create prompts for customer service, content creation, or technical support.

Test it with your AI by adding it to a pack and using the prompt in your AI client.

Improve the prompt by adding more detailed instructions or additional arguments for customization.

You can use this same approach to create prompts that:

  • Guide customer service interactions
  • Structure content creation workflows
  • Standardize technical support responses
  • Format data analysis reports
  • Personalize learning experiences

The key is providing clear, specific instructions that help your AI deliver consistent, high-quality responses.