<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><generator uri="https://jekyllrb.com/" version="4.3.4">Jekyll</generator><link href="https://antejavor.github.io/feed.xml" rel="self" type="application/atom+xml"/><link href="https://antejavor.github.io/" rel="alternate" type="text/html" hreflang="en"/><updated>2026-08-13T09:58:17+00:00</updated><id>https://antejavor.github.io/feed.xml</id><title type="html">blank</title><subtitle>Ante Javor&apos;s personal website. Software engineering, database systems, and AI. </subtitle><entry><title type="html">Graph engineering</title><link href="https://antejavor.github.io/blog/2026/graph-engineering/" rel="alternate" type="text/html" title="Graph engineering"/><published>2026-08-13T00:00:00+00:00</published><updated>2026-08-13T00:00:00+00:00</updated><id>https://antejavor.github.io/blog/2026/graph-engineering</id><content type="html" xml:base="https://antejavor.github.io/blog/2026/graph-engineering/"><![CDATA[<h1 id="graph-engineering-move">Graph engineering move</h1> <p>For the past few years I have been working a lot with graphs. Having some skin in the game around graphs helps you understand the bigger picture when particular trends appear. Right now, the latest trend is what gets called <strong>“<a href="https://x.com/steipete/status/2078277297791189132?s=20">graph engineering</a>“</strong>, a term popularized by Peter Steinberger, the author of OpenClaw.</p> <p>The latest premise is that we may be transitioning from loops to graphs.</p> <p>The idea is simple if we look at it from one perspective: through the lens of time, and through how we have become used to working with LLMs.</p> <h1 id="moving-in-a-line">Moving in a line</h1> <p>In the early stages of LLM development, problem solving was mostly linear.</p> <p>You moved through time toward a solution like this:</p> <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>---&gt; LLM ---&gt; Prompt ---&gt; LLM ---&gt; Prompt---&gt; .... And to eternity, or until the problem is solved
</code></pre></div></div> <p>This is how the initial versions of what we now call a harness looked.</p> <p>Initially, it was just a single prompt: you put some text into the LLM, and the LLM returned the most probable continuation, which often led to a correct solution. Early versions of harnesses had sliding windows, so only a few previous messages were kept in context.</p> <p>After a few interactions, the beginning of the conversation had completely moved out of the context window.</p> <p>You were the person pushing the LLM toward a solution. The two of you followed a single thread of work together. It was the bare bones era of 2023. The autonomy of work was still mostly in your hands.</p> <p>The work was not glamorous and automatic. It meant you were making the decisions and doing the quality control yourself. The model was useful, but it was like a very confused intern with great self-esteem.</p> <h1 id="moving-in-a-loop">Moving in a loop</h1> <p>The limitation of the line is that you have to make the line work and push the line further. You need to guide the LLM toward the solution.</p> <p>In the meantime, LLMs gained access to tools and MCP servers, which gave them hands to operate more autonomously. This meant the LLM was now mostly capable of solving smaller tasks from start to finish.</p> <p>That also meant you were the bottleneck in accessing their potential output. This is where loops come in.</p> <p>Obviously, if you are moving in a loop, there is some circular condition that keeps repeating.</p> <p>There is a start state and an end state, so it is not a perfect circle. It is closer to a state machine that your LLM moves through until it decides it has completed the task and breaks the loop.</p> <p>So it is a state machine with a fairly rigid structure that predefines the states, something like this:</p> <p><img src="/assets/img/blog-graph-engineering/agentic-loop-dark.svg" alt="agentic loop" width="900"/></p> <p><a href="https://code.claude.com/docs/en/how-claude-code-works#the-agentic-loop">This picture is from the Anthropic Claude agentic loop docs</a></p> <p>At this stage, an interesting dynamic appears. The two of you are no longer really collaborating in the same way. The model is trying to find the solution to your problem, and you step in only when needed while it mostly runs on its own inside the loop. You are no longer the bottleneck for every step of the process.</p> <p>The LLM, or agent if you prefer that term, is actively trying to solve the problem posed by your question. This means the agent has taken some autonomy from you, or more precisely, you have delegated it.</p> <p>It is autonomous in the way any semi-automatic machine is autonomous: once started, it can run through a sequence without further supervision, but it still depends on someone else to guide it correctly, define success, and clean up when it does something stupid. Think of an automatic lawn mower, except it is not really autonomous, only semi-automatic.</p> <p>So the nature of work changes. You stop manually advancing every step of the line and start managing boundaries around what it can do. This already shows how powerful loops are.</p> <p>The typical harness today has a loop. You can also configure different loops and tasks to run on a schedule. For example, every hour it could check which PRs were assigned to you and review them in a semi-supervised way with the tools you gave it.</p> <h1 id="moving-in-a-graph">Moving in a graph</h1> <p>One of the biggest changes happens when you drop fixed structures such as a state machine and move into the domain of graphs. Graphs are strong causality engines because they can represent states that do not yet exist and remain unknown until the future unfolds. Thinking about the lawn mower for a moment, imagine it wandering into your neighbor’s yard and either getting you paid or getting smashed to pieces. You do not know the outcome in advance.</p> <p>I have written before about why I think the graph model is the most natural fit for these kinds of AI workloads in <a href="/blog/2026/best-data-model-for-AI/">What is the best data model for AI?</a>.</p> <p>This matters for the nature of the agentic AI world. If you think about a current LLM as operating token by token, it can take wildly different directions if you change just a few tokens. Each of those directions can be intentional, shaped by you as the composer and coordinator trying to steer the model elsewhere.</p> <p>Each of those directions is a particular version of the path. At any point, you could have chosen a different route by changing only a few tokens. This yields a graph of traces, changes, and internal thoughts that can be biased toward a particular better solution.</p> <p>Now imagine an army of LLMs running in loops, solving different problems while cooperating with one another in graph space.</p> <p>That means you have a subgraph of loops running to solve a particular task, and then those loops create new subgraphs, potentially without end.</p> <p>Something small like this:</p> <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>           [Goal]
          /  |   \
         /   |    \
    [Loop A][Loop B][Loop C]
      /   \      \      \
     /     \      \      \
 [Loop A1][Loop A2][Loop B1][Loop C1]
     /   \     ...    ...      ...
    /     \
