top of page
Codersarts Blog.
What’s new and exciting at Codersarts
Search


Self-RAG vs Corrective RAG vs Agentic RAG: Which Approach Fits Your Project?
Basic RAG follows a fixed path. It retrieves passages, hands them to a language model, and trusts the result. That path works for many questions, and it fails in predictable ways: it retrieves when it does not need to, it accepts weak evidence, and it rarely checks whether the final answer follows from what was found. Three designs try to fix these weaknesses from different directions. Self-RAG builds retrieval decisions and self-critique into the model. Corrective RAG adds a
ganesh90
Nov 517 min read


Context Rot: Why a Bigger Context Window Does Not Replace RAG
Context windows keep growing. Models now accept inputs that once seemed impossible, and it is tempting to conclude that retrieval is obsolete. Why build an index when you can paste everything into the prompt? The answer is that capacity is not the same as capability. A model can accept a very long input and still use it unevenly. As the input grows, answers can become less reliable, details in the middle can be missed, and irrelevant text can pull the model off course. This p
ganesh90
Nov 414 min read


Self-RAG: How a Model Learns to Decide When to Retrieve and Critique Its Own Answers
Standard RAG retrieves for every question, whether or not it needs to. It passes the same number of passages to the model, whether they help or not, and it rarely checks whether the final answer actually follows from them. Self-RAG proposes a different design. A single language model learns to decide when retrieval is needed, to judge whether each retrieved passage is relevant, and to critique whether its own output is supported by the evidence. It does this by producing spec
ganesh90
Nov 415 min read


HyDE for RAG: How Hypothetical Documents Improve Retrieval for Vague Questions
A user asks a short, vague question. Your RAG system turns it into a vector and searches for similar passages. The best passage is in the index, and the search misses it, because a question and its answer rarely look alike. HyDE, short for Hypothetical Document Embeddings, attacks this gap. Instead of embedding the question, a language model first writes a short hypothetical answer. That draft may contain mistakes, and it does not matter. The system embeds the draft and uses
ganesh90
Nov 416 min read


Corrective RAG: How to Grade Retrieved Results and Fix Them Before the Model Answers
Standard RAG has a quiet weakness. It retrieves passages, passes them to the language model, and trusts that they are relevant. When retrieval returns weak or wrong passages, the model often builds a confident answer on top of them. Corrective RAG, often shortened to CRAG, adds a checkpoint. After retrieval, a lightweight evaluator grades the results. Good results are cleaned and used. Poor results are discarded, and the system looks elsewhere. Uncertain results are combined
ganesh90
Nov 415 min read


LightRAG Explained: How Graph-Based RAG Works and When It Fits Your Project
Standard RAG finds text chunks that look similar to a question and hands them to a language model. It works well for questions answered by a single passage. It struggles when the answer depends on connections spread across many documents. LightRAG is a retrieval approach that adds a lightweight knowledge graph to the retrieval step. Instead of searching only chunks, it searches entities, relationships, and themes extracted from your documents, and it can add new content witho
ganesh90
Nov 311 min read


Cache-Augmented Generation: When Preloading Documents Replaces Retrieval
Retrieval-augmented generation became the default way to give language models private knowledge. A retriever finds relevant passages at question time, and the model answers from them. It works, and it adds moving parts: an index, a retriever, ranking, and the chance of fetching the wrong passages. Cache-augmented generation, or CAG, takes a different route for the right cases. Instead of retrieving at question time, you load the whole knowledge set into a long-context model a
ganesh90
Nov 311 min read


Homeo AI for Homeopathy Practitioners: Faster Case Analysis With Full Clinical Control
Every homoeopath knows how much goes into a single case. Long consultations, careful symptom selection, and repertory work all come before a remedy is chosen. Homeo AI is a clinical copilot that brings AI into this process while leaving every decision with the doctor. This blog explains what Homeo AI is, how its main capabilities work, and how doctors can try it. Everything here is based on the information Homeo AI shares about its platform. What Is Homeo AI? Homeo AI is an A
ganesh90
Nov 35 min read


What Is a Stateless MCP Server? How It Changes Your Architecture
Most teams build their first MCP server as a single process on one machine. It works well in development, and the design questions only appear later, when traffic grows, a second instance is added, or a deployment restarts the server in the middle of someone's work. At that point, one question decides a lot: does the server remember anything between requests? A stateless MCP server does not. Every request carries what the server needs, and any instance can answer it. This blo
ganesh90
Oct 2211 min read


MCP vs. Direct Function Calling: When We Use Each
Every useful AI agent needs a way to act: search a database, send a message, create a ticket, read a file. Two approaches dominate how language models are connected to such tools. Direct function calling defines the tools inside your application. The Model Context Protocol, or MCP, defines them in separate servers that any compatible application can use. Both work, and they suit different situations. This blog explains how each one works, compares them on the points that matt
ganesh90
Oct 2111 min read


