Inspiration: The inspiration for this project stemmed from the growing need to leverage artificial intelligence for enhancing business operations. Recognizing the potential of integrating AI with data analytics, we aimed to create a solution that could provide actionable insights into inventory management and demand forecasting. Participating in the Microsoft Fabric & AI Learning Hackathon provided the perfect platform to explore these capabilities and address real-world challenges.

What We Learned: Throughout the development of this project, we deepened our understanding of Azure OpenAI services and Microsoft Fabric. We learned how to effectively manage and preprocess data using Python and pandas, implement robust error handling with the tenacity library, and optimize AI prompts to ensure efficient API usage. Additionally, we gained valuable experience in securing sensitive information by utilizing environment variables for API keys.

How We Built the Project: The project was built using Python, leveraging libraries such as openai for interacting with Azure OpenAI, pandas for data manipulation, and tenacity for implementing retry mechanisms. The solution involves loading inventory data from a CSV file, summarizing the data to create concise prompts, and using Azure OpenAI to predict future demand. Comprehensive logging was integrated to monitor the application's performance and facilitate debugging.

Challenges Faced: One of the primary challenges was managing API rate limits imposed by Azure OpenAI. To address this, we implemented an automatic retry mechanism using the tenacity library, which allowed the application to gracefully handle RateLimitError exceptions by retrying requests with exponential backoff. Additionally, optimizing the prompts to reduce token usage while maintaining the quality of predictions required careful consideration and iterative testing.

Built With

  • pytho
Share this project:

Updates