# Delimiters and Constraints | Real world prompting | Story and Demo

## Метаданные

- **Канал:** Automation Step by Step
- **YouTube:** https://www.youtube.com/watch?v=aNsATNgBWqA
- **Дата:** 04.05.2026
- **Длительность:** 7:44
- **Просмотры:** 644
- **Источник:** https://ekstraktznaniy.ru/video/50057

## Описание

In this video, you’ll learn two powerful prompt engineering techniques — Delimiters and Constraints — using a simple story between a junior tester and a senior SDET.

Struggling with messy AI output while generating test cases?

👉 You’ll learn:

Why basic prompts fail
What are delimiters (how to guide AI with boundaries)
What are constraints (how to control AI output)
Step-by-step real-world demo (API testing scenario)
How to write clean, structured prompts for testing

We use a practical checkout API example and show how to improve prompts using ChatGPT.

👉 This is hands-on, simple, and directly usable in real projects.

delimiters prompt engineering, constraints in prompts, AI testing prompts, ChatGPT testing tutorial, prompt engineering QA, API testing AI, test case generation AI
▬▬▬▬▬▬▬

Share with all who may need this

If my work has helped you, consider helping any animal near you, in any way you can

Never Stop Learning
Raghav Pal



▬▬▬▬ USEFUL LINKS ▬▬▬▬


✅  ALL TUTORIALS - 

## Транскрипт

### Segment 1 (00:00 - 05:00) []

Hello and welcome. I'm Raghar and today we are going to discuss something very easy, very interesting and very powerful. After learning this, you will see that within few seconds how you can make your AI chats or AI prompts very powerful. So let's see this as a conversation between two people. Ravi says that he wanted to generate test cases for a checkout API and he took help of AI chat but the output was not very good not very useful and it was vague and what exactly did he ask was just a simple thing that generate test cases for checkout API so if I go to any AI let's say chat GPT or Gemini or any AI chat you can go and I will say generate test cases for checkout API and you will see the response. It will give us the response but it will be very vague. It can be messy and it may not be very useful. So what is the problem here? We have not guided EI properly. So let's fix this step by step. So here step number one is we will give the delimiters or the boundaries. Now what are delimiters? We have to separate our instructions from our data and show this clearly to AI that these are this is what I want and this is my exact data. So this will give a huge clarity to AI and it will help you give get much better responses. So we say generate test cases for this API and then we use delimiters which are triple quotes in this case. There are other delimiters that you can also use. And then we give our exact data of the API. Now this may look simple but this makes this very useful and powerful. It will help AI to understand that this is the exact data and what it has to do is given separately and will give a much better output. If I just try to give this here. So I'm saying this generate test cases for this API and using delimiters here and giving the exact data and separating the instructions with the data. So you will see the output it will be much more clean, useful and efficient with exact things that I need or I can do with this API and the test cases. So I will not have to do a lot of things myself. I can make AI work for me for my exact needs. Okay. So this is how we can use delimiters and it will make AI know exactly what we want or what we are testing and it is not just for testing for anything that you are you want to get output from AI you can add the delimiters wherever applicable. So these are special characters like these triple quotes or maybe hashes etc and it will separate the instructions from the exact data and will give a complete clarity to AI and it will not get confused. It will give you better and faster responses. So you can use common symbols like triple quotes, hashes etc. So for example, if you say summarize the buck report delimited by triple quotes and then you give triple quotes and give your exact buck report, it will give you much better and useful responses. Okay, so this is how we use delimiters. Now let's say what are constraints? So here we control the output. We tell AI what we need, what we don't need, what format we need. So it will give you much better and useful responses. For example, I can say generate only five test cases. So I'm controlling the output. I don't want more than five otherwise it will it can give me like 100 or 50 or whatever it thinks is okay. But now I am saying only five test cases and no explanation. I don't need any explanation and I want a table format. So it will again make the output very clear and usable. So I will say here generate five test cases and I will say no explanation and show in table format. And now you will see with this the output will change so much and it will give us exactly what we need much clean much useful and we don't have to go through a lot of unnecessary things here. Okay. So this is how we add the constraints and we generally add the constraints after giving up instructions and then we may add the data at the end or in the middle as well as per our needs. So it is like the rule book so that AI will just give us what we need. Okay, so constants are like giving boundaries to the output what we need

### Segment 2 (05:00 - 07:00) [5:00]

what's the length, what's the format, what's the style, etc. And it will make AI much more focused and give us much more focused responses. So some examples of constraints can be keep it under 50 words or format it as a markdown table or do not use technical jargon or give only herin syntax. So you can try this and you may already have used this without knowing it but this is very powerful. It makes the output much cleaner and much useful. Okay. Now step three. Now let's combine everything. So we say you are a senior estate. Here we are adding the role prompting or persona that we have learned in the last sessions. So we also give a role that think like a senior estate or automation QA. So it will again help AI a lot because now it has to only search in some fixed data sets and not search everywhere. Then we say generate five API test cases for the below endpoint and we also add constraints that only five no explanation are put in table format and then we give the delimiters and our exact data. So if you try this you will see the output and difference how much more useful and efficient and clean your output will be. Okay. So this is how we can add all this and this will really help you in real world. Okay. So key lessons from here we use delimiters to tell AI what to focus on whenever we have or we can add delimiters in our prompts by uh separating the data and the instructions and then we should always add constraints to tell AI how to respond and this is applicable for everything not just testing always add constraints and delimiters wherever applicable and it will help AI also to give you much better, faster and cleaner and useful responses. Okay, so del limiters to separate data from instructions and constant to limit the AI behavior or the output. So whenever you are doing any AI chat, always remember to add a persona. So you can say act like a senior estat or think like a senior Q engineer and then give whatever you want. Exactly. If team limiters are applicable, if you want to give some data, add limiters, then add constraints and then you will see the differences. Okay, I hope this was very useful. Thank you for watching and never stop learning.
