<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Rudhra Kumar Thota on Medium]]></title>
        <description><![CDATA[Stories by Rudhra Kumar Thota on Medium]]></description>
        <link>https://medium.com/@rudhrakumarthota?source=rss-64919863f018------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Bq4JTttDS9pudM4eTu_NKg.png</url>
            <title>Stories by Rudhra Kumar Thota on Medium</title>
            <link>https://medium.com/@rudhrakumarthota?source=rss-64919863f018------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 27 Nov 2026 14:38:12 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@rudhrakumarthota/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[RAG to OAG]]></title>
            <link>https://medium.com/@rudhrakumarthota/rag-to-oag-0260d8561312?source=rss-64919863f018------2</link>
            <guid isPermaLink="false">https://medium.com/p/0260d8561312</guid>
            <category><![CDATA[agentic-rag]]></category>
            <category><![CDATA[rags]]></category>
            <category><![CDATA[oag]]></category>
            <dc:creator><![CDATA[Rudhra Kumar Thota]]></dc:creator>
            <pubDate>Tue, 24 Nov 2026 03:55:06 GMT</pubDate>
            <atom:updated>2026-11-24T03:55:06.533Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Naive RAG</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/939/1*W7yGSz5hTJ8kznsFiOOtoA.png" /></figure><p>OAG (Ontology-Augmented Generation) utilizes an ontology as the “normative schema layer” for knowledge. It pre-defines the domain’s concepts (classes), the relationships between them, and the mandatory constraints or axioms (e.g., SHACL, OWL). Both retrieval and generation operate within this framework of “ontological discipline.”</p><p>In essence, OAG represents a convergence of the preceding five generations (building from premises to conclusion) and inherits key features from them:</p><p>Inheritance from GraphRAG (Dimension 3): An ontology is essentially a graph governed by constraints and prior knowledge — making it more standardized and cross-domain consistent than graphs extracted directly from raw text.</p><p><strong>Advanced RAG with Re-rank</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/939/1*5DTyCciracfdBjhYHYe-0g.png" /></figure><p>Inheritance from AgenticRAG (Dimension 4): The ontology provides a “semantic layer” or “operating system API” for the Agent, allowing it to operate within the ontology’s specifications (Chapter 73 of this book discusses the concept of the “semantic layer as the Agent’s operating system”).</p><p>Integration of RAG/Advanced/Modular RAG (Dimensions 0–2): Core capabilities such as chunk retrieval, re-ranking, and module orchestration remain foundational to OAG, though the retrieval units and generation constraints are reshaped by the ontology.</p><p><strong>ModularRAG</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/939/1*uF7gEjvAUdjnHcVLLxtbhg.png" /></figure><p><strong>AgenticRAG with Planning and Critique</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*c6fHPgxzxdK0b_0uXqfHEw.png" /></figure><p><strong>Ontology Augmented Generation</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/888/1*Sd0B6aD7UKwg_hZ8mu_ErQ.png" /></figure><p>Introduction of Dimension 5 (Semantic Specification): Retrieval is restricted to task-relevant ontological subgraphs; text is linked back to concepts via OAKgrounding; generation is governed by SHACL/OWL constraints (e.g., constrained decoding via libraries like Outlines); and the ontology itself is capable of self-evolution.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/998/1*8Ho4b0hEO2_Q3LQOJ_27zw.png" /></figure><p>RAG addresses “knowledge currency/hallucinations,” GraphRAG tackles “global sense-making,” knowledge graphs/ontologies handle “structuring and reasoning,” and Agents manage “multi-step orchestration.” OAG addresses the intersection that none of the others resolve: in specialized domains demanding rigorous structure, strict rules, and robust traceability, it enables LLMs to grasp domain semantics, adhere to axiomatic constraints, and trace answers back to facts on a point-by-point basis. Rather than replacing any of the existing approaches, it builds upon them, propelling the “ontology” from a supporting role to center stage.</p><p>However, an ontology is an encoding of a pre-existing consensus on structure; if no such consensus exists, the ontology merely ossifies chaos into a schema, causing all subsequent reasoning to be built on shifting sands. For such scenarios, data governance and the formalization of rules should be prioritized over the implementation of OAG.</p><p>Furthermore, there are several risks that must be considered, which can be summarized into four points:</p><p>First, issues regarding the ontology supply chain. The OG-RAG paper itself acknowledges that “the primary bottleneck is the need for domain experts to create high-quality ontologies”; early-stage modeling for Palantir projects involves investments measured in millions of dollars per month. There is no OAG without an ontology, yet ontology construction and evolution are purely labor-intensive processes, they are not subject to Moore’s Law.</p><p>Second, ontology evolution and drift. Whenever business operations change, the schema becomes obsolete; an outdated ontology combined with a real-time LLM results in the confident output of an obsolete worldview. Practitioners in the “compression” camp explicitly acknowledge the need for “automated regression testing following ontology changes,” but this remains a conceptual direction rather than a mature mechanism.</p><p>Third, a philosophical rift regarding assumptions about the world. In closed-loop enterprise scenarios, the Closed-World Assumption (CWA) — where a lack of data implies “no” — holds true; however, in open scenarios (such as news, intelligence, or cross-organizational contexts), the Open-World Assumption (OWA) — where a lack of data implies “unknown” — is the correct approach. Yet, mainstream OAG implementations bet entirely on the CWA; if the assumption is mismatched, the system interprets “unknown” as “no,” a failure that can be fatal in risk control scenarios.</p><p>Fourth, vendor lock-in and migration costs. Once an ontology embodies operational realities and thousands of logical functions come to depend on it, the cost of switching platforms rises monotonically over time. It is both a capability and a shackle.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0260d8561312" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Palantir for AI Agents]]></title>
            <link>https://medium.com/@rudhrakumarthota/palantir-for-ai-agents-e81658a28b11?source=rss-64919863f018------2</link>
            <guid isPermaLink="false">https://medium.com/p/e81658a28b11</guid>
            <dc:creator><![CDATA[Rudhra Kumar Thota]]></dc:creator>
            <pubDate>Wed, 21 Oct 2026 04:01:33 GMT</pubDate>
            <atom:updated>2026-10-21T04:01:33.686Z</atom:updated>
            <content:encoded><![CDATA[<p>Most agent stacks can tell you <strong>what happened.</strong></p><p>Prompts, tool calls, tokens, latency, traces, even the retrieved chunks behind a given answer, all inspectable.</p><p>But six months later, when someone asks the harder question “<strong>why did the agent make this decision?”, </strong>the answer is a reconstruction exercise.</p><p>You search logs, replay prompts, inspect vector-store hits, and hope the underlying data has not changed since.</p><p>That is a bad architecture for an AI system making consequential decisions.</p><p>This is the problem <strong>Semantica</strong> is trying to solve, and the interesting part is the data model.</p><p>Semantica turns agent context, i.e. facts, relationships, decisions, provenance, rules and causal links into a graph you can query later.</p><p><strong>A decision becomes a first-class object.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3KyriA-UpqLAxwuYdj12cw.png" /></figure><p>That changes what you can ask:</p><ul><li>What facts were available when this decision was made?</li><li>Which earlier decision caused or influenced it?</li><li>Where did those facts come from, and have they changed since?</li><li>Have we made a similar decision before?</li><li>What downstream decisions depended on this one?</li><li>Did it pass a deterministic policy check?</li></ul><p>For agents, that is a more useful primitive than memory as it is a <strong>decision graph</strong>.</p><h3>The missing layer in most agent stacks</h3><p>A typical production stack runs user event → agent framework → LLM → tools and APIs → vector DB → logs and traces.</p><p>It works well until the agent starts making critical decisions.</p><p>Vector DBs or tracking systems are not designed to answer: what did the system believe, what did it decide, what caused that decision, and what happened because of it?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Gr0ZGwuyV3AC3wsUAK9jrw.png" /></figure><p>Semantica inserts a graph-native layer into the stack:</p><pre>Sources<br>  ↓  Ingest → Parse → Normalize → Split → Extract<br>  ↓  Conflict detection → Deduplication<br>  ↓  Knowledge graph<br>  ↓  Ontology + Reasoning + Provenance + Decisions<br>  ↓  Enriched context graph<br>  ↓  Vector store / Graph store / RDF store<br>  ↓  REST / MCP / CLI / Explorer / your agent</pre><p>The repository ships separate modules for ingestion, extraction, graph construction, reasoning, provenance, decision intelligence, ontology management, vector search, temporal queries, export, and visualizatio.</p><p><strong>The idea is to promote agent state to structured data.</strong></p><h3>Context graph is not better RAG</h3><p>It is tempting to file Semantica under GraphRAG but that undersells it.</p><p>The core abstraction is the context graph, where entities, relationships, facts, decisions, causal links, and temporal state live in one queryable structure, with a vector store next to it for semantic recall.</p><p>You stop choosing between embeddings and graphs.</p><p>Each layer answers a different question:</p><ul><li>Vector retrieval: “What looks similar?”</li><li>Context graph: “What is connected?”</li><li>Provenance: “Where did this come from?”</li><li>Decision intelligence: “What did we decide, and why?”</li><li>Causal graph: “What influenced what?”</li><li>Deterministic rules: “Which policies imply this outcome?”</li><li>Temporal graph: “What was true at that point in time?”</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SgFcVFntLlWPxsOqDoJvDw.png" /></figure><p>Semantica makes the infrastructure around the LLM inspectable and reproducible.</p><blockquote><strong><em>Editor’s note: </em></strong><em>If you want to </em><strong><em>dive deep into Local LLMs and Agentic Stack</em></strong><em>, you can join our </em><a href="https://archive.ph/o/61WNh/https://www.agentnative.dev/product-foundry"><strong><em>Agent Foundry</em></strong></a><em> program for hands-on, in-depth trainings.</em></blockquote><h3>Setup and a version caveat</h3><pre>pip install semantica<br>semantica doctor</pre><pre># everything, including optional integrations<br>pip install &quot;semantica[all]&quot;</pre><p>One caveat: this project moves fast.</p><p>Pin the version you validated and if you need unreleased behavior, install from a source checkout and pin the commit.</p><h3>Quick start: turn a decision into data</h3><pre>from semantica.context import ContextGraph</pre><pre>ctx = ContextGraph(advanced_analytics=True)</pre><pre>decision_id = ctx.record_decision(<br>    category=&quot;vendor_selection&quot;,<br>    scenario=&quot;Choose a model provider for a regulated workflow&quot;,<br>    reasoning=&quot;Provider B supports required deployment controls and data residency&quot;,<br>    outcome=&quot;selected_provider_b&quot;,<br>    confidence=0.92,<br>)</pre><pre>chain = ctx.trace_decision_chain(decision_id)<br>precedents = ctx.find_similar_decisions(&quot;regulated model-provider selection&quot;, max_results=5)<br>impact = ctx.analyze_decision_impact(decision_id)</pre><p>It looks almost too simple.</p><p>The point is what record_decision() means architecturally: you stop dumping free-form reasoning into a log line and hoping your observability backend stays the canonical record forever.</p><p><strong>You explicitly model the category, scenario, rationale, outcome, confidence, and links to other decisions.</strong></p><p><strong>One warning:</strong> Do not use the reasoning field to persist hidden model chain-of-thought, use it for the rationale your application is prepared to defend: evidence considered, policy applied, threshold crossed, human override.</p><p>That is more useful in production anyway.</p><h3>Causal decision chains</h3><p>One decision is interesting but a chain is infrastructure.</p><p>Take an agentic procurement workflow: a security agent scores a vendor, a compliance agent checks residency, a sourcing agent selects, a finance agent approves the contract.</p><p>Most systems store four separate traces.</p><p>Semantica makes the relationships explicit:</p><pre>security_id = ctx.record_decision(<br>    category=&quot;security_review&quot;,<br>    scenario=&quot;Evaluate Vendor B for production AI workload&quot;,<br>    reasoning=&quot;SOC 2 controls verified; private networking available&quot;,<br>    outcome=&quot;security_approved&quot;,<br>    confidence=0.95,<br>)</pre><pre>selection_id = ctx.record_decision(<br>    category=&quot;vendor_selection&quot;,<br>    scenario=&quot;Choose provider after security and compliance review&quot;,<br>    reasoning=&quot;Vendor B passed required controls and residency constraints&quot;,<br>    outcome=&quot;selected_vendor_b&quot;,<br>    confidence=0.91,<br>)</pre><pre>contract_id = ctx.record_decision(<br>    category=&quot;contract_approval&quot;,<br>    scenario=&quot;Approve annual Vendor B platform agreement&quot;,<br>    reasoning=&quot;Selected vendor is approved; budget within threshold&quot;,<br>    outcome=&quot;contract_approved&quot;,<br>    confidence=0.97,<br>)</pre><pre>ctx.add_causal_relationship(security_id, selection_id, relationship_type=&quot;CAUSED&quot;)<br>ctx.add_causal_relationship(selection_id, contract_id, relationship_type=&quot;INFLUENCED&quot;)</pre><pre>why_contract = ctx.trace_decision_chain(contract_id)<br>blast_radius = ctx.analyze_decision_impact(selection_id)</pre><p>The API currently supports three relationship types: <strong>CAUSED, INFLUENCED, and PRECEDENT_FOR.</strong></p><p>Now imagine Vendor B fails a security review next quarter.</p><p>Instead of “which traces mentioned Vendor B?”, you ask: which later decisions were influenced by the original selection?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iYRU2lHhAc6H2ZCT9IYN5Q.png" /></figure><p><strong>That is blast-radius analysis for decisions, exactly the operation agents need as they move from copilots to systems that approve, route, buy, deploy, and reject on their own.</strong></p><h3>Build the graph from real data</h3><p>Decision records get more valuable when they attach to a real knowledge graph instead of handwritten facts.</p><p>Semantica ships ingestors for files, web content, databases, streams, Git repositories, email, Parquet, Snowflake, and Databricks:</p><pre>from semantica.ingest import FileIngestor<br>from semantica.kg import GraphBuilder</pre><pre>sources = FileIngestor().ingest_directory(&quot;./contracts/&quot;, recursive=True)<br>kg = GraphBuilder(merge_entities=True, enable_temporal=True).build(sources)</pre><p>The pipeline normalizes, splits, extracts entities and relations, flags conflicting facts, deduplicates, and builds the graph.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0w5CWDpzvoELyrJdUiKBnA.png" /></figure><h3>Provenance is where why becomes defensible</h3><p>A causal chain tells you Decision B depended on Decision A but you still need to know what evidence fed Decision A.</p><p>Semantica’s provenance module is built on <a href="https://archive.ph/o/61WNh/https://www.w3.org/TR/prov-o/">W3C PROV-O</a>, the standard ontology for representing provenance:</p><pre>from semantica.provenance import ProvenanceManager</pre><pre>prov = ProvenanceManager(storage_path=&quot;./provenance.db&quot;)</pre><pre>prov.track_entity(<br>    entity_id=&quot;vendor_b&quot;,<br>    source=&quot;security/vendor_b_assessment_2026.pdf&quot;,<br>    metadata={&quot;page&quot;: 12, &quot;extractor&quot;: &quot;NamedEntityRecognizer&quot;, &quot;confidence&quot;: 0.98},<br>)</pre><pre>lineage = prov.get_lineage(&quot;vendor_b&quot;)</pre><p><strong>Causality explains dependency and provenance explains origin.</strong></p><p>You need both to reconstruct a decision without guessing.</p><p>Provenance entries are now hash-chained, each carries a sequence ID and a checksum link to the previous entry, and verify_chain() detects breaks in that history.</p><p>Facts can be invalidated instead of hard-deleted:</p><pre>integrity = prov.verify_chain()</pre><pre>prov.invalidate(<br>    &quot;vendor_b&quot;,<br>    agent_id=&quot;human_security_reviewer&quot;,<br>    reason=&quot;Certificate expired; prior approval no longer valid&quot;,<br>)</pre><p>A mutable <strong>approved=false</strong> row tells you the current truth.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KZ85YcikqDRO-QQdm6tjTQ.png" /></figure><p>An audit ledger also tells you the approval used to exist, who revoked it, and why.</p><p>That is a different requirement, and the right one for high-stakes agent state.</p><h3>Deterministic reasoning: keep policy out of the prompt</h3><p>Semantica ships forward chaining, Rete, Datalog, and SPARQL engines.</p><p>The point is: do not ask an LLM to improvise rules your system already knows.</p><pre>from semantica.reasoning import ReteEngine, Rule, Fact, RuleType</pre><pre>engine = ReteEngine()</pre><pre>engine.build_network([<br>    Rule(<br>        rule_id=&quot;manual_review&quot;,<br>        name=&quot;Escalate high-value restricted transactions&quot;,<br>        conditions=[<br>            {&quot;field&quot;: &quot;amount&quot;, &quot;operator&quot;: &quot;&gt;&quot;, &quot;value&quot;: 10000},<br>            {&quot;field&quot;: &quot;risk_tier&quot;, &quot;operator&quot;: &quot;in&quot;, &quot;value&quot;: [&quot;high&quot;, &quot;critical&quot;]},<br>        ],<br>        conclusion=&quot;require_manual_review&quot;,<br>        rule_type=RuleType.IMPLICATION,<br>    )<br>])</pre><pre>engine.add_fact(Fact(&quot;tx_001&quot;, &quot;transaction&quot;, [{&quot;amount&quot;: 25000, &quot;risk_tier&quot;: &quot;high&quot;}]))<br>matches = engine.match_patterns()</pre><p>If a policy decision came from a deterministic rule, you record the rule ID in the decision metadata and can reproduce the result later.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iJtzVSNR3D7_bgQGYNaSyA.png" /></figure><p>The LLM still extracts facts and proposes actions, the policy gate stops being prompt-shaped English.</p><p>One caveat: the Rete condition matcher is intentionally simple and you should validate match_patterns() against your real rule set before wiring it into a production compliance gate.</p><p>Do not turn a demo rule engine into a regulatory control without tests.</p><h3>Standards outlive frameworks</h3><p><strong>Semantica leans on W3C PROV-O for provenance, RDF for representation, SPARQL for querying, SHACL for graph constraints, and OWL for ontologies.</strong></p><p>That looks unfashionable next to the latest agent SDK, which is exactly why it is useful.</p><p><strong>Agent frameworks churn but audit requirements do not.</strong></p><p>Your regulator does not care which agent loop produced the decision.</p><p>Open standards keep the record decoupled from the model provider and framework of the month.</p><h3>MCP turns the graph into agent tooling</h3><p>Semantica exposes everything through a Model Context Protocol server:</p><pre>python -m semantica.mcp_server<br># or<br>semantica-mcp</pre><pre>{<br>  &quot;mcpServers&quot;: {<br>    &quot;semantica&quot;: {<br>      &quot;command&quot;: &quot;python&quot;,<br>      &quot;args&quot;: [&quot;-m&quot;, &quot;semantica.mcp_server&quot;]<br>    }<br>  }<br>}</pre><p>The server exposes entity and relation extraction, decision recording and queries, precedent search, causal chains, graph edits, reasoning, analytics, and export.</p><p>Your agent calls a standardized tool to record or inspect state.</p><h3>Where it sits in your stack</h3><p>Semantica positions itself underneath as the persistent context and accountability layer: agent runtime on top, and decisions, causal links, provenance, reasoning, and constraints in the middle, and graph and vector stores below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cT2OJJxUxLnJEuLQeoLApw.png" /></figure><p>While LLM stays probabilistic, the state around it stops being ephemeral.</p><h3>Observability is not enough</h3><p>You still need traces, metrics, evals, and token accounting but observability is execution-centric: it tells you what the software did during one run.</p><p><strong>A decision graph is domain-centric: it records what the system decided as part of the state of the business.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1efnBeouRS4JyaTCde6kdQ.png" /></figure><p>Consider an underwriting agent.</p><p>A trace shows the model called a credit API and returned <strong>approved</strong>.</p><p>A decision graph represents:</p><pre>Applicant<br> ├── income → $85k<br> ├── DTI → 31%<br> └── credit_history → clean_36_months</pre><pre>Decision: proceed_to_underwriting<br> ├── based_on → applicant facts<br> ├── sourced_from → application + credit report<br> └── CAUSED → underwriting decision</pre><pre>Decision: approved<br> ├── governed_by → lending policy<br> └── INFLUENCED → interest-rate decision</pre><p>You can inspect that months later without replaying the original model conversation.</p><p>Enterprises already treat orders, transactions, approvals, and accounting events as durable domain entities.</p><p><strong>AI decisions should join them.</strong></p><h3>Concluding thoughts</h3><p><strong>The next problem is making agents accountable over time rather than explainable.</strong></p><p><strong>Accountable as architecture: decision → causal parents → evidence → provenance → policy evaluation → downstream effects → later corrections.</strong></p><p>Semantica is one of the more complete open-source attempts at packaging those primitives into one layer.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e81658a28b11" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AI Infrastructure — Level 1]]></title>
            <link>https://medium.com/@rudhrakumarthota/ai-infrastructure-level-1-7106c0eae681?source=rss-64919863f018------2</link>
            <guid isPermaLink="false">https://medium.com/p/7106c0eae681</guid>
            <category><![CDATA[ai-infrastructure]]></category>
            <category><![CDATA[infrastructure]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Rudhra Kumar Thota]]></dc:creator>
            <pubDate>Mon, 31 Aug 2026 13:42:42 GMT</pubDate>
            <atom:updated>2026-08-31T13:42:42.359Z</atom:updated>
            <content:encoded><![CDATA[<p>Series: AI Infrastructure in 5 Levels (This is Level 1 — The Ground Floor)</p><p>AI Infrastructure — Level 1: The Stuff Nobody Talks About Until It Breaks</p><p>Series: AI Infrastructure in 5 Levels (This is Level 1 — The Ground Floor)</p><p>When I joined my first data science role five years back, I thought my job was going to be all fancy model building, tweaking hyperparameters, and printing accuracy scores in Jupyter notebooks.</p><p>Three weeks in, I spent an entire Tuesday figuring out why my training script kept crashing. Turned out the GPU memory was being hogged by some intern’s half-finished experiment from the previous Friday. Nobody told me. There was no process. There was just me, staring at a CUDA out of memory error, questioning my career choices.</p><p>That was my first real encounter with what people now call AI Infrastructure. And nobody had explained it to me in college. Not once.</p><h3><strong>So What Actually Is “AI Infrastructure”?</strong></h3><p>Forget the buzzword for a second. Think of it like this.</p><p>You want to cook dinner. You need a kitchen, right? A stove, a fridge, running water, maybe an oven. You also need gas or electricity flowing in. And someone had to build the pipes, wire the sockets, install the exhaust fan.</p><p>You never think about any of that when you’re just making pasta. But the moment the gas line clogs or the power trips, suddenly you’re standing in a dark kitchen holding a raw onion, completely stuck.</p><p>AI Infrastructure is the kitchen. It’s everything that sits underneath the actual AI model. The hardware, the networks, the storage, the software layers, the scheduling systems, the monitoring dashboards. All the unsexy plumbing that lets a data scientist hit “Run” and actually get a result back.</p><p>Without it, your billion-parameter language model is just a very expensive text file sitting on a hard drive. Doing nothing. Helping nobody.</p><h3><strong>The Four Legs of the Table</strong></h3><p>Every AI infrastructure setup I’ve worked with — whether it was a scrappy 4-person startup or a mid-size company with a proper ML platform team — boils down to four things. I call them the four legs because if even one wobbles, the whole thing tips over.</p><h3><strong>1. Compute (The Muscle)</strong></h3><p>This is your GPUs, TPUs, CPUs. The actual chips doing the math. When people say “we need more compute,” they mean the processors are maxed out. Training a decent image classifier might need one GPU for a few hours. Training something like a large language model? You’re looking at hundreds or thousands of GPUs running in parallel for weeks. And they don’t come cheap. A single NVIDIA A100 card costs somewhere around $10,000 to $15,000 depending on where you source it. Multiply that by a cluster of 200. Yeah. That’s a mortgage payment.</p><h3><strong>2. Storage (The Memory)</strong></h3><p>Models are big. Datasets are bigger. A single training dataset for a recommendation engine I worked on was around 4 terabytes. That’s roughly 870 DVDs worth of data. You need fast storage to feed data into your GPUs quickly, otherwise your expensive chips just sit there idle, waiting. And idle GPUs still cost you money whether they’re doing work or not. I learned that the hard way when our cloud bill hit $40K in a month because someone left a training job running over a weekend on data that was loading at a crawl.</p><h3><strong>3. Networking (The Roads)</strong></h3><p>When you have 100 GPUs spread across multiple servers, they need to talk to each other. Fast. Really fast. We’re talking specialized interconnects like InfiniBand or high-speed Ethernet. If the network is slow, GPU 1 finishes its chunk of math and then just… waits. For GPU 47 to catch up. It’s like a relay race where one runner is in sneakers and the other is barefoot on gravel.</p><h3><strong>4. Software and Orchestration (The Brain of the Kitchen)</strong></h3><p>This is Kubernetes, job schedulers, MLflow, experiment trackers, container images, CI/CD pipelines for models. Basically all the code and tooling that decides which job runs on which GPU, when, and how you roll back if the new model version performs worse than the old one. In my second year, our team went from manually SSH-ing into servers to kick off training runs to having a proper orchestration layer. The difference was night and day. We stopped stepping on each other’s toes. Mostly.</p><h4>Why Should You Care if You’re “Just” Building Models?</h4><p>I get this question a lot from junior data scientists. ”I just write PyTorch code. Why do I need to know what a Kubernetes pod is?”</p><p>And I get it. Five years ago, I’d have said the same thing.</p><p>But here’s what I’ve seen play out over and over. You build a model on your laptop. It works great. You hand it over to the engineering team. They try to deploy it. It fails. The inference latency is 12 seconds instead of 200 milliseconds. The model needs 16 GB of RAM but the production server only has 8. The data pipeline feeding predictions is in a different time zone and updates with a 6-hour lag.</p><p>None of that is a “model problem.” It’s an infrastructure problem. And if you don’t at least understand the landscape, you’ll spend your career building beautiful models that never actually ship.</p><p>You don’t need to become a DevOps engineer. But knowing that your model lives inside a bigger machine? That changes how you design things from day one.</p><h4>A Small Story That Stuck With Me</h4><p>About two years ago, we were scaling up a fraud detection model for a fintech client. The model itself was done. Solid. Good precision, good recall. We were feeling pretty good about ourselves.</p><p>Then deployment week hit.</p><p>The model needed to serve predictions in under 50 milliseconds because it sat in the middle of a live payment transaction flow. Our infrastructure at the time was a single on-prem GPU server shared by six teams. The inference queue was backed up by 45 minutes during peak hours.</p><p>We didn’t have a model problem. We had an infrastructure problem. And it took us three painful weeks of re-architecting — moving to a cloud-based auto-scaling setup, containerizing the model, setting up a proper API gateway — before the thing actually worked in production.</p><p>Three weeks. For a model that was “done” in two.</p><p>That experience burned something into my brain. The model is maybe 30% of the work. The rest is making sure it can actually live and breathe in the real world. And that’s infrastructure.</p><h4>What’s Coming Next in This Series</h4><p>This was Level 1. The “what is this thing and why does it exist” level. No deep technical dives. No architecture diagrams. Just the mental model you need before anything else makes sense.</p><p>In Level 2, I will walk you through how GPU clusters actually work under the hood. How jobs get scheduled. Why your training run got bumped at 2 AM. The stuff I wish someone had told me in year one.</p><p>Level 3 gets into storage and data pipelines. Level 4 is about MLOps and the deployment side. Level 5 is where we talk about the future — multi-cloud, edge inference, the whole mess of cost optimization.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7106c0eae681" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AI in Data Integration]]></title>
            <link>https://medium.com/@rudhrakumarthota/ai-in-data-integration-a8d6b44853da?source=rss-64919863f018------2</link>
            <guid isPermaLink="false">https://medium.com/p/a8d6b44853da</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[ai-in-data-integration]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[data]]></category>
            <dc:creator><![CDATA[Rudhra Kumar Thota]]></dc:creator>
            <pubDate>Sun, 05 Jul 2026 05:00:19 GMT</pubDate>
            <atom:updated>2026-07-05T05:00:19.336Z</atom:updated>
            <content:encoded><![CDATA[<p>Discover how AI data integration automates data mapping, improves quality, and speeds up real-time insights</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A7iHHEQF0D8dJ0bPUnCs8Q.jpeg" /></figure><p>Every business collects data — lots of it. Every click, swipe, or transaction leaves behind a signal, a piece of data that could reveal something meaningful about your business. But without a way to connect these data points, valuable insights remain locked away, scattered across systems, and impossible to act on quickly.</p><h3><strong>What is AI in data integration?</strong></h3><p>AI in data integration is the process of using AI to integrate data from multiple sources, such as databases, data lakehouses, ERPs, CRMs, or IoT sensors. It takes the hassle out of traditional data integration by automating tasks such as matching fields and fixing data errors, By delivering data ready for analysis, AI saves you time and helps you make smarter decisions faster, with confidence.</p><h3><strong>The need for AI in data integration:</strong></h3><p>Organizations today generate and collect more data than ever before: online and in-store transactions, social media likes, click-through rates, customer service chats, comments, satisfaction scores, patient test results, and much more. This data is used to personalize offers to customers, improve the patient experience, or increase sales. For example, a global retailer can combine data from their e-commerce site, loyalty program, and physical stores to email customers about a new product they are bound to like. Without a quick, efficient way to connect the data sources, the retailer may miss out on opportunities for growth.</p><h3><strong>Traditional data integration challenges</strong></h3><p>Traditional data integration usually relies on manual data mapping and extract, transform, load (ETL) or extract, load, transform (ELT) pipelines. Although it’s a good way to unify data and create a single source of truth, it comes with some downsides. Here are three of the biggest traditional data integration challenges.</p><p><strong>a) Slow or manual data mapping</strong></p><p>Traditional data integration often relies on manual data mapping — — a time-consuming and error-prone process. For example, if your sales system labels customers with “Client_ID” but your marketing tool uses “Customer Number,” you’ll have to align the fields to remove duplicates and make the unified data usable. The more data sources and data formats you are integrating, the harder the integration and the higher the odds for errors.</p><p><strong>b) Hard to adapt to new source systems or data</strong></p><p>When a source system changes data rules or structure, the integration may stop working or introduce poor <a href="https://www.salesforce.com/data/quality/">data quality</a>. If, for example, your CRM uses customer_ID to identify customers but later switches to customer_name, a manual integration may fail until the mapping rules between the systems change.</p><p><strong>c) Integration complexity</strong></p><p>When you try to integrate many systems with different data structures and formats, you have to be prepared for the complexity involved. You have to map more fields, handle more transformations, and potentially perform more debugging. There’s also the risk of broken ELT or ETL pipelines, which can result in inaccurate data in your downstream systems.</p><h3>How AI can turbocharge data integration</h3><p>AI is transforming data integration by making complex processes faster, smarter, and more efficient. Here are four ways AI can help you unlock the full potential of your data.</p><p>i) Automating data mapping and ingestion</p><p>ii) Improving data quality and insight</p><p>iii) Enhancing real-time data processing</p><p>iv) Ensuring security and compliance</p><h3>How AI in data integration works</h3><p>AI simplifies the data integration process by automating each step, from extracting raw information to delivering reliable insights.</p><p>a) Data extraction AI starts by gathering data from multiple sources, such as CRMs, data lakes, or warehouses. It eliminates extraction and loading protocols, saving you time and delivering results faster.</p><p>b) Data cleansing and transformation</p><p>Once the data is extracted, AI examines its quality and identifies inconsistencies, missing values, or errors. It then standardizes formats, corrects issues, and prepares the data for use.</p><p>c) Data mapping</p><p>AI automates the alignment of data fields between systems. Instead of manually linking fields, AI learns patterns and relationships, mapping data and delivering a single source of truth in your destination system.</p><p>d) Data storage and access</p><p>Once the data is mapped, AI organizes the storage structure and files away the data in your downstream system so you can retrieve it faster for analytics and reporting.</p><p>e) Data monitoring</p><p>AI monitors and maintains data quality over time, identifying and resolving inconsistencies as they arise. This continuous oversight helps you access reliable, accurate data when you need it most.</p><p>AI can automate how data from multiple sources is combined, cleaned, and synchronized. It eliminates manual tasks, improves accuracy, and helps you access insights faster — critical for real-time decisions and personalized customer experiences.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a8d6b44853da" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Right Data Model for Analytics with Alteryx and Tableau]]></title>
            <link>https://medium.com/@rudhrakumarthota/right-data-model-for-analytics-with-alteryx-and-tableau-a2b566aa8755?source=rss-64919863f018------2</link>
            <guid isPermaLink="false">https://medium.com/p/a2b566aa8755</guid>
            <dc:creator><![CDATA[Rudhra Kumar Thota]]></dc:creator>
            <pubDate>Tue, 05 May 2026 14:47:39 GMT</pubDate>
            <atom:updated>2026-05-05T14:47:39.330Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/322/1*uCRXe6KYnGEcUVFaiGDvVA.png" /></figure><p>When we build analytics solutions, we often obsess about the tools — what Alteryx workflow to run, or how to design the perfect Tableau dashboard. But the foundational factor lies underneath: <strong>the data model</strong>.</p><p>The structure of your data dictates how smoothly your BI tools will run, how quickly dashboards refresh, and how confidently your teams can ask new questions. With cloud data platforms making storage cheap and compute elastic, the conversation has shifted: we don’t have to pick a “one-size-fits-all” model anymore. Instead, we can choose the right model for the right job.</p><p>Let’s explore how the four main models — <strong>Kimball (dimensional)</strong>, <strong>One Big Table (OBT)</strong>, <strong>Lakehouse/Medallion</strong>, and finally <strong>Data Vault</strong> — play out in real life with Alteryx and Tableau.</p><h3>Kimball: The Classic Fit for BI</h3><p>Kimball’s dimensional model organises data into <strong>fact tables</strong> (quantitative events like sales amounts) and <strong>dimension tables</strong> (descriptive context like customer, product, date) in a star schema designed for analytics and driving business value (<a href="https://www.kimballgroup.com/2002/09/two-powerful-ideas/">Kimball Group explanation</a>).</p><p>Think of Kimball’s star schemas as a well-organised supermarket. Facts are your tills, capturing every transaction. Dimensions are your neatly labelled aisles — products, dates, customers — ready for anyone to browse.</p><p><strong>Why it works with Tableau and Alteryx:</strong></p><ul><li>Tableau thrives on Kimball. It recognises relationships automatically, letting users drag dimensions and measures without thinking about joins.</li><li>In Alteryx, these models are easy to create and extend, fitting naturally into workflows.</li></ul><p><strong>The trade-off:</strong> Rigidity. Changing a dimension (say, redefining “customer”) means re-plumbing the system. Great for stability, not so great for agility.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a2b566aa8755" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Differences between Tableau and Alteryx Tool]]></title>
            <link>https://medium.com/@rudhrakumarthota/differences-between-tableau-and-alteryx-tool-4ab2b658ac2c?source=rss-64919863f018------2</link>
            <guid isPermaLink="false">https://medium.com/p/4ab2b658ac2c</guid>
            <category><![CDATA[alteryx]]></category>
            <category><![CDATA[tableau]]></category>
            <dc:creator><![CDATA[Rudhra Kumar Thota]]></dc:creator>
            <pubDate>Tue, 05 May 2026 14:44:57 GMT</pubDate>
            <atom:updated>2026-05-05T14:44:57.973Z</atom:updated>
            <content:encoded><![CDATA[<p>Tableau and Alteryx are two popular tools in the field of data analytics, but they serve different purposes.</p><p>Tableau is primarily a data visualization tool that helps users create interactive dashboards and reports. It allows users to connect to various data sources, manipulate the data, and create visualizations such as charts, graphs, and maps. Tableau makes it easy to analyze data, spot trends, and communicate insights with others.</p><p><strong><em>Interested in learning Tableau Advanced Training? Click here to learn </em></strong><a href="https://hkrtrainings.com/tableau-certification-training"><strong><em>Advanced Tableau Online Training</em></strong></a><strong><em> from Experts!</em></strong></p><p><strong>Tableau Features</strong></p><p>Tableau packs the following features, to make data management easier than ever. Take a look at the list given below:</p><p>Predictive Analysis</p><p>Data Blending</p><p>Encrypted Storage</p><p>Spatial Analysis</p><p>Export-Package</p><p>Import-Package</p><p>Mapping</p><p>Interactive Visualizations</p><p>Sharing</p><p>Encryption</p><p>Governance and Security</p><p>Drag and Drop Workflow</p><p>Alteryx, on the other hand, is a data preparation and blending tool. It allows users to connect to various data sources, transform and clean the data, and then blend it together into a single dataset for analysis. Alteryx automates many of the manual tasks involved in data preparation, saving users time and effort. It also has advanced capabilities for data blending, spatial analysis, and predictive modeling.</p><p>Alteryx Features</p><p>Alteryx comes with the following features, which can help you in getting actionable business insights. Kindly take a look at the following points given below:</p><p>Stanford University patented protection.</p><p>Toggle View</p><p>Drag and Drop actions</p><p>Native data connector list</p><p>Highlight and Filter data optionality</p><p>Dashboard sharing</p><p>Dashboards embedding</p><p>Data notifications</p><p>Mobile-ready dashboards</p><p>Tableau Reader for viewing data</p><p>Create “no-code” data queries</p><p>Dashboard commenting</p><p>Import data of all sizes and ranges</p><p>Translate queries into visuals</p><p>Interactive dashboards</p><p>Metadata management</p><p>Convert string insights into a guided story</p><p>Every level of security permission</p><p>Automatic updates</p><p>Server API</p><p>Integration with Tableau Public for data sharing</p><p><strong>Why use Alteryx with Tableau?</strong></p><p>Tableau is an undeniably powerful software to collect and analyze data from different sources. Its easy-to-understand visualizations answer your every complex question and help you in making the right moves. But, with the evolution of technology, new data types have also emerged (for eg: social media and big data). Gathering and analyzing the array of these newly emerged data to make critical business decisions is not a piece of cake. It will require specialists and extended-IT staff to get this task done.</p><p>This is where Alteryx came in, as you will not have to wait even a bit to access and analyze the datasheets you need with the help of it. Alteryx allows you to integrate every data source from any location virtually. It then combines the data sources with third-party location-based, spatial, demographic data and arranges them into a single workflow. It provides you with the best set of data available to analyze it with the help of Tableau. And you don’t need data scientists or specialists for this.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4ab2b658ac2c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Which RAG Should You Use?]]></title>
            <link>https://medium.com/@rudhrakumarthota/which-rag-should-you-use-d13827580cd6?source=rss-64919863f018------2</link>
            <guid isPermaLink="false">https://medium.com/p/d13827580cd6</guid>
            <category><![CDATA[rags]]></category>
            <dc:creator><![CDATA[Rudhra Kumar Thota]]></dc:creator>
            <pubDate>Sun, 03 May 2026 10:54:36 GMT</pubDate>
            <atom:updated>2026-05-03T10:54:36.860Z</atom:updated>
            <content:encoded><![CDATA[<p>Retrieval-Augmented Generation (RAG) is a technique that extends what a language model can do by connecting it to external knowledge at query time. Rather than relying solely on what was learned during training, the model retrieves relevant information first, then generates an answer based on what it found.</p><p>Multiple RAG approaches exist, each solving the retrieval problem differently. In this article, I use a collection of food recipes to compare three of them: Vector RAG, Vectorless RAG, and Knowledge Graph RAG.</p><h3>About the Dataset</h3><p>The dataset used in this article is a collection of recipes scraped from <a href="https://archive.ph/o/pcLaB/https://www.kaggle.com/datasets/thedevastator/better-recipes-for-a-better-life">AllRecipes</a>. The raw dataset came with 1,090 rows. After removing 129 duplicates, 961 unique recipes remained.</p><p>A few things stood out.</p><ul><li>Desserts dominated the category distribution, making up over a third of the entire dataset.</li><li>Cook times clustered into two groups, quick recipes under 15 minutes and longer ones between 45 and 75 minutes.</li><li>The median recipe used 10 ingredients.</li><li>Ratings skewed heavily toward 4.5 and above, a pattern typical of scraped data where only the most popular recipes accumulate enough reviews to survive.</li></ul><p>Based on the charts above, the dataset is heavily weighted toward desserts. In reality, most datasets are not perfectly distributed, and this one is no exception.</p><p>The five benchmark queries below were designed to test how each RAG method handles a dataset like this, where the data does not always match the query.</p><h3>The Benchmark Queries</h3><p>The five query types below represent the spectrum of retrieval complexity from simple keyword lookup to cross-document reasoning and full corpus synthesis.</p><ul><li>Q1 tests basic recall.</li><li>Q2 tests structured constraints.</li><li>Q3 tests semantic understanding, matching intent rather than keywords.</li><li>Q4 tests relational reasoning across multiple documents simultaneously.</li><li>Q5 tests aggregation, synthesizing a pattern across the entire corpus rather than retrieving a single document.</li></ul><h3>Data Subset</h3><p>To control token consumption, the dataset was subsetted for Vectorless RAG and Knowledge Graph RAG. Vector RAG uses FAISS for retrieval, which is efficient enough to run against the full dataset without meaningful cost implications.</p><p>In this article, Vector RAG indexes all 961 recipes. Vectorless RAG is capped at 100 recipes, consuming around 25,000 tokens per query. Scaling to the full dataset would push that to nearly 240,000 tokens, past the context window limit of most models. Knowledge Graph RAG extracts entities from 150 recipes upfront, runs once, and gets cached at around $0.015.</p><h3>Vector RAG</h3><p>Vector RAG is one of the most widely adopted RAG approach. It is fast, cost efficient, and works well for the majority of queries most applications encounter.</p><p><strong>How It Works</strong></p><p>Here, every recipe gets converted into a list of 1,536 numbers called an embedding, produced by OpenAI’s text-embedding-3-small model. Similar recipes produce similar number patterns. A chicken soup recipe and a beef broth recipe will have embeddings that point in roughly the same direction. A chocolate cake recipe will point somewhere else entirely.</p><p>These embeddings are stored in FAISS, a vector search library built by Meta. When a query arrives, the same model converts the question into its own list of 1,536 numbers. FAISS compares that query vector against all 961 stored recipe vectors and returns the top-k most similar ones.</p><p>Top-k is the number of chunks retrieved and passed to the LLM per query. Five is a common starting point, but the right value depends on your dataset and query types. Both recipe chunks and queries are L2 normalized before entering FAISS to ensure similarity scores reflect meaning rather than text length.</p><h3>Vectorless RAG</h3><p>Unlike Vector RAG which selects five chunks before the LLM gets involved, Vectorless RAG gives the LLM the full picture and lets it decide.</p><p><strong>How It Works</strong></p><p>There are no embeddings, no vector index, and no retrieval step in the traditional sense. Every document gets loaded into memory as plain text and passed directly to the LLM with the query. The model reads everything and writes an answer.</p><p>If that sounds familiar, it should. This is essentially what you do when you copy and paste a document into ChatGPT and ask a question about it. LlamaIndex’s SummaryIndex automates that process. The intelligence is still entirely GPT-4o-mini. LlamaIndex is the plumbing.</p><p>In Vectorless RAG, every recipe in the subset goes into the prompt. The LLM does the selecting itself by reading everything at once. Rather than sending all documents in one flat prompt, SummaryIndex uses a TREE_SUMMARIZE response mode. It summarises groups of documents first, then summarises those summaries, working upward until a final answer emerges. This handles longer contexts more reliably than stuffing everything into a single prompt.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d13827580cd6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[LangChain Deep Agents AI Systems]]></title>
            <link>https://medium.com/@rudhrakumarthota/langchain-deep-agents-ai-systems-c6305757c342?source=rss-64919863f018------2</link>
            <guid isPermaLink="false">https://medium.com/p/c6305757c342</guid>
            <category><![CDATA[langchain]]></category>
            <category><![CDATA[langchain-agents]]></category>
            <dc:creator><![CDATA[Rudhra Kumar Thota]]></dc:creator>
            <pubDate>Tue, 14 Apr 2026 04:17:53 GMT</pubDate>
            <atom:updated>2026-04-14T04:17:53.558Z</atom:updated>
            <content:encoded><![CDATA[<h4>Most people are still hand-crafting agent loops in LangGraph. Deep Agents is a higher-level answer to that — and it’s more opinionated than you’d expect.</h4><p>There’s a pattern I’ve watched repeat itself across almost every team that gets serious about building agents.</p><p>First, they try LangChain chains. Works fine for simple pipelines. Then the task gets complex — needs tool calls, needs to loop, needs to handle variable-length outputs — and chains stop being enough. So they reach for LangGraph, and suddenly they’re writing state schemas, conditional edges, and graph compilation logic before they’ve even gotten to the actual problem.</p><p>It’s not that LangGraph is bad. It’s extremely powerful. But it’s a runtime — a low-level primitive — and most people are using it as if it’s an application framework. LangChain noticed this, and deepagents is their answer.</p><h3>What Deep Agents Actually Is</h3><p>Let me be specific here, because “deep agents” sounds like it could mean anything.</p><p>deepagents is a standalone Python library — installable with pip install deepagents — that sits on top of LangChain and LangGraph. The LangChain docs describe it as an <strong>&quot;agent harness&quot;</strong>: it provides the same core tool-calling loop as other frameworks, but with a set of built-in capabilities baked in so you don&#39;t have to reinvent them.</p><p>The central function is create_deep_agent(). In its simplest form:</p><pre>from deepagents import create_deep_agent</pre><pre>def get_weather(city: str) -&gt; str:<br>    &quot;&quot;&quot;Get weather for a given city.&quot;&quot;&quot;<br>    return f&quot;It&#39;s always sunny in {city}!&quot;<br>agent = create_deep_agent(<br>    tools=[get_weather],<br>    system_prompt=&quot;You are a helpful assistant&quot;,<br>)<br>agent.invoke(<br>    {&quot;messages&quot;: [{&quot;role&quot;: &quot;user&quot;, &quot;content&quot;: &quot;What is the weather in Mumbai?&quot;}]}<br>)</pre><p>That’s it. One function. Under the hood, the library handles the LangGraph graph, state management, streaming, and context window management — none of which you touched.</p><p>But the real story is what comes built-in by default.</p><h3>The Five Capabilities That Make This Different</h3><h3>1. Built-in Planning with write_todos</h3><p>Every deep agent automatically has access to a write_todos tool. When given a complex task, the agent uses this to break the work into discrete steps, track their statuses (pending, in_progress, completed), and adapt the plan as the task evolves.</p><p>This matters because it’s not just a prompt trick — the to-do list is persisted in agent state. The agent can come back to it, update it, and refer to it across the full lifetime of a session. You’re not manually prompting the model to “think step by step.” The structure is baked into the harness.</p><h3>2. A Virtual Filesystem</h3><p>This is the one that surprised me most. Deep agents come with a set of filesystem tools by default: ls, read_file, write_file, edit_file, glob, and grep.</p><p>Why does an agent need a filesystem? Context management.</p><p>LLM context windows are finite. When an agent is doing long research tasks, running code, or handling large tool results, the conversation history can balloon fast. Deep agents handle this by offloading large content to the virtual filesystem instead of keeping everything in the context window.</p><p>When a tool result exceeds 20,000 tokens, the library automatically saves it to the configured backend and replaces it in the context with a file path reference and a 10-line preview. The agent can then read_file or grep that file when it actually needs the content. This is intelligent context compression — not chunking, not truncation, but purposeful offloading with retrieval on demand.</p><p>The filesystem can be backed by in-memory state (default), local disk, LangGraph Store for cross-thread persistence, or sandboxed environments like Modal or Daytona. The backend is pluggable.</p><h3>3. Subagent Spawning</h3><p>The harness includes a built-in task tool that lets the main agent spawn specialized subagents for isolated subtasks.</p><p>Here’s why this is a bigger deal than it sounds. In a long research task, if a single agent handles everything, its context fills up with intermediate steps, search results, and partial outputs. Subagents solve this elegantly: the main agent delegates a specific subtask to a fresh agent instance with its own clean context. The subagent runs autonomously, completes its work, and returns a single summary to the main agent. The main agent’s context stays clean.</p><p>You can configure custom subagents with their own tools and system prompts:</p><pre>from deepagents import create_deep_agent, Subagent</pre><pre>code_reviewer = Subagent(<br>    name=&quot;code-reviewer&quot;,<br>    system_prompt=&quot;You are an expert code reviewer. Analyze code for bugs, style, and performance.&quot;,<br>    tools=[read_file_tool],<br>)<br>agent = create_deep_agent(<br>    tools=[internet_search],<br>    subagents=[code_reviewer],<br>    system_prompt=&quot;You are a research and engineering assistant.&quot;,<br>)</pre><p>The default subagent — a general-purpose one with filesystem tools — is always available without any extra configuration.</p><h3>4. Automatic Context Compression and Summarization</h3><p>This is where the library genuinely earns its keep on long-running tasks.</p><p>When the agent’s context reaches 85% of the model’s context window limit, and there’s nothing left to offload to the filesystem, the harness triggers automatic summarization. An LLM generates a structured summary of everything that has happened — session intent, artifacts created, next steps — and that summary replaces the full conversation history in working memory. The original messages are preserved to the filesystem as a canonical record, so the agent can recover specific details if needed.</p><p>The result is that deep agents can run indefinitely on complex tasks without hitting context limits — something you’d have to engineer manually with raw LangGraph.</p><h3>5. Long-term Memory Across Conversations</h3><p>By default, agent state lives within a single thread. But when you configure a CompositeBackend with a LangGraph Store, the agent can persist memory across sessions and threads.</p><p>Files stored at the /memories/ path (or wherever you configure it) survive agent restarts and are accessible from any conversation thread. This is how you build an agent that remembers your preferences, your codebase conventions, or the progress of a multi-day research project.</p><pre>from deepagents import create_deep_agent<br>from deepagents.backends import CompositeBackend, StateBackend, StoreBackend<br>from langgraph.store.memory import InMemoryStore</pre><pre>store = InMemoryStore()<br>backend = CompositeBackend(<br>    routes={&quot;/memories/&quot;: StoreBackend(store=store)},<br>    default=StateBackend(),<br>)<br>agent = create_deep_agent(<br>    tools=[...],<br>    backend=backend,<br>    memory=[&quot;path/to/AGENTS.md&quot;],  # persistent context file<br>)</pre><h3>How It Fits in the LangChain Ecosystem</h3><p>This is where people get confused, so it’s worth being explicit.</p><p><strong>LangChain</strong> is the framework that provides building blocks: models, tools, prompts, chains. It’s the foundation layer.</p><p><strong>LangGraph</strong> is a runtime for durable, stateful, graph-based agent execution. It handles persistence, streaming, interrupts, and complex conditional flows. It’s the engine.</p><p><strong>Deep Agents</strong> is a harness built on top of both. It’s not a replacement for LangGraph — it uses LangGraph under the hood for everything. What it provides is a higher-level API with opinionated defaults, so you don’t have to build the planner, the filesystem layer, the context compression, and the subagent infrastructure from scratch every time.</p><p>Think of it this way: LangGraph gives you an engine and a transmission. Deep Agents gives you a car.</p><p>For straightforward agents, LangChain’s create_agent is probably enough. For complex, long-running, multi-step tasks with large context requirements, that&#39;s where deepagents earns its abstraction cost.</p><h3>Building a Research Agent: The Real Quickstart</h3><p>Here’s a practical example — a research agent that can search the web and produce a structured report:</p><pre>import os<br>from typing import Literal<br>from tavily import TavilyClient<br>from deepagents import create_deep_agent</pre><pre>tavily_client = TavilyClient(api_key=os.environ[&quot;TAVILY_API_KEY&quot;])<br>def internet_search(<br>    query: str,<br>    max_results: int = 5,<br>    topic: Literal[&quot;general&quot;, &quot;news&quot;, &quot;finance&quot;] = &quot;general&quot;,<br>    include_raw_content: bool = False,<br>):<br>    &quot;&quot;&quot;Run a web search and return results.&quot;&quot;&quot;<br>    return tavily_client.search(<br>        query,<br>        max_results=max_results,<br>        include_raw_content=include_raw_content,<br>        topic=topic,<br>    )<br>research_instructions = &quot;&quot;&quot;You are an expert researcher. <br>Your job is to conduct thorough research and then write a polished report.<br>Use internet_search to gather information.<br>Write your findings to files as you go to avoid losing context.<br>Use write_todos to plan your research steps before starting.<br>&quot;&quot;&quot;<br>agent = create_deep_agent(<br>    model=&quot;anthropic:claude-sonnet-4-6&quot;,  # default model<br>    tools=[internet_search],<br>    system_prompt=research_instructions,<br>)<br>result = agent.invoke({<br>    &quot;messages&quot;: [{<br>        &quot;role&quot;: &quot;user&quot;,<br>        &quot;content&quot;: &quot;Research the current state of agentic AI frameworks in 2025 and write a structured report.&quot;<br>    }]<br>})<br>print(result[&quot;messages&quot;][-1].content)</pre><p>What happens when you run this:</p><ol><li>The agent calls write_todos to plan its research steps</li><li>It runs searches, offloading large results to the virtual filesystem automatically</li><li>If the task is complex, it spawns a subagent to handle a specific section</li><li>It reads back relevant files as needed and synthesizes a final report</li><li>Throughout, the harness manages context so the model never hits its window limit</li></ol><p>You wrote none of that infrastructure. It came with the harness.</p><h3>The Deep Agents CLI</h3><p>One more thing worth knowing: deepagents also ships a command-line agent built on the same SDK.</p><pre>pip install deepagents<br>deepagents  # launches the interactive CLI agent</pre><p>It’s a coding agent you can run in your terminal — think Claude Code or Aider, but built on the Deep Agents SDK. It supports interactive mode, non-interactive pipe mode (-n flag for scripting), custom skills, and persistent memory. You can teach it your project conventions and it&#39;ll remember them across sessions.</p><p>This means the same SDK that powers your production research agent also powers a usable developer tool out of the box.</p><h3>When You Should (and Shouldn’t) Use It</h3><p>deepagents makes sense when:</p><ul><li>Your task requires planning and multiple steps to complete</li><li>Tool results are large and need to be managed across a long session</li><li>You want subagent delegation without building the infrastructure yourself</li><li>You need persistent memory across conversation threads</li><li>You’re building a coding agent or autonomous research system</li></ul><p>Stick with LangChain’s create_agent or raw LangGraph when:</p><ul><li>Your agent is simple: one or two tool calls, short responses</li><li>You need very fine-grained control over graph topology</li><li>You’re already deep into a custom LangGraph workflow and don’t want the opinionated defaults</li></ul><p>The library is honest about this in its own docs: for simpler agents, use simpler tools.</p><h3>Why This Matters More Than Another Framework Release</h3><p>There’s something worth noting about the timing here.</p><p>Agentic AI is at an inflection point. The basic patterns — tool calling, ReAct loops, simple RAG — are well understood. What the industry is working out now is how to make agents reliable on long-horizon tasks: tasks that require planning, large context, persistence, and delegation.</p><p>Every team building production agents has had to engineer solutions to these exact problems from scratch. Context management strategies, subagent patterns, memory architectures — these keep getting reinvented in slightly different forms across organizations.</p><p>deepagents is LangChain&#39;s bet that these solutions are common enough to be standardized. The agent harness concept — opinionated defaults, built-in infrastructure, pluggable backends — is an attempt to shift the conversation from &quot;how do we build the plumbing?&quot; to &quot;what do we actually want the agent to do?&quot;</p><p>Whether it succeeds depends on whether the defaults hold up in production. But as a design direction, it’s the right call.</p><h3>Getting Started</h3><pre>pip install deepagents tavily-python</pre><p>Set your API keys:</p><pre>export ANTHROPIC_API_KEY=&quot;your-key&quot;<br>export TAVILY_API_KEY=&quot;your-key&quot;<br>export LANGSMITH_TRACING=true  # optional, for debugging<br>export LANGSMITH_API_KEY=&quot;your-key&quot;</pre><p>The full documentation — including backends, subagents, sandboxes, human-in-the-loop, and the CLI — is at <a href="https://docs.langchain.com/oss/python/deepagents/overview">docs.langchain.com/oss/python/deepagents</a>.</p><p>If you’re building anything serious with agents right now, it’s worth an afternoon to understand where deepagents fits in your stack — even if you don&#39;t use it immediately.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c6305757c342" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cross-Validation]]></title>
            <link>https://medium.com/@rudhrakumarthota/cross-validation-27ccbab39ae6?source=rss-64919863f018------2</link>
            <guid isPermaLink="false">https://medium.com/p/27ccbab39ae6</guid>
            <category><![CDATA[crossvalidation]]></category>
            <dc:creator><![CDATA[Rudhra Kumar Thota]]></dc:creator>
            <pubDate>Sat, 28 Mar 2026 15:34:06 GMT</pubDate>
            <atom:updated>2026-03-28T15:34:06.432Z</atom:updated>
            <content:encoded><![CDATA[<p>A better way to test your models.</p><h3>Introduction</h3><p>Machine learning is an iterative process.</p><p>You will face choices about what predictive variables to use, what types of models to use, what arguments to supply to those models, etc. So far, you have made these choices in a data-driven way by measuring model quality with a validation (or holdout) set.</p><p>But there are some drawbacks to this approach. To see this, imagine you have a dataset with 5000 rows. You will typically keep about 20% of the data as a validation dataset, or 1000 rows. But this leaves some random chance in determining model scores. That is, a model might do well on one set of 1000 rows, even if it would be inaccurate on a different 1000 rows.</p><p>At an extreme, you could imagine having only 1 row of data in the validation set. If you compare alternative models, which one makes the best predictions on a single data point will be mostly a matter of luck!</p><p>In general, the larger the validation set, the less randomness (aka “noise”) there is in our measure of model quality, and the more reliable it will be. Unfortunately, we can only get a large validation set by removing rows from our training data, and smaller training datasets mean worse models!</p><h3>What is cross-validation?</h3><p>In <strong>cross-validation</strong>, we run our modeling process on different subsets of the data to get multiple measures of model quality.</p><p>For example, we could begin by dividing the data into 5 pieces, each 20% of the full dataset. In this case, we say that we have broken the data into 5 “<strong>folds</strong>”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/686/1*jLuD2zxJSUCEXZERjedSUA.png" /></figure><p>Then, we run one experiment for each fold:</p><ul><li>In <strong>Experiment 1</strong>, we use the first fold as a validation (or holdout) set and everything else as training data. This gives us a measure of model quality based on a 20% holdout set.</li><li>In <strong>Experiment 2</strong>, we hold out data from the second fold (and use everything except the second fold for training the model). The holdout set is then used to get a second estimate of model quality.</li><li>We repeat this process, using every fold once as the holdout set. Putting this together, 100% of the data is used as holdout at some point, and we end up with a measure of model quality that is based on all of the rows in the dataset (even if we don’t use all rows simultaneously).</li></ul><h3>When should you use cross-validation?</h3><p>Cross-validation gives a more accurate measure of model quality, which is especially important if you are making a lot of modeling decisions. However, it can take longer to run, because it estimates multiple models (one for each fold).</p><p>So, given these tradeoffs, when should you use each approach?</p><ul><li><em>For small datasets</em>, where extra computational burden isn’t a big deal, you should run cross-validation.</li><li><em>For larger datasets</em>, a single validation set is sufficient. Your code will run faster, and you may have enough data that there’s little need to re-use some of it for holdout.</li></ul><p>There’s no simple threshold for what constitutes a large vs. small dataset. But if your model takes a couple minutes or less to run, it’s probably worth switching to cross-validation.</p><p>Alternatively, you can run cross-validation and see if the scores for each experiment seem close. If each experiment yields the same results, a single validation set is probably sufficient.</p><h3>Example</h3><p>We’ll work with the same data as in the previous tutorial. We load the input data in X and the output data in y.</p><p>Then, we define a pipeline that uses an imputer to fill in missing values and a random forest model to make predictions.</p><p>While it’s <em>possible</em> to do cross-validation without pipelines, it is quite difficult! Using a pipeline will make the code remarkably straightforward.</p><pre>from sklearn.ensemble import RandomForestRegressor<br>from sklearn.pipeline import Pipeline<br>from sklearn.impute import SimpleImputer<br><br>my_pipeline = Pipeline(steps=[(&#39;preprocessor&#39;, SimpleImputer()),<br>                              (&#39;model&#39;, RandomForestRegressor(n_estimators=50,<br>                                                              random_state=0))<br>                             ])</pre><p>We obtain the cross-validation scores with the <a href="https://scikit-learn.org/stable/modules/generated/sklearn.model_selection.cross_val_score.html">cross_val_score()</a> function from scikit-learn. We set the number of folds with the cv parameter.</p><pre>from sklearn.model_selection import cross_val_score<br><br># Multiply by -1 since sklearn calculates *negative* MAE<br>scores = -1 * cross_val_score(my_pipeline, X, y,<br>                              cv=5,<br>                              scoring=&#39;neg_mean_absolute_error&#39;)<br><br>print(&quot;MAE scores:\n&quot;, scores)</pre><pre>MAE scores:<br> [301628.7893587  303164.4782723  287298.331666   236061.84754543<br> 260383.45111427]</pre><p>The scoring parameter chooses a measure of model quality to report: in this case, we chose negative mean absolute error (MAE). The docs for scikit-learn show a <a href="http://scikit-learn.org/stable/modules/model_evaluation.html">list of options</a>.</p><p>It is a little surprising that we specify <em>negative</em> MAE. Scikit-learn has a convention where all metrics are defined so a high number is better. Using negatives here allows them to be consistent with that convention, though negative MAE is almost unheard of elsewhere.</p><p>We typically want a single measure of model quality to compare alternative models. So we take the average across experiments.</p><pre>print(&quot;Average MAE score (across experiments):&quot;)<br>print(scores.mean())</pre><pre>Average MAE score (across experiments):<br>277707.3795913405</pre><h3>Conclusion</h3><p>Using cross-validation yields a much better measure of model quality, with the added benefit of cleaning up our code: note that we no longer need to keep track of separate training and validation sets. So, especially for small datasets, it’s a good improvement!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=27ccbab39ae6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[LLMs for Time Series Forecasting]]></title>
            <link>https://medium.com/@rudhrakumarthota/llms-for-time-series-forecasting-b14b5784a4c3?source=rss-64919863f018------2</link>
            <guid isPermaLink="false">https://medium.com/p/b14b5784a4c3</guid>
            <category><![CDATA[forecasting]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[time-series-forecasting]]></category>
            <dc:creator><![CDATA[Rudhra Kumar Thota]]></dc:creator>
            <pubDate>Sat, 28 Feb 2026 12:40:16 GMT</pubDate>
            <atom:updated>2026-02-28T12:40:16.718Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2s4099pFT90wk8-9H98C3A.png" /></figure><p>Foundation models have revolutionized NLP by handling tasks like translation, summarization, and reasoning with a single architecture and no task-specific retraining. Now, this paradigm is reaching time series forecasting, where models like TimeGPT, developed by Nixtla, are pushing beyond traditional statistical methods with architectures tailored for temporal data.</p><p>Unlike classic forecasting models which rely on domain-specific assumptions or handcrafted features, TimeGPT leverages the Transformer architecture to learn general temporal dynamics directly from large-scale time series corpora. Its strength lies in <strong>zero-shot or few-shot performance</strong>: it requires little to no historical context to generate accurate forecasts, even in unseen domains.</p><p>This article dives into TimeGPT, its design philosophy, forecasting abilities, and practical use in real-world scenarios like sales prediction. It explores its ease of use, performance, and how it compares to both classical and LLM-based approaches such as TimeLLM.</p><h3>Objective</h3><p>After reading this article, you will understand:</p><ol><li>What makes TimeGPT different from other forecasting models?</li><li>How to use TimeGPT in a zero-shot or few-shot setting for daily time series data?</li><li>How it performs on the M5 dataset compared to traditional and deep learning models?</li></ol><p>This article is the second in a series on advanced time series modeling. If you haven’t already, check out the first part on TimeLLM, <a href="https://archive.ph/o/cXyzo/https://aipractitioner.substack.com/p/beyond-text-leveraging-llms-for-time"><strong><em>Beyond Text: Leveraging LLMs for Time Series Forecasting (Part 1/2)</em></strong></a><strong>.</strong></p><p><strong>Prerequisites:</strong> No prior experience with LLMs or time series forecasting is required. Some familiarity with Python and pandas will help you follow the code examples.</p><p><strong>Tools &amp; libraries:</strong> The code used relies on nixtla ecosystem for accessing TimeGPT, pandas for data handling, and plotly for visualization. The dataset used is the M5 competition dataset featuring Walmart daily sales.</p><h3>TimeGPT Explained: Foundation Models for Zero-Shot Time Series Forecasting</h3><h3>What makes TimeGPT different?</h3><p>TimeGPT is the first foundation model built specifically for time series forecasting. It delivers zero-shot predictions, meaning it can accurately forecast entirely new, unseen time series without any retraining or task-specific tuning. This contrasts sharply with traditional models, which typically require manual optimization and feature engineering for each new dataset.</p><p><strong>Key differentiators</strong>:</p><ul><li><strong>Zero-shot forecasting</strong>: TimeGPT can forecast without retraining or fine-tuning.</li><li><strong>Cross-domain generalization</strong>: It performs well across diverse areas such as finance, energy, healthcare, and IoT.</li><li><strong>Operational simplicity</strong>: Once the data is properly formatted, forecasting is reduced to a single call. No model selection, hyperparameter search, or manual tuning required.</li></ul><h3>How is TimeGPT built and trained?</h3><p>TimeGPT is not based on any existing large language model (LLM). But, it follows the same core training principle, which involves scaling up transformer architectures on large datasets, but it is specifically designed and trained for numerical time series data.</p><p><strong>Model architecture</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Cugr-EPyx9-n_Z9aYMKVbw.png" /></figure><p>TimeGPT is based on a Transformer encoder-decoder architecture adapted for time series forecasting. It is designed to handle time series of different frequencies, lengths, and structures, including varying seasonality, sparsity, and noise. It processes historical values and exogenous covariates, using positional encoding to retain temporal order. The model relies on multi-head attention, residual connections, and layer normalization to capture both short- and long-term dependencies. CNN layers are also included to extract local temporal patterns. A final linear layer projects the output to the forecast horizon, producing predictions along with uncertainty intervals.</p><p>However, the original article lacks key details about the model’s design, such as the number of layers, attention heads, and input window size. It also doesn’t specify how exogenous variables are integrated or whether the model uses causal masking and sequence-to-sequence or autoregressive decoding.</p><p><strong>Training Dataset</strong></p><p>TimeGPT was trained on over 100 billion data points from the largest publicly available time series dataset to date , spanning domains like finance, healthcare, IoT, transport, weather, web traffic, and energy. The dataset includes mixed frequencies (hourly to monthly), varying noise levels, outliers, trends, and seasonality, and heterogeneous patterns across domains</p><p>Preprocessing was minimal, focusing on formatting and handling missing values while preserving raw signal variability to enhance robustness.</p><p>TimeGPT was trained in PyTorch over a few days on NVIDIA A10G GPUs using the Adam optimizer with learning rate decay and large batch sizes. In contrast, models like GPT-3 are trained for weeks on thousands of GPUs with more complex setups. While both use Transformers, TimeGPT remains lightweight and specialized for time series compared large, language-focused LLMs.</p><h3>How well does TimeGPT perform in practice?</h3><p>TimeGPT was evaluated in a true zero-shot setting — no fine-tuning, just direct inference on over 300,000 unseen time series.</p><p>Performance was measured using two normalized metrics: <strong>Relative Mean Absolute Error (rMAE)</strong> and <strong>Relative Root Mean Squared Error (rRMSE)</strong>. These scores are <em>relative</em> in the sense that they are normalized against the error of a seasonal naive baseline, which assumes each future value repeats the last observed value from the same season (e.g., predicting next January based on the previous January). A score of 1.0 indicates parity with this naive benchmark, while values below 1.0 reflect superior performance. This normalization enables consistent comparisons across datasets with different scales, units, and temporal patterns.</p><h3>Key Takeaways</h3><p><strong>TimeGPT brings foundation model capabilities to time series forecasting: </strong>It enables accurate zero-shot and few-shot predictions across domains without the need for retraining or manual tuning, marking a shift from traditional, task-specific forecasting pipelines.</p><p><strong>Architecture and feature integration drive consistent gains: </strong>TimeGPT’s performance improves systematically with richer temporal structures (e.g., calendar features) and external signals, while maintaining simplicity of use through a single API call.</p><p><strong>Built-in explainability enhances trust and usability: </strong>With native SHAP integration, TimeGPT not only predicts but also explains. This enables the interpretation of the influence of features on each forecast at both global and individual levels.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b14b5784a4c3" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>