πŸŒ† CityClime: About the Project ✨ Inspiration CityClime was inspired by the idea that conversations often mention places and weather, but rarely connect the two intelligently. I wanted to explore how AI could seamlessly turn casual city mentions into meaningful, real-time weather insights β€” making conversations more contextual and useful.

πŸ› οΈ How I Built It Data Preprocessing: I created a mock weather dataset similar to what you’d find on Kaggle, covering weather patterns for multiple cities.

Prompt Engineering: I generated prompt-completion pairs to fine-tune a GPT-3.5 model. For example:

json Copy Edit {"prompt": "User mentions Mumbai.", "completion": "Mumbai's current weather is humid with scattered showers expected in the evening."} Fine-Tuning: Using OpenAI’s fine-tuning API, I trained the model with the custom dataset, ensuring it learned to connect cities in text to realistic weather narratives.

Flask Web App: I built a simple Flask interface where users can input or view sample conversations. The app extracts city names, queries the fine-tuned model, and displays the generated insight.

Math Insight: The project included basic probability checks to validate city-mention extraction:

𝑃 ( City Mention

)

Number of city mentions detected Total words in conversation P(City Mention)= Total words in conversation Number of city mentions detected ​

πŸ“š What I Learned Practical prompt engineering and fine-tuning workflows with OpenAI models.

How to integrate AI into a Flask web app for live interaction.

Using NLP techniques to parse transcriptions and extract entities.

Managing API costs and quotas while experimenting with fine-tuning.

⚑ Challenges Faced Designing effective training data for fine-tuning β€” getting the balance right between variety and consistency.

Handling ambiguous city names that are also common words.

Building a smooth extraction pipeline that works reliably for varied conversation styles.

Keeping response times fast while using a fine-tuned model.

Built With

Share this project:

Updates