Category: tech

NLP & Explainable AI (XAI) — Quick Reference Notes

AI generated - These are quick reference notes meant to help reconstruct the concepts later rather than serve as a deep dive. NLP Techniques — Quick Reference Technique Concept One-liner Bag of Words (BoW) Sparse text representation Represents text using word occurrence/counts while largely ignoring word order and context. Naive Bayes Probabilistic classifier Uses Bayes’ theorem with a strong feature-independence assumption; historically common for text classification. VADER Lexicon-based sentiment analysis Uses a predefined sentiment lexicon and rules to estimate positive, negative, neutral, and compound sentiment. Read more...

Product Quantization

AI-polished: This post originated from notes and questions while working through the topic in detail. AI was used to organize the notes, connect the ideas, and polish them into a coherent blog post. Product Quantization — From 40 GB of Vectors to 160 MB Dense retrieval introduces a scaling problem beyond search latency: memory. Suppose a vector database contains: 10,000,000 vectors Each vector contains: 1024 dimensions and each dimension is represented using: Read more...

RAG Retrieval: From Keyword Search to Vector Search

Fully AI generated notes. 1. Why Does RAG Exist? An LLM primarily carries knowledge in its parameters. During training: Training Data ↓ Model Training ↓ Weights / Parameters ↓ Parametric Knowledge Once trained, asking the model a question does not normally cause it to search through its original training documents. The answer is generated from what has been learned into the model’s parameters. That creates obvious limitations: knowledge can become stale private organizational data was never part of training the model may not know niche information updating knowledge by retraining is expensive generated answers aren’t inherently grounded in a specific source RAG — Retrieval-Augmented Generation — adds external knowledge. Read more...

How Image Generation Actually Works

Fom Pixels to Diffusion: How Image Generation Actually Works This post began as scattered notes and questions while trying to understand each of these topics in more detail. The deeper the questions went, the more the concepts started connecting, but the notes themselves remained fragmented. AI was used to piece those fragments together into a coherent sequence. The result is a connected mental model of the topics discussed. It is intentionally simplified, as the goal at this stage is to understand the core ideas without getting lost in the deeper mathematical and implementation details. Read more...

Token E2E

Disclaimer This post began as my scattered notes and questions while learning LLMs. I couldn’t stitch them together so used AI to do that for me. The fragments are connected into a coherent model. It is intentionally simplified as I am not there yet for this to be too complex or detailed at this point. Why this exists I found myself collecting terms like BPE, RoPE, KV Cache, Teacher Forcing, PagedAttention, Quantization and Data Parallelism. Read more...

Dynamic Programming

AI polished. Not AI fabricated. These notes are based primarily on the MIT 15.053 Dynamic Programming notes by Dimitris Bertsimas and John Tsitsiklis. The ideas and examples reflect my own study and understanding. AI was used to improve organization and presentation. A Framework for Dynamic Programming Reference This note is based primarily on: Dimitris Bertsimas and John Tsitsiklis, Introduction to Linear Optimization, Chapter 11: Dynamic Programming. MIT 15.053 Tutorial: Dynamic Programming. Read more...

Core Components of a Production-Grade GenAI Stack

GenAI Stack Components Layer Vertex Component(s) Represents Takeaway Discover Model Garden Multi-modal model sourcing Support for various modalities (Text, Vision, etc.) is essential Prototype Notebooks, Studio, Colab Safe and collaborative R&D Allow fast iteration and experimentation before committing to scale Customize Training, Feature Store, Experiments Fine-tuning, embedding, model tuning Domain-specific model improvements need feature/embedding pipelines Orchestrate Vertex Pipelines Workflow automation Seamless orchestration of LLM workflows, agents, or data pipelines Augment & Chain Grounding, RAG, Extensions, Agent Builder Retrieval-augmented generation stack Ground responses with verifiable data and enable external tool usage Experiment TensorBoard, Experiments Model evaluation & diagnostics Measure model behavior with reproducible experiments and visual tools Predict & Serve Endpoints, Vector Search Scalable deployment and retrieval Enable low-latency LLM and embedding-backed services for production use Govern Model Registry, Dataplex Compliance and observability Ensure traceability, auditability, versioning, and access control Read more...

Agents Companion: Architecture, Ops, and Evaluation

Agent Companion An Agent is an application designed to achieve specific objectives by perceiving its environment and acting strategically using available tools. The core principle of an agent is its integration of reasoning, logic, and external information access—allowing it to make decisions beyond the base model’s capabilities. These agents operate autonomously, pursuing goals proactively and determining subsequent actions without step-by-step instructions. 🔧 AgentOps & GenAIOps Continuum AgentOps concerns the operationalization of agents. Read more...

Use It or Lose It Notes

Because I mostly don’t use it, and then end up losing it. This is my living blog of quick, forgotten patterns. Not profound, just practical. Table of Contents Spark Java Spark 1. Create a SparkSession (Boilerplate I always forget) SparkSession spark = SparkSession.builder() .appName("UILI") .master("local[*]") .getOrCreate(); 2. Create a Dataset from Strings (not from files) Dataset<String> ds = spark.createDataset( Arrays.asList("Abc", "xyz"), Encoders.STRING() ); 3. SparkConf and RDD creation options SparkConf conf = new SparkConf(). Read more...

System Design - Distributed Log Ingestion

🧠 System Design Interview Summary: Log Ingestion & Query System Interviewer: Vega Topic: Design a system for log ingestion, storage, and querying across multi-tenant agents ✅ High-Level Architecture Agents send logs (JSON) via HTTP to a rate-limited ingress service Ingress service writes logs to Kafka (HA cluster) Two main Kafka consumers: Object Store Consumer: Stores raw logs in GCS/S3 Indexing Consumer: Pushes structured logs to Elasticsearch Elasticsearch Cluster (with snapshots) holds searchable logs Query Layer exposes APIs (or Kibana) to end users Metadata DB stores user info, tenant configs, RBAC rules Telemetry pipeline for usage and system health insights 💡 Key Design Decisions 🔹 Data Format JSON for ingestion (readable, schema-tolerant) Protobuf or compressed archives for long-term storage 🔹 Schema Evolution Agent schemas versioned per tenant Schema registry to ensure backward compatibility Only expected fields are accepted/processed 🔹 Indexing & Querying Indexed fields include timestamp, log level, service name, etc. Read more...