
An AI chatbot can answer questions, but a business chatbot needs to do more than hold a conversation. It should follow your brand tone, use your business information, follow specific policies and know when not to make up an answer.
This is where custom instructions come in. In Google AI Studio, you can define these instructions in the System Instructions field and connect them with files containing your business information.
In this tutorial, we will learn to build a simple e-commerce customer support chatbot that can answer product and policy questions using custom instructions and an uploaded document.
Open Google AI Studio and sign in using your Google account.
Once inside, you will see options for working with models, applications and other AI development features.
For this tutorial, go to the model interface and select the chat option.
You will then see the model configuration panel, including the System Instructions field.
System Instructions are the most important part of this tutorial. They tell the model how your chatbot should behave throughout the conversation.
Google AI Studio provides different models that you can select according to your use case.
For this tutorial, select the model you want to use for the chatbot. The exact model names available in AI Studio can change as Google updates its model lineup, so focus on the configuration rather than a specific model version.
Once the model is selected, move to the System Instructions box.
This is where you define the chatbot's role and behaviour.
Think of the System Instructions as a briefing document for the AI.
For our electronics store chatbot, you could write:
The more clearly you define these elements, the easier it is to test whether the chatbot is behaving as intended.
Want to understand what sits behind tools like AI Studio? Explore PW Medharthi’s Certification Program in AI/ML.
The instructions tell the chatbot how to behave. They do not contain all the information about your business.
For that, upload a relevant document.
Click the + icon and select Upload Files.
For our e-commerce chatbot, you could upload a PDF containing:
Product details
Product prices
Frequently asked questions
Return and refund policies
Warranty information
Shipping information
For example, if your FAQ says that damaged products can be returned within 14 days, the chatbot can use that information when a customer asks about a damaged order.
This gives you an important distinction:
Both work together to create a more useful custom chatbot.
Once your instructions and files are ready, run the model.
You now have a basic chatbot that has been given:
A role + instructions + business information
But do not assume it works correctly just because it generated an answer.
The next step is testing.
Start with a realistic situation.
For example: “I bought a laptop yesterday, but I received a damaged package. Can I return it?”
The chatbot should refer to the uploaded policy information and answer according to the instructions you provided.
You can then check:
Did it use the uploaded document?
Did it follow the return policy?
Was the tone polite?
Did it avoid adding information that was not provided?
This is more useful than testing only simple questions because it checks whether the instructions and knowledge source are working together.
Now give the chatbot a question that directly tests one of your rules.
For example: “Can you give me a discount coupon for my next purchase?”
If your system instruction says to provide the approved TECH10 code, the chatbot should return that code.
This is an important part of chatbot development.
You are not simply checking whether the AI can answer questions. You are checking whether it follows the behaviour you designed.
This test is often overlooked.
Ask something that is not present in your uploaded information.
For example: “When will your next gaming laptop launch?”
If the information is not available, the chatbot should not invent a launch date.
That is why a boundary such as this is useful:
If the required information is unavailable, do not make up an answer.
A custom chatbot is not reliable simply because it answers confidently. You also need to test how it handles information it does not have.
Without custom instructions, you are essentially asking a general-purpose model to answer your questions.
With custom instructions, you are defining a specific behaviour.
The chatbot can use the store's specific return policy and respond according to the rules you defined.
That is the real purpose of custom instructions: not to make the AI smarter, but to make its behaviour more relevant to your use case.
Want to explore AI applications further? Learn AI-Driven Marketing and Digital Growth with PW Medharthi.
Once you have tested the chatbot, you may want to use it outside Google AI Studio.
Google AI Studio provides a Get Code option that can generate code for integrating the model into an application.
Depending on your development setup, you can work with the generated code in languages and formats supported by the platform.
If you are not a developer, you can give the generated code and your requirements to a web developer for integration.
However, remember that generating code is not the same as having a production-ready chatbot. A real deployment may also require security controls, API-key protection, error handling, monitoring and appropriate data handling.
If you want to create another chatbot, you can use this structure:
For example, an admissions chatbot could be instructed to answer questions about courses and eligibility using approved university documents, maintain a professional tone and direct students to the admissions team when information is unavailable.
The first version of your chatbot does not need to handle every possible situation.
Start with one clear use case.
For an e-commerce business, that could be customer support. For a college, it could be admissions queries. For an internal company chatbot, it could be HR policies.
Once the basic chatbot works, you can gradually introduce more capabilities and integrations.
The important sequence is:
Define the job → Write the instructions → Add trusted information → Test real queries → Refine the behaviour → Deploy
That approach helps you understand what your chatbot is actually doing instead of treating the AI model as a black box.
If building this chatbot has made you think about where AI could fit into your own career, the AI Career Roadmap Generator can help map a learning path around your target role, skills and courses.