...      ...

</code></pre></div></div> <p>This is where autonomy of work stops being partial to your hands and starts becoming an organizational problem. Once many agents can branch, delegate, and recombine, the human is no longer supervising individual steps. The human is supervising a system of evolving components and failures that happily produce more of themselves. You can model that system only with a graph.</p> <p>If the graph is specifically organizing context for agents to consume, update, and act on, then it also overlaps with what I called a <a href="/blog/2026/context-graph/">context graph</a>.</p> <p>In that world, your job is less about doing the work directly and more about deciding which work deserves autonomy at all. Some tasks benefit from branching, while some of them will fail flat on their face.</p> <p>All of this happens while you are out drinking a macchiato and wondering whether your future of work is in jeopardy because at that point you have a self-problem solving army of agents working on a graph.</p>]]></content><author><name></name></author><category term="AI,"/><category term="Graphs"/><category term="LLMs,"/><category term="AI,"/><category term="Graphs,"/><category term="Knowledge-graphs"/><summary type="html"><![CDATA[Deciphering graph engineering]]></summary></entry><entry><title type="html">The language debate is back!</title><link href="https://antejavor.github.io/blog/2026/infra-static-languages/" rel="alternate" type="text/html" title="The language debate is back!"/><published>2026-05-15T00:00:00+00:00</published><updated>2026-05-15T00:00:00+00:00</updated><id>https://antejavor.github.io/blog/2026/infra-static-languages</id><content type="html" xml:base="https://antejavor.github.io/blog/2026/infra-static-languages/"><![CDATA[<h2 id="the-language-debate-and-ego">The language debate and ego</h2> <p>The language debate was one of the most interesting debates engineers have had. It is fascinating how much energy has gone into debating languages, and how often that turns into an egoistic debate.</p> <p>People devote their entire identities to the programming language they know and are used to, and that is a very natural thing to do. The programming language and ecosystem in which you work make you feel like a worthy member of a particular community. Humans love to feel useful.</p> <p>On the other side, there is an enemy growing inside: the ego. The human ego can be a very fragile thing, and people are mostly unaware of it and the limits of their thinking. Once someone criticizes a programming language, they feel personally attacked. That is somewhat understandable, but it can turn a technical discussion into a complete mess.</p> <p>As soon as we get emotional about deterministic and machine things, we are probably in an egoistic debate, not a language debate.</p> <p>I obviously do not want to debate language, but rather the features it brings to the table. Before that, the growing question today is this:</p> <p>What is the programming language today?</p> <h2 id="english-by-karpathy">English, by Karpathy</h2> <p>Obviously, Andrej Karpathy’s <a href="https://x.com/karpathy/status/1617979122625712128?s=20">tweet</a>, “The hottest new programming language is English”, feels a bit like an epiphany because it captures the direction.</p> <p>As more and more code is written by LLMs and less and less by humans, a few interesting things start to happen.</p> <p>We are probably getting less attached to the programming language we are spending our time in, and questioning our purpose and existence a bit more. That means we will switch more easily and reconsider what is actually optimal.</p> <p>On a more technical note, we get massive gains in prototyping and refactoring in any language. Humans play a smaller role.</p> <p>There are some technical differences in token spend, review time, correctness, and so on, but I am thinking more about the bigger picture.</p> <p>You can generate a million lines of code in a couple of hours and completely refactor a whole codebase.</p> <p>If you have a good test setup, solid coverage, and a benchmark harness, you will immediately see the drawbacks or gains from that refactor.</p> <p>I had been planning to write this blog and already had an initial draft ready, but what happened with <a href="https://github.com/oven-sh/bun/pull/30412">Bun</a>, a million changed lines in six days, a port from Zig to Rust, pushed me over the edge to actually finish it.</p> <p>The pros and cons of programming languages need to be completely reevaluated.</p> <h2 id="back-to-the-language-debate">Back to the language debate</h2> <p>If we start thinking about language features and comparisons, most of them are probably obsolete because they were built around the human bottleneck.</p> <p>One of the big distinctions is whether languages are compiled or interpreted. Interpreted languages are usually easier to learn, handle more things for you, and require less thinking. This was ideal when humans were writing the code and needed to prototype fast.</p> <p>If you ask an LLM for a comparison of statically typed and compiled languages versus dynamic and interpreted languages, you would get something like this:</p> <table> <thead> <tr> <th>Aspect</th> <th>Static / Compiled</th> <th>Dynamic / Interpreted</th> </tr> </thead> <tbody> <tr> <td><strong>Performance</strong></td> <td>Fast; compile-time optimizations</td> <td>Slower; JIT can help</td> </tr> <tr> <td><strong>Dev Time</strong></td> <td>Slower; more boilerplate</td> <td>Fast prototyping; less ceremony</td> </tr> <tr> <td><strong>Ecosystem</strong></td> <td>Strong tooling &amp; refactoring</td> <td>Vast libraries; beginner-friendly</td> </tr> <tr> <td><strong>Security</strong></td> <td>Compile-time bug detection</td> <td>Prone to runtime &amp; injection risks</td> </tr> </tbody> </table> <p><em>Static:</em> C, C++, Rust, Go, Zig · <em>Dynamic:</em> Python, JS, Ruby, PHP</p> <p>Fast prototyping is critical. You usually sacrifice performance and security for a faster pace and lower development time, and this leads to a more vibrant ecosystem of tools built on top of a poor foundation. This was the default because of project budgets, time, and engineers.</p> <p>Keep in mind that I do not have anything against dynamically interpreted languages. I write Python all the time, but it is a liability.</p> <h2 id="predicting-the-unpredictable">Predicting the unpredictable</h2> <p>As our world is quite unpredictable (LLMs were not a thing a few years ago), I am going to make a prediction for the fun of it.</p> <p>I think the future for any software is tied to statically typed and compiled languages for specific platforms, since there is no longer a measurable benefit in prototyping speed. The only argument I can think of against this is the existing ecosystem and libraries. But think about it: refactoring something into another language has basically become cheap.</p> <p>I do not think dynamic languages will disappear. People and agents will probably use them in some capacity.</p>]]></content><author><name></name></author><category term="Infrastructure,"/><category term="Engineering"/><category term="Infrastructure,"/><category term="Security,"/><category term="LLMs,"/><category term="Rust,"/><category term="Zig"/><summary type="html"><![CDATA[Notes on the programming language debate and why we may increasingly favor statically typed and compiled languages.]]></summary></entry><entry><title type="html">The Context Graph</title><link href="https://antejavor.github.io/blog/2026/context-graph/" rel="alternate" type="text/html" title="The Context Graph"/><published>2026-04-14T00:00:00+00:00</published><updated>2026-04-14T00:00:00+00:00</updated><id>https://antejavor.github.io/blog/2026/context-graph</id><content type="html" xml:base="https://antejavor.github.io/blog/2026/context-graph/"><![CDATA[<h1 id="agentic-harnesses-and-prompting">Agentic harnesses and prompting</h1> <p>Turns out that a lot of manual work has moved toward using LLMs and agents to drive some parts of our daily workflows. At some point in your work you are probably using them, because they are highly effective and, frankly, addictive. If you are not, you are probably in some state of Nirvana.</p> <p>Your work starts by opening your terminal, favorite agentic IDE, or a GUI like CoWork. I am assuming you are using some SoTA LLM model and wrapped in an <a href="https://www.anthropic.com/engineering/harness-design-long-running-apps">agentic harness</a>. If you are doing this in the web interface, you are probably about a year behind what is currently possible. I know that sounds a bit like AI-bro advice, but I mean it.</p> <p>The key is that the agent running your prompt has access to tools, skills, and MCP servers it can operate on. That means it has hands to perform tasks for you. That combination of model, harness, and tools is what makes it an agent.</p> <p>Good, now we get to the fun part: the agent doing some work for you. Jake has sent you a message, you have seen the start of it and a link inside, and you decide that the agent should deal with it:</p> <blockquote> <p>Take a look at the message Jake sent to the infra channel. There is a link in the message. Review it and do as much work as you can autonomously.</p> </blockquote> <p>The big question is: how should the agent think about this task?</p> <h2 id="context-engineering">Context engineering</h2> <p>The agent operates purely on context. It is like a working memory it can process, and that memory is highly limited, so it needs to stay lean and optimized. You have given the agent a task through a prompt it needs to interpret, but there is not much context in it.</p> <p>So the question is: what is the context in this case?</p> <p>It is actually:</p> <ul> <li>Infra channel</li> <li>Message and message content</li> <li>Link and link context</li> <li>Review task</li> <li>Permission to operate autonomously</li> </ul> <p>That is the context <strong>you see from the prompt</strong> you have written. There is also a system prompt and more, which goes under the topic of <a href="https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/overview">prompt engineering</a>, and I will not go into that rabbit hole here, but it is important that different levels of prompts exist.</p> <p>Now the question becomes: what <strong>context is not visible from your prompt</strong>? As an employee in a company, you probably carry a lot of context based on the current state of the company, so the task sounds easy to you.</p> <p>Here are some examples of what is not visible:</p> <ul> <li>Who are you inside the organization, what are your role, responsibilities, actions you can take?</li> <li>What is Jake’s role, responsibilities, and actions he can take?</li> <li>What decision is driving Jake’s message?</li> <li>How does the task contribute to company goals, metrics, or the unit as a whole?</li> </ul> <p>That is the kind of context that can be captured, and it goes into the topic of <a href="https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents">context engineering</a> because it is exactly the context that is currently missing from your prompt.</p> <p>The question is: where are you getting that context from, and how are you retrieving it?</p> <h2 id="context-graphs">Context graphs</h2> <p>At this point in time there are several approaches you can take to solve this problem of retrieval, but if we are talking about enterprise knowledge bases, that knowledge is stored in multiple systems and formats, and the question is how all of it connects under a single umbrella. Just think about how you would connect documentation to a Git repository and an internal chat system, and there is already sufficient chaos to handle.</p> <p><a href="/blog/2026/best-data-model-for-AI/">As I have discussed before, it turns out that the graph model is great for modeling</a> in the AI space due to its flexibility and its ability to represent structure. You can pretty much express any problem as a graph problem. These days, graph databases support vectors, text, edge, and property indexes, so it is easier to connect different sources while optimizing storage for actual search.</p> <p>This leads me to a naming point: if we are solving a context-engineering problem by using a graph as the model, we are talking about a <strong>context graph</strong>. My definition is simple: a <strong>context graph</strong> is a knowledge graph organized specifically for agents to consume and update. It is an AI-first graph solution to a given problem and a use case. I use “knowledge graph” here to clarify that it is modeled with intent, not just complete chaos.</p> <p>In the end, humans can remain operators of intent while agents handle execution, search, and storage with context graphs.</p> <h2 id="context-graph-use-cases">Context graph use cases</h2> <p>Use cases are already appearing everywhere, but in my current state of mind, here are some examples with short descriptions and questions:</p> <ul> <li><strong>Agent Memory graphs</strong> -&gt; What is the work the agent has done prior to this? What do agents already know about this problem?</li> <li><strong>Agent Decision trees/traces</strong> -&gt; Storing, retrieving, and evolving decision traces. What were the decisions and why?</li> <li><strong>Agent Actions graphs</strong> -&gt; What actions can the agent take, what is the right action to take, and what responsibility or ability is attached to that action?</li> <li><strong>Agent Code graphs</strong> -&gt; How are source files and components composed together, and what are their dependencies?</li> <li><strong>Skills graphs</strong> -&gt; What skills need to evolve or be used to solve a particular problem?</li> <li><strong>Agent entity/ontology/data graphs</strong> -&gt; What is the actual data or problem the agent is working on, and what problem is it trying to solve relative to organizational data?</li> <li>…</li> </ul> <p>Obviously this list can keep going, so in my mind there is no single context graph use case. It is really about the application of graph models and graph algorithms to solve context-engineering problems for agents.</p> <h2 id="technical-challenges-and-ambiguity">Technical challenges and ambiguity</h2> <p>We are still mostly operating in <strong>single-player mode</strong>, where you run agents toward a goal using graph data, memory, tools, and components that are mostly local to you. The harder problem is making this work in an environment where multiple agents, teams, and systems are operating at the organizational level (<strong>multiplayer mode</strong>). That is where context graphs become much more valuable, and much harder to build at the same time.</p> <p>Turns out from time to time we really like to explain some theoretical concept with different names, which introduces ambiguity. The reason usually comes from the background of the author, or from the fact that the theory itself stands on shaky legs, so people reuse the same theory in conjecture while trying to fit it to the actual narrative they are working through.</p> <p>Thinking now about GraphRAG, I see context graphs as the broader framing. GraphRAG usually describes a retrieval pattern: use graph structure to improve retrieval and generation. A context graph is a wider operational concept that covers things from agents first perspecitve.</p> <p>That is why I think <strong>context graph</strong> is the more useful term for the workloads we are starting to face. The point is not just to retrieve better context. The point is to organize the environment around the agent in a way that makes reasoning and action more reliable and efficient.</p> <p>Some of the sources I came across while thinking about context graphs before writing this blog, but I find them missing the bigger picture:</p> <ul> <li><a href="https://arxiv.org/abs/2406.11160">Context Graph</a></li> <li><a href="https://foundationcapital.com/ideas/context-graphs-ais-trillion-dollar-opportunity">Context Graphs: AI’s Trillion-Dollar Opportunity</a></li> </ul>]]></content><author><name></name></author><category term="AI,"/><category term="Graphs"/><category term="LLMs,"/><category term="AI,"/><category term="Graphs,"/><category term="Knowledge-graphs"/><summary type="html"><![CDATA[Notes on how to think about the context graph.]]></summary></entry><entry><title type="html">What is the best data model for AI?</title><link href="https://antejavor.github.io/blog/2026/best-data-model-for-AI/" rel="alternate" type="text/html" title="What is the best data model for AI?"/><published>2026-03-24T00:00:00+00:00</published><updated>2026-03-24T00:00:00+00:00</updated><id>https://antejavor.github.io/blog/2026/best-data-model-for-AI</id><content type="html" xml:base="https://antejavor.github.io/blog/2026/best-data-model-for-AI/"><![CDATA[<h2 id="brain-fog-of-data-models">Brain fog of data models</h2> <p>I quite recently discovered the <a href="http://www.incompleteideas.net/IncIdeas/BitterLesson.html">Bitter Lesson</a> by Rich Sutton. It opened my eyes in so many different ways, I would recommend reading it. There are different points there, you will probably see something else, but the bigger point for me is that any type of human sophistication (in technical systems) usually loses to the general <strong>search/compute</strong> methods that scale to infinity and are convex in nature, compared to the concave approach of human sophistication.</p> <p>The most visual example is in the computer vision space where you had a bunch of sophisticated math models like <a href="https://en.wikipedia.org/wiki/Scale-invariant_feature_transform">SIFT</a> that were made to detect robust features to do something bigger, but were completely replaced by convolutions in neural nets.</p> <p>This brings me to something I have been thinking about for quite some time now. As you are probably aware, there are a bunch of different data models implemented in different database systems. The question is: <strong>what data model is the most suited for AI (LLM driven agents)?</strong> Thinking from the perspective that the actual data model will introduce the least human sophistication and enable search and compute to scale.</p> <p>We are probably a few years away from AGI or the LLM bubble bursting (it will be interesting to read this in a few years). That means we still need to somehow manage the data models that are most common to humans and LLM driven agents.</p> <p>Everything I am tinkering with at the moment is around the actual data model on the logical and representation level (software), not the actual storage model (hardware). At the point when AGI hits, who knows how data would be represented then, probably in some synapse-style baked into the hardware. Who knows what the memory of that system will look like, but I guess we won’t abandon the current deterministic computations in software on the data from databases since it is much superior to the human brain in deterministic computation, and we still need a human-readable format we use today.</p> <h2 id="shortest-history-of-data-models">Shortest history of data models</h2> <p>An obvious start could be: what do we have currently in the store?</p> <p>If you prefer the short history of how things evolved:</p> <ul> <li>Flat files (1950s and 1960s)</li> <li>Hierarchical Model and Network model (1960s and 1970s)</li> <li>Relational model (1970s)</li> <li>NoSQL key-value, document, object, graph (2000s)</li> </ul> <p>Each of these periods was an era of discovery and adoption. In each of the periods, some of the models showed their strengths and weaknesses, but it was super early days for each of the data models. Graph was initially started in the 1960s and later revisited in the NoSQL era. Flat files seem to be like where <a href="https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview">skills are today</a>. But there was one that scaled: the relational model was the prime winner so far.</p> <p>The main reason is that it was the most suited for what was needed at the time: a decent level of structure and rigidity to power the simpler businesses that were starting to pop up. Pair that with the time we spent working, improving, and breaking the relational model in the last 50 years, and it grew to be the most reliable and widely adopted data model out there that most companies and engineers use. The relational model scaled and it works today; it is not outdated by any means. The most recent example is <a href="https://openai.com/index/scaling-postgresql/">OpenAI scaling ChatGPT to 800 million users via Postgres</a>.</p> <p>It is important to know that network effects, serendipity, and human bias play an important role in the development of technology. You won’t pick a key-value or a graph database if you haven’t used it before or didn’t have exposure to it. Usually the choice is something that happens by accident, you find you need some feature or the current system becomes too rigid, and then you go and pick something from your mind.</p> <p>Think about it this way: if you just need to smack a nail into the wood, you may pick the first rock you find on the ground, not the hammer 30 meters away. Don’t fool yourself that you are always picking the optimal tool.</p> <h2 id="picking-the-optimal-data-model">Picking the optimal data model</h2> <p>Well, the obvious way we could start applying the bitter lesson is the level of structure we have in our database systems. The more structure we need to provide, the more the system is locked into our way of thinking about it. Think about it this way: if you have a box you can write into, you have already created the box and limited it to a box. Now ask yourself, how are you envisioning AI?</p> <p>Well, I am envisioning that it will be able to go over some of my data that is completely messy, and without me doing anything it will be able to reason and figure out how we got to that point (scaling search and compute). Now this is what you would ideally want in your daily life and in business, the data model that learns (compute) as you go and can enable scalable search on the fly. The search is important since you don’t want to spend any resources you don’t have.</p> <p>What I described above is <strong>flexibility</strong> of the system to represent any data point, relationship, or structure. So the data model needs to be flexible and represent some <strong>structure</strong> at the same time.</p> <p>If we take a look at the data systems, we would have the following structure and flexibility:</p> <table> <thead> <tr> <th>Data Model</th> <th>Structure</th> <th>Flexibility</th> </tr> </thead> <tbody> <tr> <td>Flat files</td> <td>Fragmented</td> <td>Not flexible</td> </tr> <tr> <td>Relational</td> <td>Structured</td> <td>Somewhat flexible</td> </tr> <tr> <td>Object/Document/Key value</td> <td>Somewhat Fragmented</td> <td>Flexible</td> </tr> <tr> <td>Graph</td> <td>Structured</td> <td>Flexible</td> </tr> </tbody> </table> <p>Relational models can also be quite flexible, but the schema needs to be created upfront. This means before putting data in you need to create the box, which defeats the purpose of freely moving AI. In the example of OpenAI and scaling Postgres, they are not allowed to change the schema. They can’t even change the box they have created to write into. I am not mocking here, I am impressed by what they did, but it strikes the direct point I am making: the relational model is not so flexible.</p> <p>Object, document, and key-value stores are in the same bucket since their capability to represent structure is limited.</p> <p>Vectors in themselves are not in the table since I don’t consider them a data model. Rather, they are a compression or search index for some data. More on that in the next blog.</p> <p>You will probably notice that I am infinitely biased towards Graph data structures because I work at <a href="https://memgraph.com/">Memgraph</a>, but that is not the point here. The point is trying to find the best model to represent <strong>flexibility</strong> of schema and <strong>structure</strong> between different things that happen in life. Graph model seems to fit perfectly into this based on the metric I am thinking about.</p> <h2 id="metric-of-data-models">Metric of data models</h2> <p>Tinkering with the data model is all about the <strong>metric</strong> that data model needs to serve. My personal metrics are being able to represent <strong>structure</strong> and <strong>flexibility</strong>. These two metrics in my mind are the most important ones.</p> <p>Of course, implementing this into the transactional, scalable and robust systems is a different challenge, but it should move us to the ideal system that holds the data model designed natively for AI.</p> <p>The opposite question can also be valid: what is the <strong>metric</strong> to evaluate the capability of a data model?</p> <p>Are there other metrics you would take into consideration?</p>]]></content><author><name></name></author><category term="AI,"/><category term="Graphs"/><category term="LLMs,"/><category term="AI"/><summary type="html"><![CDATA[Exploring what data model (or data model metric) is the most suited for LLM driven agents.]]></summary></entry><entry><title type="html">How do LLMs reason?</title><link href="https://antejavor.github.io/blog/2025/how-do-LLMs-reason/" rel="alternate" type="text/html" title="How do LLMs reason?"/><published>2025-04-04T00:00:00+00:00</published><updated>2025-04-04T00:00:00+00:00</updated><id>https://antejavor.github.io/blog/2025/how-do-LLMs-reason</id><content type="html" xml:base="https://antejavor.github.io/blog/2025/how-do-LLMs-reason/"><![CDATA[<h2 id="the-mighty-llms">The mighty LLMs</h2> <p>We live in fascinating times of mighty LLMs that can help boost productivity and simplify day-to-day tasks. The speed of adoption of LLMs is a story that will constantly be compared to everything that came before and after them.</p> <p>It is essential to highlight and understand the fundamentals and flaws of this technology. Let’s jump to the big question around LLMs that became quite controversial: Can they reason? My short answer is no. Let’s dive into why.</p> <h2 id="reasoning">Reasoning</h2> <p>To even discuss reasoning, we would first have to define it and agree on what reasoning is. Let’s distill this into what we refer to as a typical thinking process: you are presented with some information, can think about it, and conclude something.</p> <p>The practical example would be something like this: <strong>The S&amp;P 500 sank 15% percent in the three months</strong>.</p> <p>Now, in your brain, you start to ponder that information and connect it to the events that happened in that period. Some notable things that could pop into your mind are the Trump tariffs, lower-than-expected BDP in the US economy, global conflicts, etc.</p> <p>In a pure form, this is reasoning about specific information in your brain. If I follow up on the question and ask: “What will the stock market do tomorrow?” you will probably start thinking hard about this.</p> <p>In other words, you would read projections, news, global tax, and tariff policies. You would invest time and effort into constructing a thesis under different assumptions.</p> <p>Usually, the more effort you invest, the higher the probability you will be correct.</p> <p>In a pure form, it is reasoning based on the information you were given, have in your memory, or acquire over the web.</p> <p>The nice thing about reasoning is that our brain is the ultimate reasoning powerhouse (most of the time :D), and it runs on beer and bananas, it does not require <a href="https://www.theverge.com/24066646/ai-electricity-energy-watts-generative-consumption">1 Megawatt of electricity to be trained</a></p> <h2 id="reasoning-and-llms">Reasoning and LLMs</h2> <p>LLMs <strong>cannot</strong> reason, they can <strong>mimic</strong> reasoning that sometimes works and sometimes does not. You can call it primitive, low reasoning, or use any other way to package it, but it is far from your reasoning capabilities.</p> <p>This starts with the basis of what LLMs actually are: They are super capable text predictors with a lot of memory. Memory is constructed based on what they have been trained on, and small “thinking memory” is the context you are passing with your question.</p> <p>Let’s put this into practical example if your LLM was trained on this data:</p> <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>We have different colors for objects: blue, red, green, purple, yellow, etc.
The ball can be red.
The ball can be blue.
The car can be purple.
The flag can be purple.
</code></pre></div></div> <p>Now, if I ask: “What color can a ball be? Give me three answers.”</p> <p>The LLM computation will give a higher probability to the obvious answers:</p> <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>1. The ball can be red.
2. The ball can be blue.
3. The Ball can be ...
</code></pre></div></div> <p>The third answer would be some of the possible colors, because more objects are purple and purple has a higher frequency, it would probably give the third answer as purple. But we all know that it can be any color since it is not specified.</p> <p>If you want more details about this, one of the best explainers about why LLMs is a text predictor, I would recommend jumping on the 3Blue1Brown channel and watching a <a href="https://youtu.be/aircAruvnKk?si=6akRbRcsc2nOE_G2">series about neural networks</a>, specifically about the LLMs and transformers.</p> <p>By design, they are not made to think but rather to predict the next word (token, to be exact).</p> <p>Well <a href="https://platform.openai.com/docs/guides/reasoning?api-mode=chat">OpenAI docs seem to suggest otherwise</a>.</p> <p>This is a snippet from their docs page:</p> <blockquote> <p>Reasoning models, like OpenAI o1 and o3-mini, are new large language models trained with reinforcement learning to perform complex reasoning. Reasoning models think before they answer, producing a long internal chain of thought before responding to the user. Reasoning models excel in complex problem solving, coding, scientific reasoning, and multi-step planning for agentic workflows.</p> </blockquote> <p>The image from the same docs page illustrates this process: <img src="/assets/img/blog-how-llms-reasone/reasoning_flow.png" alt="reasoning" width="900"/></p> <p>They are saying their models can perform complex reasoning.</p> <p>Well, they do not reason. They generate a thesis on how to answer questions, summarize that generation into reasoning and output, and chain this multiple times, which improves the text generation and makes it more successful. Something you will hear as <strong>Chain of Thoughts</strong>.</p> <p>So, they are <strong>mimicking</strong> reasoning where you generate text related to the text you are asking for to try to come up with a solution. It is like a person saying the facts out loud when someone asks you a question or creates a theory about something and uses theory construction to present the facts. At any step of the process, you are hoping the theory won’t go sideways.</p> <p>If we go back to the LLM that was trained on ball colors:</p> <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Question asked: What color can a ball be?

