<?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 Cedric Jouan on Medium]]></title>
        <description><![CDATA[Stories by Cedric Jouan on Medium]]></description>
        <link>https://medium.com/@cedric.jouan?source=rss-e92f19355bef------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*8ro_E_H8WTeIgvB_jDZ1Cg.png</url>
            <title>Stories by Cedric Jouan on Medium</title>
            <link>https://medium.com/@cedric.jouan?source=rss-e92f19355bef------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 03:50:10 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@cedric.jouan/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[A semantic layer with watsonx.data intelligence]]></title>
            <link>https://medium.com/@cedric.jouan/a-semantic-layer-with-watsonx-data-intelligence-4cdf97e72207?source=rss-e92f19355bef------2</link>
            <guid isPermaLink="false">https://medium.com/p/4cdf97e72207</guid>
            <category><![CDATA[semantic-layer]]></category>
            <category><![CDATA[ibm-bob]]></category>
            <category><![CDATA[watsonx]]></category>
            <category><![CDATA[watsonxdata]]></category>
            <category><![CDATA[quant-research]]></category>
            <dc:creator><![CDATA[Cedric Jouan]]></dc:creator>
            <pubDate>Tue, 27 Oct 2026 17:46:02 GMT</pubDate>
            <atom:updated>2026-10-27T17:46:02.395Z</atom:updated>
            <content:encoded><![CDATA[<p><em>How watsonx.data intelligence, watsonx.data and IBM Bob let an AI agent find, understand and test a bank’s data</em></p><p>A quant researcher reads a paper over the weekend. The claim is simple: when the demand to short a stock rises, that stock tends to underperform afterwards. She wonders whether that could sharpen a plain momentum strategy on the S&amp;P 500. On Monday morning she has a question that sounds easy and is not: <em>what data do we have for this, where is it, am I allowed to use it, and how do I put it together without fooling myself?</em></p><p>In most firms, answering that takes days. Prices come from a vendor feed on object storage. The index history and the security master sit in a reference database. The securities lending book, the one dataset that actually measures shorting demand, lives in an internal operational system that the research desk rarely touches. Each has its own keys, its own units, its own conventions about dates, and its own access rules.</p><p>This post is about giving that question to an AI agent instead, and about the one thing that makes it possible: a <strong>semantic layer</strong>. We built it with <strong>IBM watsonx.data intelligence</strong> and <strong>IBM watsonx.data</strong>, and we put <strong>IBM Bob</strong>, IBM’s software engineering agent, to work on top of it. The use case is the momentum-and-shorting idea above. The point is the layer underneath.</p><h3>What a semantic layer is, and why an AI needs one</h3><p>Raw data does not explain itself. A column called AVG_UTIL in a table called SL_MONTHLY_POS is meaningless until someone tells you that it is the average share of lendable stock that was out on loan during the month, that it is a decimal before July 2019 and a percentage after, and that the row for month t only becomes available on the third business day of month t+1. A human on the desk knows this. A new hire does not. An AI agent certainly does not.</p><p>A semantic layer is where that knowledge lives, attached to the data itself rather than to people’s heads. In our build it is made of four things:</p><ul><li><strong>Business terms.</strong> A shared vocabulary: Security Lending Position, Borrow Fee, Publication Date, Customer Identifier. Columns are linked to terms, so the agent can search for a concept rather than guess a column name.</li><li><strong>Descriptions and tags</strong>. Plain-language explanations of what each table and column is, in what unit, keyed on what, with which lag, and what it may be used for. Tags such as month-end , point-in-time or restricted summarise the essentials.</li><li><strong>Relationships</strong>. Which tables share an identifier, and which summary table is derived from which feed. This is what lets the agent go from “I found the lending book” to “and here is the mapping table that links it to prices”.</li><li><strong>Governance</strong>. Rules that say who may see what, written once and enforced wherever the data is queried.</li></ul><p>Why bother? Because an agent that has to discover all of this by trial and error will either take forever or, worse, get it quietly wrong: a join that drops half the universe, a signal that uses next month’s data, a unit break in 2019 that looks like a real market event. Semantics turn an agent’s guesses into reads.</p><p>There is a second half to the idea. Meaning is not enough if the agent then has to speak three different SQL dialects to three different systems. So the semantic layer is paired with one query engine that presents every source as a catalog under a single SQL. The agent reads what the data means in one place, and reads the data itself in one place. The data never moves.</p><h3>The architecture, block by block</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4gH0MvD2iiHUKugQ129tbA.png" /></figure><p><strong>The data sources, at the bottom</strong>. Three systems, deliberately different, because that is what a bank looks like. Vendor market data lands on Cloud Object Storage as Parquet files, exactly as delivered. Reference data (security master, index membership, sector history, factor returns), fund holdings and the trading desk’s orders and fills live in PostgreSQL. The securities lending book and custody flows, the firm’s own operational data, live in Db2. Nothing is copied out of these systems for the sake of the project.</p><p><strong>One query engine, on the right</strong>: watsonx.data. A Presto engine with four catalogs attached: hive_cos for the raw files, lakehouse for Iceberg tables (a tidy copy of the prices, and an empty research schema that is the agent’s workspace), pg_ref for PostgreSQL and db2_lending for Db2. One SQL statement can join a vendor file to a PostgreSQL table to a Db2 table. The engine also enforces the governance rules at query time, so a denied table returns an error and a masked column comes back redacted, whoever is asking.</p><p><strong>The semantic layer, on the left</strong>: watsonx.data intelligence. Metadata is imported from the query engine, so every asset in the catalog carries its exact location ( db2_lending..sl_monthly_pos ) and can be queried without guesswork. On top of the metadata sit the business glossary, the descriptions and tags, the column profiles, the relationships and the data protection rules. The catalog is governed: publishing an asset there means the rules apply to it.</p><p><strong>The glossary comes largely pre-built</strong>. We started from IBM’s Knowledge Accelerator for Financial Services, an industry vocabulary of thousands of banking and capital-markets concepts, and took the concepts our data needed: instruments and identifiers (ISIN, SEDOL, ticker), positions, securities lending, fees, industry classifications, involved parties. We then added the firm’s own terms, the ones no accelerator can know: Monthly Average Utilisation, Feed Version, Recall Quantity, the research signals and backtest metrics the desk uses. The accelerator gave us a spine; the firm’s terms gave it a voice.</p><p><strong>The agent, at the top</strong>: IBM Bob. Bob is IBM’s software engineering agent, and that is exactly how we use it: as a careful engineer who happens to be given a research question. It works in a git repository with a short set of standing instructions and a skill that describes how research is done in this lab: find the data in the catalog, assemble it once with SQL, do the research in Python, write up what you found, ask before pushing.</p><p><strong>Between Bob and the platform</strong>: MCP, out of the box. Both products ship an MCP server, the open Model Context Protocol that lets an agent call tools. The watsonx.data intelligence server gives Bob catalog search, asset details, glossary definitions and the data protection rules. The watsonx.data server gives it the engine’s schemas, table descriptions and the ability to run queries. We did not have to write an integration; we pointed Bob at two servers and gave it an API key.</p><p><strong>And the human, above everything.</strong> The researcher states the hypothesis, decides which variant to test, judges the result and decides whether it is worth pushing. Bob does the legwork and reports plainly, including what could make a result spurious.</p><h3>Built mostly by AI, reviewed by people</h3><p>A semantic layer sounds like months of curation. Most of ours was generated.</p><p>When the metadata is imported, watsonx.data intelligence’s enrichment run profiles every column (null share, distinct values, ranges, formats), proposes a data class where it recognises one (an ISIN is an ISIN), and suggests business terms from the glossary based on names, values and context. The suggestions are good; they are not always right. Position Date and Publication Date look alike to a model and mean very different things to a backtest.</p><p>So the division of labour was: the platform drafts, people review. The team walked through the assignments table by table, corrected the few that mattered, and wrote the descriptions where the automated ones were too generic, in particular for the traps: the unit change in 2019, the exclusive end dates, the publication lag, the fact that one table is month-end and another is daily. That reviewed content is kept as plain CSV files in a repository, so it can be diffed, reviewed again, and re-applied to a fresh instance in a few minutes. The semantic layer is content, and content belongs in version control.</p><h3>The catalog has the shape of a graph</h3><p>The second thing that surprised us is how the agent uses the catalog once it is there.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GaoFdaLHGuNXRnoayvD5PQ.png" /></figure><p>A search for “shares on loan per stock per month” returns the month-end lending table. But the result is not a dead end. The table is linked to the terms on its columns (SEDOL, Utilisation, Borrower), the terms are linked to other tables that carry them, and the table itself is related to the security master through the key they share, and to the daily feed it is derived from. Bob reads one card and already knows where the mapping table is, which daily feed could replace the monthly one, and which neighbouring table is restricted.</p><p>If you have followed the “graph RAG” conversation, this will sound familiar: instead of retrieving documents one at a time, the agent walks a graph of related entities and reads the context around each hit. A governed catalog, with terms as shared nodes and relationships as edges, is such a graph. We did not have to build one; we had to make the catalog honest.</p><h3>The use case: momentum, and who is shorting</h3><p>The research question itself is a classic. Twelve-minus-one momentum (rank stocks on their return over the past year, skipping the most recent month, buy the winners, sell the losers) is one of the best-documented strategies in equities. Cohen, Diether and Malloy (2007) showed that shifts in the demand to borrow a stock predict its returns. Put together: can the lending book tell us which winners to drop?</p><p>The lending book is exactly the kind of data that is valuable because it is internal and awkward. It is keyed on SEDOL while prices are keyed on a vendor ticker. Its units changed when the feed was upgraded. Its month-end summary is published days after the month ends, which means a backtest that uses it naively looks into the future. Two of its tables name clients and borrowers and are off limits to research. None of this is in the data; all of it is in the semantic layer.</p><h3>Bob at work</h3><p>Here is the conversation, paraphrased, with what happens behind each turn.</p><p><strong>“I want to test this idea. What data do we have, am I allowed to use it, and what would you recommend?”</strong> Bob searches the catalog a few times with short phrases: prices per stock, index constituents by date, stock borrowing per stock. It reads the cards, then asks for the details of the candidates and checks the data protection rules. Its answer is a short table: the month-end prices, the point-in-time index membership, the security master, and the month-end lending table, each with its location. It sets aside the loan-level table and the client programme table because a rule denies them to research, and says so. It quotes three traps from the descriptions: the SEDOL-to-ticker mapping with validity dates, the 2019 unit change, the publication lag. It recommends the monthly grain and asks how we want to define “rising shorting demand” before building anything. Under a minute, eight tool calls.</p><p><strong>“Go with those four tables. Set up the use case and pull the monthly series together, point in time, and show me the coverage.”</strong> Bob creates a folder from the lab’s template, writes one SQL statement that joins the four sources through the query engine into a stock-month panel, with the identifier mapping, the index membership as of each month-end, the unit fix, and the lending row restricted to what had been published by the month-end. It builds the table in the research schema, exports it, and reports coverage: 500 index members a month across 156 months, about 90% of them with a lending signal, the rest explained. It commits and asks whether to push. About seven minutes, most of it the engine’s.</p><p><strong>“Now run the test.”</strong> A baseline long-short momentum portfolio against a variant that drops, from the long leg, the winners whose utilisation is in the top decile. Bob writes a pandas script on the exported panel and comes back with one table: annual return, Sharpe, maximum drawdown for both. In this run the filter does nothing, and Bob says so plainly, with the sample it rests on and the caveats: the level of utilisation is not the paper’s change in demand, the lending book covers the firm’s own clients rather than the whole market, no transaction costs. It proposes three follow-ups and runs none of them.</p><p><strong>“I think the lag is the problem. Rebuild the borrowing measure from the daily feed so month t is known at month-end t.”</strong> This is the turn the semantic layer was built for. Bob searches the catalog again, finds the daily feed as a neighbour of the monthly table, reads that it is published the next day, rewrites the panel to take the last daily observation of each month, re-exports and reruns. The filter now works: a visibly better Sharpe and a shallower drawdown, from exactly the same rule. The difference was never in the strategy; it was in knowing when the data was knowable.</p><p><strong>“Yes, push it.”</strong> The use case, with its SQL, its script, its results and a README that explains the decisions, is in the repository for the next researcher.</p><h3>An agent that learns the layer</h3><p>One more thing we did not plan and would now not do without. Bob keeps a short notes file in the lab: every time a query fails for a reason of dialect or type, it writes a one-line entry, error signature → fix, and re-reads the file before writing SQL again. The first session hit the usual walls: a SMALLINT the Iceberg writer refuses, a date function the engine does not have, a CHAR key that cannot be concatenated. The third session hit none of them.</p><p>The same loop applies to the catalog. Bob’s first searches were full questions, which rank badly against a lexical index; the skill now tells it to search with short noun phrases, and it does. It learned to read the related line before searching again, and to take table locations from the catalog cards rather than from memory, after one session where it guessed and was wrong. Confidence, for an agent as for a junior analyst, is built by iterating on real queries against real data, with a place to write down what was learned.</p><h3>What we took away</h3><p><strong>Semantics is the product. </strong>The engine and the agent are impressive, but what made the demo work was two weeks of writing down what the data means, with the AI drafting and people correcting.</p><p><strong>One engine, many sources</strong>. The agent never needed to know that three databases were involved. Federation is what turns a semantic layer from documentation into something an agent can act on.</p><p><strong>Governance belongs in the path, not in a policy document</strong>. Bob did not have to be told which tables were sensitive. The catalog said so, the engine enforced it, and the agent reported it as a finding rather than an obstacle.</p><p><strong>Start from an industry vocabulary.</strong> The Knowledge Accelerator gave us hundreds of correct definitions on day one. The firm’s own terms were a few dozen lines on top.</p><p><strong>Keep the layer as content.</strong> CSV files in git, applied by scripts, exported by scripts. When our cloud environment expired mid-project, the semantic layer came back in an afternoon.</p><p>The researcher’s Monday-morning question has not changed. What changed is that an agent can now answer the first half, what do we have and may I use it, in a minute, and the second half, does the idea hold, in an afternoon, with the reasoning written down. That is what a semantic layer is for.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4cdf97e72207" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>