Why from __future__ import annotations Exists?
Have you ever wondered why some Python files start with this strange line? from __future__ import annotations At first, it looks like some advanced Python magic. But the idea is actually quite s...
Notes, tutorials, and practical insights on AI/ML.
Have you ever wondered why some Python files start with this strange line? from __future__ import annotations At first, it looks like some advanced Python magic. But the idea is actually quite s...
First: Why do we need dataclass? Suppose we want to represent a user in our program. We might write: class User: def __init__(self, name, age, email): self.name = name self.a...
When you see code like this for the first time: from __future__ import annotations from dataclasses import dataclass import os from dotenv import load_dotenv DEFAULT_MODEL = "llama-3.3-70b-versat...
When building a machine learning model, one common question is: Which algorithm should I choose, and what settings should I use? For example: Should I use Linear Regression? Should I us...
As I was working with IMDb dataset, I noticed while decoding, we need to subtract 3 in the word index to get the corresponding word. Let’s understand why. We subtract 3 because IMDB reserves the...
Working with PostgreSQL databases often requires moving data in and out of tables, and PGAdmin makes this process seamless with its intuitive interface. If you have data in CSV or text files and wa...

Use Azure AI Foundry to fine-tune a language model, create and apply content filters. Fine Tuning in Azure AI Foundry Create a new project in Azure AI Foundry by entering the required details l...

Use Azure AI Foundry to integrate custom data using RAG into a generative AI app. Create a project in Azure AI Foundry by entering the required details like subscription, resource group, hub nam...

Use Azure AI Foundry portal’s prompt flow to create a custom chat app that uses a user prompt and chat history as inputs, and uses a GPT model from Azure OpenAI to generate an output. Create a p...

Use the Phi-4-multimodal-instruct generative AI model to generate responses to prompts that include text, images, and audio. Lab 3: Create a generative AI chat app Okay now let’s talk about h...