Chain of thought:
The ball can be blue
The ball can be red

Output:

Therefore, the ball can be red or blue.
</code></pre></div></div> <p>This would be a good Chain of Thoughts:</p> <p>Here is how it could fail:</p> <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>
Question asked: What color can a ball be? Give me three answers
Chain of thought:

The ball can be blue
The ball can be red
The car can be purple.


Therefore, the ball can be blue, red, and, I guess, purple.


</code></pre></div></div> <p>If you do not trust my examples, give a shot to your <strong>reasoning</strong> LLM, I got this on ChatGPT with reasoning:</p> <p><img src="/assets/img/blog-how-llms-reasone/chat-gpt-reasoning.png" alt="chat-gpt-reasoning" width="900"/></p> <p>If you do not trust me, one of the best men to describe this is <a href="https://www.youtube.com/watch?v=N09C6oUQX5M">Yann LeCunn</a>, Chief AI Scientist at Meta.</p> <p>I admire the engineering behind modern LLMs and find them helpful. If you provide the proper context, they won’t hallucinate. That is why we, in <a href="https://memgraph.com/docs/ai-ecosystem">Memgraph</a> are focused on building cool Graph and LLM-powered AI apps.</p> <p>As they say, the harder it is to explain and argue how bad or incapable technology is, the better it is. <a href="https://en.wikipedia.org/wiki/Clarke%27s_three_laws">Arthur C. Clarke’s Third Law</a>:</p> <blockquote> <p>Any sufficiently advanced technology is indistinguishable from magic.</p> </blockquote>]]></content><author><name></name></author><category term="AI"/><category term="LLMs,"/><category term="AI"/><summary type="html"><![CDATA[Understanding what reasoning is and how LLMs can reason.]]></summary></entry></feed>