PostgreSQL Query Rewriting Techniques The previous articles in this series covered performance problems you fix by adding indexes, restructuring joins, or tuning memory. This one is about the queries where the plan is "fine" — every node is doing something reasonable — but the query itself is asking the wrong question, producing unnecessarily large intermediate results or forcing the planner dow
Fixed-length chunking requires no external services, yet semantic chunking absolutely needs an Embedding API — why? The core idea of semantic chunking is to split text at semantic boundaries. Determining whether "two pieces of text belong to the same topic" requires converting text into vectors and computing similarity — that's exactly what the Embedding API does. Dimension Fixed-Length / Recur
RAG stands for Retrieval Augmented Generation. Why do we even need RAG?? To answer this lets take a look at What LLMs and SLMs are. LLM(Large Language Model). Data on several categories(generalized) will be given as input. From that, a model would be created. What is a model ? To understand this, lets take mathematical equation of a straight line y = mx +c Lets take x values to be 1, 2, 3, ... a
Why Do We Need Specialized Vector Databases? In the first five articles, we figured out how to chunk documents and generate embeddings. Now where do these vectors live, and how are they efficiently retrieved? You might wonder: "Can't I just store vectors in Redis or PostgreSQL?" No — traditional databases are designed for exact queries (e.g., WHERE id = 123), while vector retrieval is Approximat
SQL is widely known for data querying and manipulation but systems do grow; data becomes larger; processes become repetitive and operations become sensitive. SQL has some features which enables it to be considered a fully fledged programming language. Some of the features which I discuss in this article are procedures, functions and transactions. Each of these concepts serve distinct purposes. Sto
Hi 👋, In this post we shall explore Bedrock's structured KB with this architecture: Upload CSVs to S3 > SNS Queue > Crawl data with Glue > Query with Redshift > Bedrock KB > Query with LLM. Let's do some of this with code. Let's get started. Clone the repo and switch to the project directory. git clone [email protected]:networkandcode/networkandcode.github.io.git cd structured-kb-demo/ Do a uv sync
In Day-1, we understood about the overview of a RAG system and what are its components and how it helps the LLM to generate more accurate and contextual responses. Now, lets see about the storage of the data using Vector Databases. Lets assume that we have a PDF with us and this would be considered as our private data. Now I want my LLM to have the context about this PDF, So that I could ask any q
Gen AI Based Chatbots, Its quite normal and people are doing it for couple of years now, So what’s Different that I am doing? Well the biggest issue with using AI models now is its Cost, even for a simple FAQ based chatbots. The Cost goes in Thousands.. The result is P.A.I.. It's a chatbot widget that lives in the corner of my portfolio site. Visitors The Architecture at a Glance Before diving