Hey everyone! One piece of advice I highly recommend is having mentors. They can truly guide you, especially when you’re navigating changes in your career or learning journey.
I personally have several mentors—five, to be exact. One is my overall career mentor, who is absolutely amazing. Then, I have four technical mentors who help me with specific technical skills. One of them referred me to a project where I’m building a chatbot, which aligns perfectly with my AI skills development.
Since I’m working through an AI skills program, I thought this project would be a great opportunity to apply what I’m learning. The first thing I did was attempt to follow the provided instructions, but I quickly ran into issues. Some steps didn’t work as expected, so I had to tweak them. At times, I even turned to ChatGPT for guidance. I’ve linked my GitHub repository below, where you can find the project details.
Let me walk you through the process. I started by creating a project in the AI Foundry. For simplicity, I just named it “Project.” After creating it, the platform displayed what would be generated, including the hub and other resources. I think of the project as similar to a subscription, while the hub functions like a resource group. Once everything was set up, the most important detail was the project connection string.
Next, I deployed two models: GPT-40 Mini and Text Embedding ADA. The GPT model is likely familiar to most of you, while the embedding model is used for processing documents that the chatbot will reference to answer questions. I navigated to the model catalog, verified the correct models, and deployed them.
After that, I moved on to creating an Azure AI Search service, which is separate from the project setup. I kept all resources in the same resource group for simplicity and named the search service “Search.” One thing to note: the service can be expensive, so make sure to clean up after you’re done unless you plan to keep it. The setup process included configuring endpoints and tags. Once everything was ready, I created the service and generated an ARM template for potential automation.
Back in the hub, I connected the AI Search service by navigating to “Connected Resources” and adding the connection. Authentication options included either a key or an ENTRE ID, and I chose the latter for faster setup.
The next step involved setting up a Python environment. I used VS Code, but you can choose your preferred editor. For Mac users, remember to add a “3” after “Python” or “pip” commands. I created a virtual environment and began modifying the provided files, renaming references from “products” to “in tune” for my specific use case.
I also created example data for the chatbot’s knowledge base. Using a sample CSV for products, I asked ChatGPT to generate a similar file tailored to in-tune data. I saved this in a new folder called “assets” and used it as the basis for the search index.
To create the search index, I followed the provided code, ensuring I imported the necessary libraries and updated references to “in tune.” Troubleshooting errors along the way was a great learning experience. After fixing everything, the script successfully deleted the old index, uploaded five documents, and created the new search index.
Next, I created a script to retrieve documents. I reused and renamed a previous script, updated the code to match my use case, and tested it. When I encountered unfamiliar terms in the code, I turned to ChatGPT for clarification. This helped me understand how specific parts of the code worked.
I then moved on to creating prompts for the chatbot. These prompts, saved as “Prompt T” files, guide the chatbot’s responses. I used the provided examples, adjusted them for my needs, and tested everything to ensure it worked correctly.
One of the more frustrating moments came when I had to register additional services in my subscription. The instructions didn’t mention this step, and I spent hours troubleshooting. Eventually, I found a solution on Stack Overflow that pointed me to missing endpoints. After creating an OpenAI resource in the portal and configuring the endpoint, everything finally worked. It was a huge relief!
With the core setup complete, I moved on to the evaluation model. I ensured the tokens-per-minute setting exceeded 30K and verified that the correct models were being used. After installing the necessary packages, I ran the evaluation and confirmed everything was functioning as expected.
Finally, I cleaned up the resources to avoid unnecessary costs. While the process was sometimes frustrating, it was also rewarding. I’ve documented everything in my GitHub repository, so feel free to check it out.
Thanks for following along—I hope you found this as engaging as I did. Until next time!