Re-ranking in RAG: Was It Worth the Extra Latency?
A RAG system lives or dies on what it retrieves. If the right passage never reaches the language model, the answer will be wrong, however good the model is. Re-ranking is a popular fix. The system retrieves a larger set of candidate passages, then a second model reads each one alongside the question and puts the best at the top. It often improves relevance. It also adds time to every request, and that time is paid by every user. This blog explains what re-ranking does, what i
ganesh90
Oct 2012 min read


Audit Logs for AI Decisions: What to Record and Why
When an AI system makes a decision, someone will eventually ask why. A customer disputes a result, a regulator requests evidence, or a team member wants to know why the assistant behaved oddly last Tuesday. Without a good record, the honest answer is that nobody knows. With one, the question can be answered in minutes. This blog explains what to record in audit logs for AI decisions, why each item matters, and how to store the logs safely. It reflects the approach of the Code
ganesh90
Oct 2013 min read


Handling Personal Data in LLM Pipelines: Masking, Retention and Deletion
A large language model does not need to know a customer's name, address, or account number to answer most questions. Yet personal data finds its way into prompts, documents, logs, and caches, often without anyone deciding that it should. Once it is there, it is copied. A support message becomes a stored trace, a retrieved document becomes an embedding, and a prompt becomes a record at a vendor. Each copy is a place where the data can leak, linger, or be hard to remove. This b
ganesh90
Oct 1612 min read


How We Decide What an Agent Is Allowed to Do Alone
Every team that builds an AI agent reaches the same moment. The agent works in testing, and someone asks whether it can just send the email, issue the refund, or update the record without a person checking first. The honest answer is that it depends, and the dependence can be made explicit. Autonomy is not a switch. It is a set of decisions about which actions an agent may take alone, which need a person, and which it should never touch. This blog lays out how to make those d
ganesh90
Oct 1612 min read


Why Customers Hung Up on Our Voice Bot, and the Three Fixes
A voice bot can look impressive in a demo and still lose callers in the first thirty seconds. Customers do not complain about the language model. They notice the pause before it answers, the way it talks over them, and the moment it says it did not understand for the third time. Then they hang up, and the call center sees the same issue arrive later as an angry call. This blog explains why customers hang up on voice bots and the three fixes that address most of the causes: fa
ganesh90
Oct 159 min read


Why 95% Accuracy Was a Terrible Model: Picking the Right Metric
A model that is right 95 percent of the time sounds excellent, and it is one of the most misleading numbers in machine learning. If only five percent of transactions are fraud, a model that labels every transaction as legitimate is 95 percent accurate and catches nothing. The score looks great while the model is worthless. This blog explains why accuracy fails on many business problems, which metrics to use instead, and how to choose one that reflects the real cost of mistake
ganesh90
Oct 1510 min read


Securing MCP Servers: Auth, Permissions and Audit Logs
The Model Context Protocol makes it easy to connect AI assistants to company systems, and that ease is exactly why security needs attention early. An MCP server can expose databases, files, tickets, and actions to a model that reads untrusted text and sometimes follows it. If the server is open, over-permissioned, or silent, one clever message can turn a helpful assistant into a data leak. This blog explains how to secure MCP servers around three controls: authentication, per
ganesh90
Oct 1511 min read


Small Models vs. Frontier Models on 5 Real Business Tasks
Choosing between a small language model and a frontier model is one of the most expensive decisions in a production AI project, and it is often made on reputation rather than evidence. Frontier models are more capable on hard problems. Small models are cheaper, faster, and easier to run privately. The right choice depends on the task, and most businesses have several different tasks. This blog compares the two on five common business tasks, explains where each tends to do wel
ganesh90
Oct 1510 min read


Why We Replaced Our Multi-Agent System with One Agent and a Script
Multi-agent systems are an attractive idea. Give each task its own specialist, let a manager agent coordinate them, and the design looks like a small company of experts. In practice, many teams find that the company-of-agents design adds more cost, delay, and confusion than it removes. A growing number of them end up replacing it with something much simpler: one agent that handles the judgment, and ordinary code that handles everything else. This blog explains why that change
ganesh90
Oct 1411 min read


Our RAG Bot Was 30% Accurate. Here's the Pipeline That Fixed It
A RAG bot that gets only about three answers in ten right is not rare. It is the normal result when a team connects a language model to a pile of documents, sees a few good demos, and ships. The assistant sounds fluent, so the wrong answers are easy to miss until a customer, an auditor, or an employee acts on one. The good news is that low accuracy in retrieval-augmented generation is usually a pipeline problem, not a model problem, and pipeline problems can be measured and f
ganesh90
Oct 1411 min read
bottom of page