<?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 Mansi Rana on Medium]]></title>
        <description><![CDATA[Stories by Mansi Rana on Medium]]></description>
        <link>https://medium.com/@mansiranaels?source=rss-947d4f80a902------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*B0G5kLIB_hqc9VsImYU4Ow.jpeg</url>
            <title>Stories by Mansi Rana on Medium</title>
            <link>https://medium.com/@mansiranaels?source=rss-947d4f80a902------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 10:35:49 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mansiranaels/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[Inverting the semantic layer]]></title>
            <link>https://medium.com/@mansiranaels/inverting-the-semantic-layer-4c50c43fc696?source=rss-947d4f80a902------2</link>
            <guid isPermaLink="false">https://medium.com/p/4c50c43fc696</guid>
            <category><![CDATA[ontology]]></category>
            <category><![CDATA[knowledge-graph]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[retrieval-augmented-gen]]></category>
            <category><![CDATA[ai-agent]]></category>
            <dc:creator><![CDATA[Mansi Rana]]></dc:creator>
            <pubDate>Fri, 14 Aug 2026 21:50:04 GMT</pubDate>
            <atom:updated>2026-08-17T17:48:17.660Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mHASA0MsVSGBGZnk_-NeVA.avif" /></figure><h3>In short</h3><p>Every stack already has a semantic layer: the schema, the embeddings, the prompt templates. It describes the shape of your data, and leaves business meaning to be guessed at from that shape, one query at a time. Reversing that direction adds no new components. It changes which questions are answerable at all.</p><h3>The short version</h3><ul><li>Grounding gives a system something to run into, so its failures become loud instead of silent, the trade worth making for anything that gets reviewed.</li><li>Context is a structure problem. The meaning of a field lives in its position, so a bigger prompt cannot supply it.</li><li>A schema stores facts and a knowledge graph arranges them. Only a written-down domain model states what they mean.</li><li>Inverting the layer makes answers verifiable by path, collapses the search space to identified entities, and gives every agent one shared definition.</li><li>Retrieval stays the right tool for questions whose answers live in documents; structure answers the ones that live across records.</li></ul><h3>01) It was never the query language</h3><p>An analyst asks two agents the same question: which employers do our customers work for, and in which cities?</p><h3>SYSTEM A</h3><p>“They work for Halvorsen Marine and Pyle &amp; Dunn, based in Slough and Reading.”</p><h3>SYSTEM B</h3><p>ERROR · property city not found on Employer. city is recorded on Customer. Retrying against the right entity.</p><p>Neither system can answer the question, because nothing in the estate records which city an employer sits in. System A answered anyway. It reads perfectly, carries no warning, and flags nothing for review. Had the cities been attached to the wrong entity entirely, the sentence would have looked identical.</p><p>System B didn’t know more than System A. But it knew what was missing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bd0T9DBEM2tU4yKu.png" /></figure><p>This is a useful place to refresh our memories on part <a href="https://zaimler.ai/blog/structural-questions">one</a> of this blog series. The short version: some questions have answers that exist across records rather than in any one of them. Acme is owned by Kestrel, Kestrel by Alder, Alder by Acme, every filing correct, and the <a href="https://www.fatf-gafi.org/en/topics/beneficial-ownership.html">beneficial ownership</a> requirement still cannot be satisfied because the chain never reaches a person. Similarity search cannot rank the record that matters, because what makes it matter is not written in its text. Handing the model the whole subgraph doesn’t save it either, because a cycle is a computation to perform rather than a thing to notice in prose.</p><p>The fair objection was that none of this is hard. A <a href="https://www.postgresql.org/docs/current/queries-with.html">recursive query</a> finds the loop in milliseconds and any competent engineer is able to write it. True, but that’s beside the point, because a query is an answer to a question you already knew how to ask. The analyst holding the alert knows what to look for and cannot express it in SQL. The engineer who can write the SQL doesn’t know that a loop is what no beneficial owner reduces to.</p><p>Which leaves two things to work out: (1) what it would take for an answer to be trustworthy rather than merely fluent, and (2) where the knowledge that connects those two people is supposed to live. There’s also one popular shortcut to rule out on the way.</p><h3>02) Confidence isn’t evidence</h3><p>For a decision that gets audited, a score is not enough. The analyst needs the path.</p><p>Text2SQL gives you a query and a result, both readable, both downstream of the choice that mattered. Semantic search gives you a ranked list, scored by embeddings that report numbers rather than reasons. Absent ground truth, the standard way to evaluate that list is to ask a language model whether the question, the context, and the answer look like they belong together.</p><p>A language model, guessing whether a language model retrieved the right thing. That is a vibe check with extra steps.</p><p>For “what’s the balance?”, a vibe check is fine. For a determination that goes into a regulatory filing and gets defended to an examiner two years later, the analyst needs to see which entities and which relationships produced the answer, and a bare score shows none of it.</p><p>This is also why grounding matters more than it first appears. It is what let System B stop. A system that knows what exists, and what connects to what, has something to run into; without it, there is nothing to catch.</p><p>Grounding makes a system’s failures loud instead of silent; it does not make the system correct. For anything that gets reviewed, that is the trade worth making.</p><h3>03) Structure is not quantity</h3><p>A structure problem doesn’t yield to a bigger prompt.</p><p>The natural move when a model lacks context is to give it more. More schema, more examples, more documentation, a bigger window. That treats context as a volume problem. It isn’t, and the smallest possible example makes the point.</p><p>Take a field called address. In customer_profiles it holds a residence: <a href="https://en.wikipedia.org/wiki/Personal_data">personally identifiable information (PII), tightly regulated, down to what it can be joined against</a> and who can see it. In branch_locations the identical field, same type, same string format, holds a public street address that the bank prints on its own website.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*FnpqxXjvHu2xktNy.png" /></figure><p>A static rule says address = PII and flags every column of that name across the estate, most of them wrongly, until analysts are requesting exemptions faster than governance can grant them. A bigger prompt doesn’t resolve it either, because the information that distinguishes the two cases was never in the field. What resolves it is the values, the neighboring columns, and the table’s own meaning, taken together.</p><p>The classification is a property of the field’s position in a structure. The field alone does not carry it.</p><p>Structural questions are the same phenomenon at scale. The missing thing was relationships all along.</p><h3>04) What actually answers them</h3><p>The analyst’s concepts have to exist somewhere the machine can use them.</p><p>The analyst can’t write the query, and the schema can’t tell a model what the query means. Those are the same missing thing, which is a written-down model of the domain: entity types and the relations between them, with data mapped into it, so that questions get asked and answered in Customer, Account, owns and isManagedBy rather than in tables, fields and keys.</p><p>It’s worth being precise about what that is, because three things routinely get called by each other’s names: the schema, the <a href="https://en.wikipedia.org/wiki/Knowledge_graph">knowledge graph</a>, and the <a href="https://en.wikipedia.org/wiki/Ontology_(information_science)">ontology</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*4fN2UAeNp7WdM8Wj.png" /></figure><p>Which is why the middle layer is the trap. Arranging the same fact as nodes and edges makes the cycle physically present in the data, and that feels like progress, but nothing in the arrangement states that owns runs in a direction, composes along a path, or terminates only at a person.</p><p>Now note what this reverses. A <a href="https://en.wikipedia.org/wiki/Semantic_layer">semantic layer</a> already exists in every stack. It is the schema, the embeddings, the prompt templates. It describes the shape of the data and hopes business meaning can be inferred from that shape per query, by a model that was never told what the business means. The alternative points the arrow the other way: describe the business’s shape, with a human validating, and map the data into that. Same components, opposite direction.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*kcQ7PsUjw5P-N9RP.png" /></figure><p>Three things follow from the inverse layer:</p><h3>CONSEQUENCE 1 · VERIFIABILITY</h3><p><strong>The path is readable, so a disposition can be defended.</strong> When an agent traverses (Customer)-[:isAnalyzedBy]-(RiskAnalyst), the entities and relations behind the answer are visible and the path can be read directly. That is the difference between an answer you would have to audit to check and one that arrives with its own audit trail.</p><h3>CONSEQUENCE 2 · A COLLAPSED SEARCH SPACE</h3><p><strong>The search covers identified entities, not a ranked corpus.</strong> Once a question resolves to specific entity types and relations, the system searches the entities that are actually relevant rather than an entire embedded corpus ranked by <a href="https://en.wikipedia.org/wiki/Cosine_similarity">cosine similarity</a> and truncated at k. The window stops being the thing that decides whether the answer is correct.</p><h3>CONSEQUENCE 3 · REUSE</h3><p><strong>Knowledge and logic decouple, so the definition stops being private.</strong> Many agents share one domain model instead of each keeping its own drifting theory of what a customer is. This one sounds like housekeeping until two agents answer the same question differently in front of the same user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*7_r2bBnFNLlXeDo6.png" /></figure><h3>05) Where this breaks</h3><p>Structure isn’t free, isn’t always right, and doesn’t eliminate failure.</p><h3>CAVEAT 1</h3><p><strong>Not every question is structural.</strong> The most important caveat, and the easiest one to lose sight of once the graph starts working. When an answer genuinely lives in a document, as in exploratory research or open-ended questions over prose, semantic search is the correct engineering choice.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*84yxwmapPagUkM92.png" /></figure><h3>CAVEAT 2</h3><p><strong>Ontology design is hard.</strong> It has defeated a couple of decades of enterprise data initiatives. Getting entity types and relations right takes real domain expertise, and the failure mode is nasty: a wrong ontology can be worse than none, because it is confidently wrong in a structured way. Automated inference alone doesn’t get there. A human domain expert stays in the loop.</p><h3>CAVEAT 3</h3><p><strong>Agentic systems are slow.</strong> A multi-agent loop that interprets the question, selects concepts, builds the query, executes it, and summarizes the result costs real seconds. That’s a property of agentic architectures generally rather than of graphs; the underlying graph query returns near-instantly. It’s a live problem for everyone working in this space, us included, and one we’ll write about separately.</p><h3>06) Why this matters more in an enterprise</h3><p>Undocumented business knowledge doesn’t compound. It gets rebuilt, per query, forever.</p><p>Knowing that a chain of ownership pointers is what the regulation means by tracing, and that a loop in it means the trace can never terminate, is ordinary domain expertise. Someone on the floor has held it for years. What’s costly is where it sits, which is nowhere the company owns. It lives with the people who hold it, and gets re-derived from scratch on every query, by every agent.</p><p>That is specific to enterprises. A consumer product has no decades-old agreement about what a claim is or which entity types matter. An enterprise is largely made of that agreement, spread across fragmented systems, and it is the actual asset. While it stays unwritten, it cannot compound, which rarely shows up as an incident and steadily shows up as cost.</p><p>Which reframes the expensive mistake. Reaching for embeddings is fine; embeddings are good, and for half the questions in the building they are the right tool. The expensive mistake is spending two quarters building a retrieval pipeline for questions that were never retrieval questions, and finding out at the end.</p><p>An ontology is where that expertise accumulates instead of dispersing, in the vocabulary the business already uses, refined by the people who know the domain as it changes. It gives everyone else a way to ask for their judgment rather than replacing it.</p><p>The bet we’re making at zaimler is that this can be inferred rather than hand-modeled, with a human validating rather than authoring. The prize is an ontology that builds itself and keeps itself current, in the vocabulary the business already speaks. That is the hard, interesting part, and it is what we’re building.</p><p>Go back to the two answers at the top. The one that read perfectly was a well-built pipeline doing exactly what it was designed to do, over a stack that had no way to know the question was unanswerable; no model failed. The other one had simply been told what the business means. That is the whole of it, across both posts: the expertise is already in the building, and what it has never had is somewhere to live that the next person, or the next agent, can read.</p><p><em>Originally published at </em><a href="https://zaimler.ai/blog/inverting-the-semantic-layer"><em>https://zaimler.ai</em></a><em> on August 14, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4c50c43fc696" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Your best questions aren’t retrieval questions]]></title>
            <link>https://medium.com/@mansiranaels/your-best-questions-arent-retrieval-questions-e1349b729cd4?source=rss-947d4f80a902------2</link>
            <guid isPermaLink="false">https://medium.com/p/e1349b729cd4</guid>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[ontology]]></category>
            <category><![CDATA[retrieval-augmented-gen]]></category>
            <category><![CDATA[knowledge-graph]]></category>
            <dc:creator><![CDATA[Mansi Rana]]></dc:creator>
            <pubDate>Fri, 07 Aug 2026 18:38:14 GMT</pubDate>
            <atom:updated>2026-08-12T17:56:42.420Z</atom:updated>
            <content:encoded><![CDATA[<h3>In short</h3><p>Retrieval assumes answers are stored somewhere and just need finding. That holds for a lot of questions and fails for an important class of them: the ones whose answer exists <em>across</em> records rather than <em>in</em> any one of them. No embedding model reaches those. Neither does a bigger context window.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lwfuNz3xv19bqnrebIoY9Q.jpeg" /></figure><h3>The short version</h3><ul><li>Retrieval assumes the answer is written down somewhere. A second class of question, structural questions, has answers that are properties of the relationships between records, and no record contains them.</li><li>The beneficial ownership loop is the clean case: three correct filings, a chain that closes on itself, and a finding that lives in no single row.</li><li>Similarity search cannot rank the record that matters, because what makes it matter is not written in its text. Whether it arrives depends on the corpus, and nothing announces its absence.</li><li>Handing the model the whole subgraph does not save it: cycles, aggregated percentages, and threshold breaches are computations to perform and verify rather than things to notice in prose.</li><li>What closes the gap is an ontology: what the entities are, what the relations mean, and what rules hold over them, written down once where both the analyst’s knowledge and the engine’s query can come from it.</li></ul><h3>01) A question with no answer in the file</h3><p>There is a class of question that enterprises most want answered and that the current generation of agents cannot reach. This is the first post in a series about such questions. The examples that follow come from banking, where the rules are written down, the stakes are legible, and the failure modes already have names, but very little of what follows is specific to banks. The same pattern appears wherever an answer depends on how records relate rather than on what any one of them says: a manufacturer tracing a component back through four tiers of suppliers, an insurer checking whether the same adjuster sits on both sides of a claim, a hospital reconciling one patient across systems that never agreed on an identifier. Swap the vocabulary, and the argument still holds.</p><p>Every bank has to name the human beings behind a corporate customer. That is the <a href="https://www.fatf-gafi.org/en/topics/beneficial-ownership.html">beneficial ownership requirement</a>: follow ownership up through whatever holding structures exist until the chain ends in natural persons, then screen those names against sanctions and <a href="https://www.fatf-gafi.org/en/publications/Fatfrecommendations/Guidance-pep-rec12-22.html">politically exposed person (PEP)</a> lists. It runs thousands of times a day and it is almost always mechanical.</p><p>Then an analyst files a note that reads: <em>we can never get to a real person on this one.</em></p><p>Nothing in the data looks wrong. Three columns do the work, customer_id, parent_entity_id and ownership_pct, and the filings are present and correct.</p><p>FILING 1 ACM-4471 Acme Corp is 100% owned by KES-2210 Kestrel Holdings FILING 2 KES-2210 Kestrel Holdings is 100% owned by ALD-8853 Alder Group FILING 3 ALD-8853 Alder Group is 100% owned by ACM-4471 Acme Corp</p><p>Read them one at a time and there is nothing special to see. Companies own companies all the time. Every record is clean and every field populated.</p><p>And the requirement still cannot be satisfied, because the chain has no bottom. Follow the ownership and you arrive back where you started, without ever reaching a person.</p><p>No single filing carries that fact. It belongs to the three of them together, and it is written down nowhere.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*6WumiLzwVw-qDsUH.png" /></figure><p>‘Something’ or ‘someone’ has to know that a chain of parent_entity_id pointers <em>is</em> an ownership structure, that walking it is what the regulation means by tracing, and that a chain closing back on itself means the ownership never reaches a person, rather than meaning the data is broken.</p><p>None of that knowledge is in the schema. None of it is in the embeddings. It lives in the analyst’s head, and it gets re-derived, imperfectly, on every single query.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*adDy8JVYj4Tr0sgN.png" /></figure><h3>02) The model underneath</h3><p>Retrieval is incomplete rather than wrong: it describes half the problem, and the field has been treating it as the whole one.</p><p>Beneficial ownership is exactly the kind of work agents are now pointed at. Sit an agent on the bank’s data, let an analyst ask in plain language, get an answer back without a ticket and a three-day wait.</p><p>The standard advice for making that agent answer better tends to be the same. Better embeddings. Better chunking. Better reranking. Hybrid search. A bigger context window. Every item on it improves <em>fetching</em>. The assumption underneath, mostly unexamined, is that answering a question means going and getting the thing that contains the answer.</p><p>That assumption is good. It is just partial. It holds perfectly for questions whose answers were written down somewhere, and those questions are common enough that the edge of it rarely comes up. <em>What’s this customer’s balance? What does our refund policy say?</em> The answer is sitting in a place. Retrieval is the right tool there.</p><p>The ownership question is the edge. Fetch all three records perfectly, with a perfect ranker, and the answer still isn’t among them, because none of them contains it. The retrieval ran correctly, against a question that was never a retrieval question.</p><p>That is the missing half. Alongside the questions with an answer somewhere sits a second class, whose answers are properties of the <em>relationships between</em> things rather than properties of any thing. Let’s call them <strong>structural questions</strong>.</p><h3>03) Recognizing them in the wild</h3><p>Once the missing half is visible, structural questions turn out to be most of the ones worth asking.</p><h3>Structuring detection</h3><p>Nine cash deposits between $6,400 and $9,100, spread over thirty-one days across four branches, totaling $71,800. The reporting threshold is $10,000 and not one deposit reaches it. The account’s largest single deposit in the preceding twelve months was $2,300. Every deposit is legal, unremarkable, and correctly recorded.</p><p><strong>SIGNAL</strong> a property of the set, and of its distance from that account&#39;s own baseline</p><h3>Cross-border flow mapping</h3><p>2.1m euro leaves a Frankfurt account held by Meridian GmbH, lands in Nicosia, moves to Dubai eleven days later, and returns to a second Frankfurt account held by Meridian Logistik GmbH. Different legal entity, same beneficial owner. Each hop is a legitimate transfer between legitimate accounts and each clears review on its own. Nothing in hop three records that hop one ever happened.</p><p><strong>SIGNAL</strong> the route, and the fact that it closes on the party it started from</p><h3>Four-eyes violations</h3><p>Every alert is supposed to be raised by one analyst and cleared by a different one. Over eighteen months, how many times did the same person appear on both ends, whether directly or through a colleague they also supervise? No memo records a violation, because no single memo contains both ends of the pair.</p><p><strong>SIGNAL</strong> a count of paths through people and documents, computed, not stored</p><h3>Shared-attribute clustering</h3><p>Nine companies file as independent entities. Three list the same address in Slough, four name the same director, two give the same Berlin phone number. Plenty of companies legitimately share a registered office, so no single filing is irregular. The signal only exists once the nine are placed side by side.</p><p><strong>SIGNAL</strong> the collision, invisible until the records are co-located</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*FuJBqippGupidiSm.png" /></figure><p>There is a practical filter in here. Lookup questions already have good answers; a database has handled them well for decades, and wrapping natural language around them is a real convenience but rarely the reason anyone funds an agent. The questions above are the ones with <em>no</em> explicitly written answer, and they are where an agent earns its place.</p><p>It makes a useful check against our roadmaps: how many of the target questions are structural, and does the current stack have a way to reach them?</p><h3>04) Where each way of fetching breaks</h3><p>Walk the two standard retrieval methods against the ownership question. Each fails in a specific, nameable place, and neither failure is fixed by turning a dial harder.</p><h3>FAILURE 1 · SIMILARITY SEARCH</h3><h3>The ranking is flat, and nothing in it tells you whether the chain is complete.</h3><p>Embed <em>who ultimately owns Acme Corp</em> and pull the k nearest records. Acme’s own filing comes back first, because it contains the string. After that the ranking goes flat.</p><p>Every record in the corpus is a corporate filing, and they are all written the same way: an entity, a status, a parent. To an embedder they are near-identical. Kestrel Holdings, the record the chain runs through, scores 0.67. Brightwater Holdings, which has nothing to do with this customer, scores 0.70. Kestrel Marine Ltd, which shares half a name and no relationship at all, scores 0.71.</p><p>That spread is noise. The property that makes Kestrel’s filing the one you cannot do without, that it is the middle link between Acme and Alder, is not written in its text, so no score can reflect it. What the scores reflect is that all of these documents look like corporate filings.</p><p>So the retrieval is a maybe. At k=10 today Kestrel lands just inside the window and the agent finds the loop. Onboard forty thousand entities next quarter and Kestrel is at rank 31, the retrieval window closes above it, and the agent reports that Acme is owned by Alder Group. <strong>Same pipeline, same prompt, same confident tone, opposite answer, and nothing in either output distinguishes the two runs.</strong></p><p>Reranking does not help, because a reranker scores the same text against the same query. Raising k does not help either; it widens the window and adds more filings that look exactly alike, which lowers the odds that a reader spots the one that mattered. There is no threshold or confidence band, and no error to catch, because as far as the retriever is concerned, nothing went wrong.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*23fzx-vbA2Ah5b08.png" /></figure><p>Even with all three records in hand, similarity has no way to represent <em>these three close into a loop</em>, because the loop is a property of no single record. Similarity ranks records against a query. It cannot rank a relationship that isn’t written in any of them.</p><h3>FAILURE 2 · QUERY RETRIEVAL</h3><h3>The database can compute it, but only if someone already knew to ask.</h3><p>A <a href="https://www.postgresql.org/docs/current/queries-with.html">recursive CTE (common table expression)</a> with cycle detection finds the loop in milliseconds, and it comes with the thing similarity search cannot offer: a definite answer, and a path you can read back to check it.</p><p>To write it, though, you have to already suspect a cycle, already know that a cycle is what <em>no beneficial owner</em> reduces to, and already know which of the forty ownership-shaped columns is the one to walk.</p><p>A query is a question made precise. The analyst holding the question cannot express it that way, and the engine will not volunteer it. SQL doesn’t surface findings; it confirms hypotheses you already have.</p><p><em>The data supports the query</em> and <em>the question gets answered</em> are not the same statement.</p><p>So similarity retrieval cannot reliably assemble the relevant records, and cannot tell you when it failed. Query retrieval can do both, and cannot be written by the person who needs it. The tempting fix is to be generous: skip the retrieval problem entirely, hand the model the whole neighborhood, and let it work the answer out.</p><h3>05) Handing over the subgraph doesn’t save it</h3><p>Even given the exact right records, retrieve-then-generate is the wrong shape, because the finding now depends on the model noticing it, every time, with nothing to check.</p><p>Suppose you solve retrieval by brute force. Pull Acme’s entire ownership neighborhood, every entity and every edge, and drop the whole subgraph into the context window. The model now has three companies and three ownership links sitting in front of it. Ask again: who ultimately owns Acme?</p><p>This is <a href="https://arxiv.org/abs/2005.11401">RAG (retrieval-augmented generation)</a> in its most generous form, and it is still the wrong architecture. <strong>Having the loop in the context is not the same as knowing there is a loop.</strong> The model has to notice that Acme → Kestrel → Alder returns to Acme, understand that a returning chain means the ownership never grounds out in a person, and do that reliably, in prose, buried among whatever else got swept into the window.</p><p>On three clean nodes, it might. That <em>might</em> is the entire problem, and it is the same <em>might</em> as the last section, moved one stage downstream.</p><p>Because the real question isn’t three nodes. It is a customer with forty holding entities across six jurisdictions, where control has to be aggregated along every branch and compared against the 25% threshold. A path of 40% × 70% × 90% comes to 25.2% and has to be reported. A path of 40% × 60% × 90% comes to 21.6% and does not. Those two branches look identical in prose, and there are two hundred of them.</p><p><em>Read all of it and reason it out</em> degrades exactly where it matters, and it degrades invisibly. The model returns a confident paragraph either way, and nothing in the output tells you whether it multiplied the percentages down each branch or pattern-matched something plausible.</p><p>The data was all there. Retrieve-then-generate fails because the finding is a computation over structure, and generation was asked to <em>notice</em> it rather than <em>perform</em> it.</p><p>It’s worth separating two things here. A cycle. An aggregated ownership percentage. A shortest path between two parties. A set that breaches a threshold. These are things you compute, deterministically, and then verify by reading back the path that produced them. They are not things you hope a model spotted in a wall of retrieved text.</p><p>A better retriever puts more into the window. It does nothing about the fact that the answer has to be reasoned out of the structure, reliably and checkably.</p><h3>06) The architecture is wrong, not the components</h3><p>Both stages of the standard pattern miss, and the thing that would close the gap was never written down.</p><p>Put the two halves together and the standard pattern collapses. Retrieval ranks by similarity, so whether the record that matters arrives is a matter of luck, and nothing announces its absence. Generation is handed whatever did arrive and asked to find the structure by reading, which it does unreliably and unverifiably. Fetch, then generate: both stages miss, and both miss quietly.</p><p>That pattern has a name, and it is the default way agents get built today. RAG is superb when the answer is sitting in a document and the job is to find the document. It is the wrong architecture the moment the answer is a property of how things connect, because neither of its two moves is the move the question needs. <strong>Retrieval doesn’t traverse, and generation narrates rather than computes.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*mze4jIHJ6OJGTRo4.png" /></figure><p>The fair objection at this point is that all of this is solved. Graph databases traverse relationships natively, recursive SQL finds the loop, any competent engineer writes the query in an afternoon. All true, and all beside the point, because a query is an answer to a question you already knew how to ask, and the ownership loop only gets caught by someone who already suspected it was there.</p><p>So the problem splits in two. The analyst staring at the alert knows what to look for but cannot express it in SQL. The engineer who can write the SQL doesn’t know that a loop is what <em>no beneficial owner</em> reduces to. <strong>The person with the question and the person who can pose it to the machine are never the same person.</strong></p><p>Which points back at the first section. What the analyst knows, that these pointers are an ownership structure, that walking them is what tracing means, that a chain closing on itself is a finding rather than a data error, has never been written anywhere a machine can read. The schema certainly doesn’t systematically hold it. A schema is enough to store the column correctly and says nothing whatsoever about what the column means.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*QZ8pIBQRS4eJ1yNa.png" /></figure><p>Write those five statements down in a form a machine can evaluate and the question changes shape. <em>No beneficial owner</em> stops being a matter of phrasing and gains a definition: walk the ownership relation out from this entity, return the natural persons at the ends, and if the walk closes on itself without reaching one, that is the finding, and here is the path it took.</p><p>The analyst no longer needs to know what a cycle is. The engineer no longer needs to know what a beneficial owner is. Neither has to become the other, because both halves are written down once, in the same place.</p><p>That account of what the entities are, what the relations mean, and what rules hold over them is an <strong>ontology</strong>. The schema describes storage, and the knowledge graph is the data arranged in that shape. The ontology is the layer that makes the question answerable at all, and it is the one most stacks never needed until an agent turned up to ask.</p><p>None of this helps the analyst from the first section, not yet. The alert is still open and the chain still doesn’t reach a person. What would close it is somewhere for the domain knowledge to live, rather than a bigger model or a faster engine: ownership defined once, tracing defined once, and an agent that can walk those definitions and hand back the path it took. Part two of this series picks up on what it takes to build this layer.</p><p><em>Originally published at </em><a href="https://zaimler.ai/blog/structural-questions"><em>https://zaimler.ai</em></a><em> on August 7, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e1349b729cd4" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>