Overview

The Prompts section in the App Editor allows you to create and manage prompts that define how the AI processes user input. You can configure the model, fine-tune various parameters, and control the output to meet the requirements of your app.


How to Add a New Prompt

  1. Open the App Editor.

  2. Click on the Prompts tab.

  3. Select Add New Prompt or Import from Template.

  4. Configure the prompt using the settings described below.

  5. Click Save to apply your changes.


Understanding Each Section

1. Model

  • Purpose: Select the AI provider (e.g., OpenAI, Groq, etc.).

  • How to Use: Choose from the dropdown list. The selected provider determines the available engines.


2. Engine

  • Purpose: Choose the specific AI engine to process the prompt.

  • How to Use: Select the engine that fits the complexity and purpose of your app. For example:

    • ChatGPT 3.5 – Best for fast and cost-effective responses.

    • ChatGPT 4 – Suitable for more complex tasks requiring deeper reasoning.


3. Max Tokens

  • Purpose: Controls the maximum number of tokens (words or characters) in the AI response.

  • How to Use: Increase the value for longer responses. Keep it low to avoid unnecessary token usage and higher costs.


4. Temperature

  • Purpose: Adjusts the randomness of the AI's responses.

  • How to Use:

    • Low values (0-0.3) → More deterministic and focused responses.

    • High values (0.7-1) → More creative and diverse responses.


5. Presence Penalty

  • Purpose: Encourages the AI to introduce new ideas by penalizing repetition.

  • How to Use: Increase the value to reduce repetition and make the response more varied.


6. Frequency Penalty

  • Purpose: Discourages excessive repetition of the same phrases.

  • How to Use: Increase the value to penalize frequently used terms and maintain a balanced response.


7. Top P

  • Purpose: Controls the diversity of responses by narrowing down possible outcomes.

  • How to Use:

    • Low values (e.g., 0.1) → More focused responses.

    • High values (e.g., 0.9) → More diverse responses.


8. System Prompt

  • Purpose: Provides context or specific instructions to the AI.

  • How to Use: Define the behavior and tone of the AI here. For example:

    • "You are an expert assistant providing concise and accurate answers."

    • "Act as a fitness coach offering personalized workout suggestions."


9. Result Format

  • Purpose: Specifies the format of the AI’s response.

  • Options:

    • Plain Text – Best for unformatted, raw text responses.

    • Markdown – Ideal for structured responses with headings, lists, and basic formatting.

    • HTML – Returns the response in HTML format for use in web interfaces.

    • Code – Formats the response as code, useful when the AI generates code snippets.


10. Use RAG (Retrieval-Augmented Generation)

  • Purpose: Allows embedding app documents as context for the prompt.

  • How to Use: Toggle ON to enable RAG and improve responses with relevant document information.


11. Add Routine

  • Purpose: Allows you to apply predefined actions to the AI’s output before returning the result.

  • Options Available:

    • Find & Replace – Search for specific text and replace it with a defined value.

    • Date & Time – Format or manipulate date and time values.

    • Text Transformation – Apply text changes, such as case conversions.

    • Text Slice – Extract a portion of text from the result.

    • JSON Escape – Escape special characters in JSON responses.


FAQs and Troubleshooting

Q: How do I choose the best model for my app?
A: Consider the complexity of your task. For faster and simpler tasks, use ChatGPT 3.5. For complex responses, use ChatGPT 4.

Q: Why is my response too short or incomplete?
A: Increase the Max Tokens limit or adjust the Temperature.

Q: How can I refine the response for better accuracy?
A: Use a lower Temperature and fine-tune the System Prompt.