👋Hello World!

Welcome to Huijing Huang’s tech blogs!

Integrating App Insights with Hugo

Tracking website usage is essential for understanding your audience and improving your content. For my Hugo website, I chose to use Azure Application Insights (App Insights) because I just like it. This guide is inspired by this tutorial. Setting Up Azure Resources To get started, search for Application Insights in the Azure Marketplace. Click Create and fill in the required details: Once done, click Review + Create to finalize the setup. ...

April 29, 2025

Geneva

Geneva is an internal monitoring platform developed by Microsoft. While Geneva is widely used within Microsoft, it is not publicly available. However, Microsoft offers similar monitoring tools for external customers, such as Azure Monitor. Recently, I have been working on a feature to implement infrastructure for sending metrics using Geneva APIs. In this blog, I’ll share a high-level overview of what I have learned. Source Code I cannot talk too much about the infrastructure setup here, as those are internal implementations. ...

April 28, 2025

VSCode Extension Advanced Topics

In this blog, I want to document some useful apis, such as chat extension api and workspace api. Get the current workspace We can use the workspace API to create folders and files in vscode. To do that, we need to get the reference to the current workspace. You can read more about VSCode workspace from this doc. Basically, when you first open a vscode editor, the workspace is empty: You can open a folder to work with: ...

April 21, 2025

VSCode Chat Extension Basics

Introduction A VSCode Chat Extension is an extension uses the Chat extension API by contributing a chat participant - a domain expert that can answer user queries within a specific domain. The reason why I am looking into the VSCode Chat Extension is that I want to build a domain expert on Threat Modeling. In this blog, I will talk about the basic usage of a chat extension. Here are the references: ...

April 18, 2025

Vibe Coding Like a Pro

Introduction Vibe coding is a term introduced by Andrej Karpathy. While some perceive vibe coding as using AI for merely writing code, I see it as: a method to learn new concepts a way to write higher-quality code leveraging AI to handle boilerplate code, allowing me to focus on more critical aspects, such as: product vision tech stack decisions architectural design design patterns test cases At work, I use GitHub Copilot for projects written in TypeScript and C#. Outside of work, I use Cursor to collaborate on open-source projects and build my own products. The languages I work with range from TypeScript to Python and Swift. So far, I have been able to create more than I ever imagined. ...

April 14, 2025

Conv1D Layer

Here’s a pretty cool article on understanding PyTorch conv1d shapes for text classification. In this article, the shape of the example is: n = 1: number of batches d = 3: dimension of the word embedding l = 5: length of the sentence import torch.nn as nn import torch # Example represents one sentence here example = torch.rand(n=1, l=3, d=5) example.shape # torch.Size([1, 5, 3]) example # This is the output: tensor([[[0.0959, 0.1674, 0.1259], [0.8330, 0.5789, 0.2141], [0.3774, 0.8055, 0.4218], [0.1992, 0.4722, 0.3167], [0.4633, 0.0352, 0.8803]]]) In the above output, you can image each row represents one word. ...

April 5, 2025

XCS330 PS4 In-Context Learning & Fine-Tuning

Introduction In the XCS330 Problem Set 4, we will explore methods for performing few-shot learning with pre-trained LMs. Datasets from HuggingFace: Amazon Reviews: five-way classification problem. Given a review, predict the start rating, from 1 to 5. XSum: news articles from BBC. Given a news, return a one sentence summary. Use n-gram overlap to measure the score bAbI: question-answering tasks that requires reasoning about contextual information. AI benchmark developed by Facebook AI Research. Fine-tuning Here, we fine tune the entire model on k examples using two diffrent sizes of samller BERT models. ...

April 2, 2025

XCS330 PS3 MAML

Introduction In traditional machine learning, we have a lot of dataset for a specific tasks, while in meta-learning, we have many tasks with small datasets, and the hope is that we can train a model that can learn some fundamental idea from other tasks. Put it this way: the goal of traditional ML is to optimize the performance of a single task, while the goal of meta-learning is to optimize for adaptability. ...

March 14, 2025

Functions

Softmax The softmax function is widely used in machine learning. It is used to convert a vector of raw values into a probability distribution. Given a vector $\mathbf{z} = [z_1, z_2, \ldots, z_n]$, the softmax function is defined as: $$ \sigma(\mathbf{z_i}) = \frac{e^{z_i}}{\sum_{j=1}^{n} e^{z_j}} $$ Here’s an example in PyTorch: import torch import torch.nn.functional as F logits = logits = torch.tensor([5, 4, -1], dtype=float) prbabilities = F.softmax(logits) print(probabilities) # tensor([0.7297, 0.2685, 0.0018], dtype=torch.float64)

March 12, 2025

XCS330 Environment Setup

Install Conda Since I am a mac user and I want to leverage the Apple Silicon CPU architecture, I installed Miniforge. During installation, I chose not to have conda to control my shell environment, and therefore after installation, I need to run the following command to activate the base environment. source ~/miniforge3/bin/activate Windows Users For windows users, use this link. After installation, search in the start menu with Anacoda Prompt. You should be able to see a special cmd prompt with the Anaconda icon in the bottom right corner. ...

March 12, 2025