This Is a Fight Worth Having: The Case for Open Source AI | Raffi Krikorian, Mozilla CTO

Mike's Notes

Another wonderful video interview by Kesnia Se from Turing Solutions with Raffi Krikorian, CTO of MozillaAn excellent newsletter worth subscribing to.

I learn a great deal from every issue of this newsletter. Once Ajabbi becomes financially stable, this newsletter will be one of those generously supported by the future foundation.

Resources

References

  • Reference

Repository

  • Home > Ajabbi Research > Library > Subscriptions > Turing Solutions
  • Home > Handbook > 

Last Updated

26/01/2026

This Is a Fight Worth Having: The Case for Open Source AI | Raffi Krikorian, Mozilla CTO

By: Kesnia Se
Turing Solutions: 24/01/2026

Dreamt about Turing Post since 2019, founded it in 2023, after a successful launch of TheSequence (co-founded with Jesus Rodriguez). Board member at Track Two: An Institute for Citizen Diplomacy, currently writing a book about them. Previously: guest lecturer at HSE (Moscow, Russia); Middlebury Institute of International Studies (Monterey, USA). Ex editor-in-chief of TheQuestion, ex NY chief editor of Snob Magazine. Contributor to Stratfor, Towards Data Science, The Startup, and others. Writer.

Note: We planned to publish Week 2 of our Open Source AI series, “The Real Math – when open source saves money, when it doesn’t”, but the flu took over our house. We did manage to publish this interview though, which aligns with the series. Watch it, it’s very interesting and gives you a great sense of where open source AI is right now. Next week, we’ll publish the real math. Let’s use this moment to learn what will be most useful to you →

Which angle of open source AI economics matters most to you?

  • Enterprise only – real cost math, infra traps, and why most companies miscalculate self-hosting
  • Personal use only – when local models beat subscriptions, and when they absolutely don’t
  • Both – side-by-side breakeven logic for companies vs individuals
  • Myth-busting – where open source is oversold and proprietary APIs still win
Login or Subscribe to participate in polls.

Now to the show: In the first episode of Inference’s quarterly series on Open Source AI, we talk to Raffi Krikorian, CTO of Mozilla, about when open source AI stops being aspirational and becomes an operational choice.

We explore why stories like Pinterest saving $10 million by moving to open models are real, but often misunderstood, and why timing and maturity matter more than ideology. Raffi lays out his view of a missing “LAMP stack for AI” and explains why the hardest problem to solve isn’t models or data, but the connective glue that makes it easier for developers to use open source.

Along the way, he shares how Mozilla is navigating these tradeoffs in practice, why even open-source-first organizations still rely on closed tools during experimentation, and what the browser era taught Mozilla about defaults, user choice, and long-term control.

Raffi is passionate about open source, but grounded in its real economics. In this episode, he shares practical recommendations that apply even if you are still experimenting. Listen closely.

In this episode of Inference, we get into:

  • Why experimentation favors closed APIs and production favors open systems
  • How company maturity matters more than company size for cost savings
  • What a real “LAMP stack for AI” could look like, layer by layer
  • Why choice and portability matter more than model loyalty
  • Mozilla’s bet on small, specialized models over one giant model
  • Why data ownership and user context are the real long-term battleground
  • Concrete steps companies can take today to keep an exit door open

This is a conversation about choice, cost, and control in the AI stack. Watch it!

This is a free edition. Upgrade if you want to receive our deep dives directly in your inbox.

We prepared a transcript for your convenience. But as always – watch the full video, subscribe, like and leave your feedback. It helps us grow on YouTube and bring you more insights ⬇️

Ksenia Se: Hello, everyone. We're doing something different with Inference by Turing Post this year. Starting with this episode, we're dedicating each quarter to one topic explored through multiple conversations. And this quarter's topic is open source AI. I'm starting with someone who is reorganizing his whole company around this bet: Raffi Krikorian, CTO at Mozilla. Welcome, Raffi.

Raffi Krikorian: It is such a pleasure. Thanks for having me.

When Values Meet Economics

Ksenia: Absolutely. But let me be honest with you about open source. I had one problem recently with it. All the conversations sound very aspirational. It's about freedom, it's about transparency, it's about ownership – but that's not how companies do business, right? So from what you are seeing, when does open source AI become an operational choice rather than an ideological one?

Raffi: Well, on one hand, I'm actually kind of glad that you only have one problem with it, because I think there are a billion problems in the grand scheme of things. But no, I mean, I think you're exactly right. I think it is an unfair thing to assume that open source wins because of values. It needs to be this combination of values and economics that really work out in order for it to make sense.

I mean, one shining hope right now – well, there are many shining hopes – but one concrete example is at the end of last year, Pinterest put out a report that they've saved $10 million by moving to open source rather than relying on closed-source providers. And we're starting to see a bunch of people have very similar comments. They've passed through the prototyping stage and gotten into the steady-state utilization phase. Therefore, they now know how to provision properly. They've figured out which models actually perform quite well. So they're no longer paying a per-token cost and instead absorbing that into the infrastructure.

If I were to make a prediction for 2026, we're going to start to see a lot more of those types of stories starting to show up – that the economics and the values are starting to align, or maybe just even the economics are starting to align. And therefore these big companies are starting to make that choice.

You know, another thing I've been thinking a lot about is this notion of how to enable that choice to happen in the future in the first place. Things like what we're building at Mozilla on the Mozilla AI team – for example, this thing we call the Choice Suite (aka any-suite) – how things like the Choice Suite can actually enable enterprises to be more flexible in how they even negotiate.

I remember the days when everyone built directly on AWS. No one does that anymore, right? They build on Terraform and all the other things. And what that provides them is negotiating opportunities. When AWS says, "Well, it's now going to cost $50,000," you can be like, "Well, Azure says it's only going to cost me $30,000, and I have a Terraform script. I can just move over very quickly."

I think those types of moments are going to start to show up this year. The economics are going to start to work out.

The Maturity Threshold

Ksenia: I heard this case of Pinterest. But if you think about Pinterest, it's a huge company with a lot of ML engineers that can be dedicated to the switch. So when do you think it makes sense to switch – does company size matter? Technical capabilities? Spend level? When is open source cheaper for them, not just a principle again?

Raffi: Before we have the dollar sign or euro sign conversation, I think it really goes to how fast can people move?

In the Pinterest case, when you read between the lines, what you implicitly see is that they went past experimentation. They actually now know what their use case looks like. They now know exactly the kind of application they want to build and deploy. And now they can actually codify it and fine-tune – fine-tune is overloaded – but build the exact infrastructure they need in order to achieve their goals.

I think a version of that does play out on every single level. The reason why it's about more than just a dollar sign is: when you go to a small company, small companies by definition are still in the iteration phase. They're still trying to experiment to see what works best for them. What's the actual application they're trying to build?

And right now, I can't with an honest face say that they should be experimenting with open source AI. The OpenAI API is kind of lovely, right? It's one API call and it abstracts away all the stuff behind the scenes. Whereas if you try to use open source software, you're cobbling together all these different pieces, trying to figure out which evaluation provider, which traceability provider...

So once they get past experimenting on what they want to build, and then they want to get into production or they want to get into some form of cost optimization or cost savings, then I think open source is positioned to be a valid part of that conversation. So I don't think it's a dollar sign. I actually think it's the maturity of the application that you want to build.

Ksenia: When did it happen at Mozilla? I'm sure you were iterating and experimenting a lot with both closed and open source tools and models. When was this moment?

Raffi: I mean, we're actually still going through this moment right now. I'm not sure I would say that Firefox is fully locked into exactly what their AI-powered user experience really looks like. And I would also say that things like the Mozilla AI team and other teams are still very deep into using things like OpenAI API, Claude Code, et cetera.

Only a few of them have even started switching to things like Codex or open alternatives. So we are actually still as part of this journey, trying to figure out what we're going to do.

But I would say – you know, part of my job at Mozilla is to think about the broader AI ecosystem. How can we do for the AI ecosystem what Mozilla did for the web? How can we actually bring user choice? How can we actually give credible alternatives that force openness in different parts of the stack?

So my goal and the work that I'm trying to do is try to make it so that the open source choice can happen earlier and earlier in that experimentation process. For me, I think about Mozilla as a testing ground of the different things we can be experimenting with as early as possible, even while we're still trying to figure out what we want to do.

So we're not quite there yet, but that's maybe our North Star of what we're trying to get done this year.

The Open Source Stack: A LAMP Moment

Ksenia: Let's talk more about the open source stack then, because – again, another problem with open source – it's kind of one thing in theory. In practice, it's multilayered. First of all, even the understanding of what open source is is multilayered. So what is the stack? What are we looking at?

Raffi: The thing that we need is a sort of LAMP stack definition. Right now there isn't a good definition of what that looks like. But what I would propose is that we should look at it on four different layers:

  • The compute layer
  • The model layer
  • The data layer (maybe we can argue which is lower – data or models)
  • The developer experience layer

And I think this replicates itself both on training and on the inference side.

The conversation we need to have is: What do APIs look like? Or what do standards look like between those layers so that we as an open source ecosystem can start coalescing around this LAMP-like stack metaphor that can make it really easy to deploy?

I'll note that one of the things we're trying to do with our Choice Suite is provide maybe that top-of-the-stack opening. If you use the Choice Suite, you get one API call that abstracts away a lot of things below it. So if you use AnyLLM, which is one part of the Choice Suite, you call the AnyLLM API, and then you can rapidly switch between different LLM providers – both local, both remote, open, closed, et cetera.

So we're trying to embed choice into that conversation. And we think that can apply for almost everything inside that developer tool suite layer, that developer experience layer on the top of that LAMP-like stack. But we need to do this over and over and over again across all the different parts of the stack.

I want to live in a world where we have interchangeable components that people can really choose what their LAMP stack looks like, and they can assemble it rapidly. Maybe there's a set of blueprints that make it really easy for small businesses to do it. Maybe there's a different set of blueprints for enterprises, a different set for governments even. But I want to figure out how to make that LAMP stack coalesce.

Ksenia: Is anyone building something like this?

Raffi: Lots of people are building parts of it. I think OpenRouter is a good example. Things like MCP (Model Context Protocol), which allows calling from the model layer, is part of this conversation.

I'm not saying that Mozilla needs to go build this all ourselves. My real goal is to try to articulate: What are the things that developers are looking for when you think about it as a full-stack component? And how do we motivate and drive the community toward what are the standardization opportunities?

Mozilla probably will only show up in that developer experience layer, maybe in the data layer. But I want that ethos. I dream of a time when that ethos goes through that entire stack.

The Vibrant Ecosystem

Ksenia: What are the companies that serve your ideal currently?

Raffi: There's a bunch of them. I think OpenRouter and Mozilla AI are good examples when it comes to that top of the stack.

But I'm really excited about the work that people like AI2 (Allen Institute for AI) are doing at the model layer, or ETH Zurich is doing at the model layer, and others to try to figure out what really open models look like.

I also think that there's going to be a lot of innovation in that model layer, especially as we're coming to grips with the fact that it's impossible for anyone to play in it. The Transformer architecture makes it literally computationally and financially impossible. But at the same time, there's a lot of evidence that these smaller language models or smaller fine-tuned models from the pre-Transformer days might actually be the path forward.

I'm intrigued by a lot of companies who are starting to build the infrastructure for faster fine-tuning or model composability or things like that on that layer.

On the data side, I'm of course really interested in things like what Databricks is up to. Mozilla has a play with the Mozilla Data Collective where we're creating a two-sided marketplace to make it really easy to have provenance-related data that you can then license to any model trainer out there in the world.

The Mozilla Data Collective folks are literally in conversation with every radio station on the planet. They're like, "How do we license audio data from every single language with a transcription of it?" And how do we scrub it just good enough that model trainers can then use it?

So I'm intrigued by the people playing in that data licensing space and others. And of course, that top of the stack – there are just so many companies doing interesting work there. I'm really a big fan of what the LangChain folks are doing. I'm a really big fan of what all the orchestration layers are doing, the deepset people are doing on the RAG layer.

I think there's so much – if there's anything people should take away, it's that there's actually a lot of vibrancy in the open source ecosystem. I think what's missing is a connective glue layer to just make it easier for developers.

I want to live in a world where a developer finds it just as easy to use an open stack as it is to use the OpenAI API. That's the world I want to live in.

The one thing I didn't mention is that compute layer – that's going to be the hardest for us to make a dent in. There are companies like Flower AI that I'm intrigued by for federated learning across heterogeneous data sets, heterogeneous hardware. That could be a way. Imagine a world where compute was not a scarcity mindset, but it was an abundance mindset. That would be a really interesting AI world for us to live in. So I'm intrigued by what that federated space might be able to do there.

Specialization and the Twitter Analogy

Ksenia: I'm a big fan of federated learning. I think we still haven't yet seen what it's capable of. And if we think about small models again, and when they go to all the devices, how cool would that be if it all can be connected and we're not dependent on GPUs or whatever big compute we need?

Raffi: Exactly.

Ksenia: But if we talk about small language models, which I read in your blog post you're betting on them as well – and that's what I noticed about open source models when I was writing about it last week – is that we are moving to specialization. It's not one big model for everything, but you know, one for coding, one for this, one for that.

Again, if you talk about companies adopting it, when does it make sense to connect three models, or again, use one big one? Because specialization is great, but also it adds complexity. I'm just trying to build this decision-making process for companies to be able to use open source.

Raffi: I look at it almost in the exact same way that I look at it from my previous jobs. You know, when I was at Twitter a decade and a half ago at this point, Twitter was written in Ruby on Rails. And then once we fully understood what the application stack looked like, we started moving parts of it to the JVM to harden it, to make it more efficient, to make it faster, more performant, et cetera.

I think the exact same thing is playing out in this space right now. Like, you know, I have a rack full of computers next to me right now that I hack on on the weekends. And even I use the OpenAI API to do a lot of my work, just to help me form an idea, to rapidly prototype, et cetera.

But then when I get to a place that I want to deploy it, I start looking at it and think, "Oh, should I do this part in Qwen? Should I do this part in something else?" So I think it's part of that maturity curve of ideas right now.

You start in a place where you don't exactly know what you're doing. So you need a general-purpose tool to help you sort that out. And as you start to get more solidification in the kinds of things you want to build, that's when you can start to really optimize and find the right model at the right time.

Now there are also different constraints that you might want to take into account, right? I might want to run things in a disconnected environment. I might want to run things on-device versus not. I do a lot of work with open source in an African context where the connectivity is not so great and you actually want it to run on-device.

But again, you might build that experimental application in a really good Wi-Fi environment. And then once you're actually ready to deploy it, then you start either fine-tuning or you figure out what's the right model you can run on-device so you can go into a disconnected environment.

Another example might be autocomplete on a web browser. You can imagine a world – there's no reason for us to be sending all that information to a large model remotely. Then you've added latency, you've added all these things. You want to do that kind of work as close to the user as possible so you can be really, really sensitive to keystrokes, really sensitive to timing, really sensitive to battery power. If you're running it locally, why hit the network for every single keystroke?

So I think those constraints might be part of the driving factor. But I think the overall thing is still: as you go from experimentation to production, somewhere along that line is the right time to think about making those transitions. And my job is to move that line as close as I can to experimentation.

Why Data Matters

Ksenia: Why does Mozilla focus so much on data?

Raffi: In the sense of user data and user privacy and things like that? Well, I feel that data, especially in the AI world, is one of the biggest tipping points. Besides the paradigm that most of the AI providers are thinking about right now – which is "data is free, we just scraped it from the web" – that might also just be last year's battle.

But I do think two things. One is there are a bunch of data sets that haven't been on the web that could be really useful. And if we can change the dynamics around them – whether it be indigenous languages or whether it be genetic data of different communities, things like that – people might deserve some form of either recognition or compensation for it. I find those to be the human-centered version of data collection.

And so how can Mozilla enable that? I think it's a very important thing. I'm excited by the work the Mozilla Data Collective is doing on making those really easy to license, having one-click licensing mechanisms, one-click purchasing mechanisms. We as Mozilla don't intend to make a lot of money off that. We want to enable people to do it. We'll just maybe do a small transaction cost, but we want to enable more interesting experiences to happen on the web. But I want to do it in such a way that actually truly respects the people that were part of that value chain to get you to that experience.

But then there's the other question, which is: I really care – I feel that if these big model providers have already treated data on the web as free for them to use, they're coming after yours and my data next. They're going to try to get to my private data and stuff that's near and dear to me.

So I'm really interested in data in the sense of: How do we start thinking about protections for user context? How do we make user context portable across different sets of model providers so that we can invert that ownership paradigm? It's not that the model provider owns my context – I own my context and I can make it portable and I can expose different aspects of it depending on what we're trying to do at any given moment.

So that's the thing that I find interesting. I think it's very compatible with how Mozilla thinks about the user agent. Right now, the web browser is my agent. It's supposed to protect me. It gives me privacy. It protects me from ads, et cetera.

But now in this new agentic world, this Layer 8 world where intelligence is starting to mediate, that mediation is starting to not be my user agent anymore. So I think that having my data be secure and private in that interaction is going to be incredibly important.

Ksenia: This is a race so hard to win, considering that you can just push a button and everything in your iPhone becomes connected to Google services and then it's personalized AI, but also your data is out there in the air. So I don't know how to win this race for open source.

Raffi: Yeah, I mean, I don't know the answer either, but I think this is a fight worth having. And I think it starts with having some credible experiences that we can really talk about and how we want to show up to users.

So my canonical example here is Signal. Signal showed up in the sense that it drove privacy as part of the communications conversation. It wasn't even needed for every single user to use Signal. But the fact that Signal existed forces people like WhatsApp, Telegram, iMessage – now RCS is starting to think about having to have encryption on it because it's being driven by that conversation.

So if Mozilla or people aligned with the Mozilla Manifesto and our values can start building what these interfaces could look like where my context stays with me and doesn't move and can still be useful in a lot of ways, I think that could be something that could just drag the ecosystem a little more toward user privacy than where we are today.

Ksenia: Conversations matter.

Raffi: Correct. Conversations matter.

The Firefox Lesson

Ksenia: Here's a little tricky question. Mozilla has a fascinating history. What you're saying is that what you did with the web, you want to do with AI. At one point, Firefox indeed challenged Microsoft, brought it down to 55%. But then Chrome came and brought Firefox to 5%. So how can we make sure that the world of AI, even if we disrupt it first, will not be consolidated again?

Raffi: I think these are all pendulum swings. And so I would note that even though Firefox's usage has gone down, Google had to release an open source browser. We had to still maintain web standards. We still had to do all the things.

So the battle that we were trying to win by releasing Firefox – we won it. We might not be that big pillar that everyone's using anymore, but it's because of us that the web is open. It's distributed, et cetera.

And so yes, there's some consolidation that occurred, but the important thing is web standards. The important thing was open source as part of the conversation. The important thing is that anyone can still participate in the web.

That's not the direction AI is going in right now. And so that's why I'm trying to drag Mozilla into that fight. Because if we can start to drive the conversation through credible alternatives, web standards, more people using it because of open source – I think that exact same playbook might work again in this space.

And sure, we're not going to be the model provider. There's not enough money in the world for us to compete on the model side. But I think if we can just get the other pieces in place, we can get an entire ecosystem speaking the same language. And I think it's kind of like a rebel alliance, almost, that we can start to give credible alternatives and drive the conversation. We're all part of the rebel alliance for different reasons.

But in the end, if it means that user data is secure, context is ours not someone else's, there's choice in the ecosystem, I can trust the outputs of the LLMs and trust the outputs of the chatbots, if I can surf the web without being worried – then Mozilla will have won that fight. And that's the fight that I'm trying to take.

Practical Steps for Companies

Ksenia: It's a very important fight. I'm just trying to see from a company's perspective how to showcase to them that they should try. And if you can give advice to a company that is still in the experimentation mode, what will be your one, two, three steps for them to start thinking about it? How to implement open source for their company?

Raffi: What I would say for a company is: Try to instrument choice into your engineering stack as early as you can.

This is the reason why we built things at Mozilla AI like the Choice Suite. It's really easy to do. It's just a small shim. Put those things into your application as early as you can. You don't know when you might want to switch to open source. You don't know when you're going to exit your experimentation stage. But give yourself the exit door as early as you can so that you can then do it later when the time is right.

Don't make it a massive Herculean engineering effort later. Make it super small. It's like an NPM install or a UV install and you just do one line of code or five lines of code. You just do that at the beginning, and that investment gives you the exit door later.

So try to do those types of things as early as you can. Just like any good engineer would – engineers are usually thinking about: How can I refactor this later? How can I test this later? How can I do all those things later? So just think about those things as early as you can in the process.

And Cursor and others also take those prompts really quite well. You'd just be like, "I want to integrate AnyLLM into this," and it just happens. It might not even be five lines of code. It might just be one prompt you do at the beginning of your project that gives you that flexibility later. So that's, I think, the biggest piece of advice.

And then the second one is: Just be open and see what's going on in the ecosystem. Like I said before, the vibrancy in the open source ecosystem is quite amazing. It's quite lovely. So go read your favorite blogs. Listen to people like you to understand what's going on out there. Because maybe one of those things you'll be like, "Oh, I should swap that for that," and it could show up as part of that conversation.

Making It Simple

Ksenia: I would like to have a clear understanding: How can a child or a non-technical person just install an open source model and just use it for whatever, for their phone? That should be easier.

Raffi: I would love to get to that world! That world is not the world we live in yet, but I think we can get there.

Ksenia: This year, right?

Raffi: 100% this year! I mean, like right now, any person on a Mac who can pull up a terminal can install a local open source model with just brew install ollama, right? It's already a one-liner, but you need to know how to use a terminal.

So we can just eliminate that this year. That would be amazing, right? I feel like we can get there. I feel like this is a slam dunk. We just got to do it.

Einstein's Dreams

Ksenia: Well, that's been a very fascinating conversation. And I like to finish all my conversations with a question about a book. A book that recently or long ago influenced how you think about life and how you think about your work, your values. What was that book?

Raffi: Oh, that's such a great question. And I'm not prepared for this question.

I would say that one of the books that probably has most impacted me is a book by Alan Lightman called Einstein's Dreams. And so what it is is a set of vignettes – I want to say it's 20, I could be wrong on the number – which are all different versions of how time could flow differently.

What if we lived in a world where time moved slower the higher altitude you were? Or what if we lived in a world where time went in a circle over and over and over again? And what would that mean as implications to life, love, friendship, et cetera?

And so that was literally the first book I ever gave the woman I was dating, who then became my wife. So if you were looking for one book that changed my life, that was probably the book.

Ksenia: That's amazing. I would love to read this book. It sounds very interesting. Thank you so much. Thank you for this conversation. Let's hope this year will make a lot of progress in open source.

Raffi: Thank you for having me. This was such a pleasure.

Modular software design

Mike's Notes

A good, clear explanation of modular system design by Chris Loy.

Resources

References

  • Reference

Repository

  • Home > Ajabbi Research > Library >
  • Home > Handbook > 

Last Updated

25/01/2026

Modular software design

By: Chris Loy
Chris Loy: 24/01/2025

Hey, I'm Chris. Nice to meet you!

I spend my professional life writing code, training machine learning models, building software products and running tech teams. I'm a startup founder with a successful exit, and in my career I've been CTO, a developer and a data scientist. I've worked at companies big and small, mentored junior engineers and data scientists from across Europe, and served as an advisor for some companies. Throughout my career I have been lucky enough to work with and hire some amazingly smart people.

This is my website, where I write about tech, data and AI, as well as some of my other interests and hobbies. Those include music and photography, and I also use this site to document the books I read..

Whenever people ask me about my philosophy for building software, top of my list is always to say that I am a proponent of modular design. To explain what I mean by that, it is first necessary to understand a few of the fundamental theories that underpin how I view software engineering as a discipline, and then we can explore how those come together in a philosophy of modularity.

Systems

Software engineering is a discipline for the design and implementation of complex systems of interacting elements. If a program is intended to serve a single purpose by completing just one task, that task can be broken down into smaller tasks, which can themselves be broken down further and further.

The result of conceptually atomising monolithic operations is a network of interdependent operations that comprise the wider system. The boundaries of this system are wide and varied - how data is written and read from hardware devices, communication of information between geographically separated networks, even the knowledge and opinions of humans interacting with websites or smartphone apps. Whatever we are building, our control extends only partway through the network.

Systems thinking is the embracing of the vastness and complexity of all the moving parts that influence the operation of software. The challenges we face therefore come from the limits of our own capacity for comprehension.

Abstraction

To address this complexity, the primary philosophical tool in the software engineer’s belt is abstraction. To abstract something is to hide its complexity by defining only the way that it interacts with the world around it, and to deliberately behave in a way that ignores the inner workings of the thing.

This is the fundamental thought process in software development, first articulated by Dijkstra in his essay “The Humble Programmer”. The central thesis of that essay, written in the 1970s before the invention of the microprocessor, was that as programmers we are developing systems too complex to hold fully within our mind all at once. At the time, this was a unique and forward-thinking insight - today it is obvious.

Abstraction teaches us that software engineering is a philosophical discipline - one in which our goal is to enhance our ability to reason about complex systems by effectively abstracting away complexities that lie outside our immediate sphere of interest. Components that are behind or within the components we directly interact with are ignored - only the immediate effect on us is relevant.

Encapsulation

To make this kind of abstraction possible, it is necessary that components within the system encapsulate their complexity such that others can abstract it away when interacting with them.

This concept is often talked about within the domain of object-oriented design - a discipline that is perhaps less fashionable than it once was, but still underpins much of the fundamental way in which software is best built. The core idea is that a component should encapsulate its functionality and only present what it does to the outside world, not how it does it. It is not necessary to understand what happens to the engine of a car when you depress the accelerator pedal - only to know that it goes faster.

In normal language, we would call the surface of encapsulated functionality an interface, but our industry loves three letter acronyms, and so we universally tend to use the clunky term Application Programming Interface for this, or API for short.

Recursion

Recursion is a simple-to-explain, difficult-to-grasp context from mathematics that is all over software design. The simple explanation is that it is just the concept of a system in which components can be self-referential within their category. To give an example, I have two parents, and each of them had two parents, and so on. The “and so on” in this sentence is the recursion. This one very simple relationship belies a hugely complex tree of connections - my family tree, in this case.

Through this lens, there are no limits to encapsulation, where each layer of abstraction can be nested within arbitrary other layers of abstraction. Components encapsulate components, recursively. A component has many components within it, each of which has many more. And so on.

The ability to zoom into the right layer of abstraction within this tree of complexity is how we accomplish the task of writing software. By well defining interfaces around components, by abstracting the details of how they work and instead just understanding what they do, and by navigating through a recursive tree of components, we are able to reason about the behaviour of our system at all levels of abstraction.

Modularity

What then, is modular software design? Well, it is an acceptance of the above philosophy, and an embracing of the implications, specifically in thinking about how systems evolve over time. For me, this fundamentally comes down to designing systems such that you maximise your ability to effect change through adding, moving or replacing components, rather than modifying existing ones. This motivation comes from the hard-earned experience that modifying working software is hard, but replacing or adding software can be easy if your setup is optimised for it.

By thinking of systems as networks of interconnected and nested components, and adopting a strategy of ensuring all of those components have well defined interfaces at each layer of abstraction, we build software that is flexible, resilient and easy to reason about.

Universe Is Not a Computer Simulation, New Study Says

Mike's Notes

I'm glad they finally figured this one out.

In case there are any other confused people out there, Nature is 100% analogue. 

Resources

References

  • Mir Faizal et al. 2025. Consequences of Undecidability in Physics on the Theory of Everything. Journal of Holography Applications in Physics 5 (2): 10-21; doi: 10.22128/jhap.2025.1024.1118

Repository

  • Home > Ajabbi Research > Library >
  • Home > Handbook > 

Last Updated

24/01/2026

Universe Is Not a Computer Simulation, New Study Says

By: News Staff
SciNews 30/10/2025

.

A team of physicists from Canada, the United States, the United Kingdom and Italy has mathematically shown that our Universe is built on a type of understanding that exists beyond the reach of any algorithm.

“It has been suggested that the Universe could be simulated,” said Dr. Mir Faizal, a physicist at the University of British Columbia Okanagan.

“If such a simulation was possible, the simulated Universe could itself give rise to life, which in turn might create its own simulation.”

“This recursive possibility makes it seem highly unlikely that our Universe is the original one, rather than a simulation nested within another simulation.”

“This idea was once thought to lie beyond the reach of scientific inquiry.”

“However, our recent research has demonstrated that it can, in fact, be scientifically addressed.”

“Our research hinges on a fascinating property of reality itself.”

“Modern physics has moved far beyond Newton’s tangible ‘stuff’ bouncing around in space. Einstein’s theory of relativity replaced Newtonian mechanics. Quantum mechanics transformed our understanding again.”

Today’s cutting-edge theory — quantum gravity — suggests that even space and time aren’t fundamental. They emerge from something deeper: pure information.

“This information exists in what physicists call a Platonic realm — a mathematical foundation more real than the physical Universe we experience. It’s from this realm that space and time themselves emerge.”

The authors demonstrated that even this information-based foundation cannot fully describe reality using computation alone.

They used powerful mathematical theorems — including Gödel’s incompleteness theorem — to prove that a complete and consistent description of everything requires what they call non-algorithmic understanding.

“Think of it this way. A computer follows recipes, step by step, no matter how complex. But some truths can only be grasped through non-algorithmic understanding — understanding that doesn’t follow from any sequence of logical steps,” they said.

“These Gödelian truths are real, yet impossible to prove through computation.”

“Here’s a basic example using the statement, This true statement is not provable.”

“If it were provable, it would be false, making logic inconsistent. If it’s not provable, then it’s true, but that makes any system trying to prove it incomplete. Either way, pure computation fails.”

“We have demonstrated that it is impossible to describe all aspects of physical reality using a computational theory of quantum gravity,” Dr. Faizal said.

“Therefore, no physically complete and consistent theory of everything can be derived from computation alone.”

“Rather, it requires a non-algorithmic understanding, which is more fundamental than the computational laws of quantum gravity and therefore more fundamental than spacetime itself.”

“Since the computational rules in the Platonic realm could, in principle, resemble those of a computer simulation, couldn’t that realm itself be simulated?”

“No. But our work reveals something deeper.”

“Drawing on mathematical theorems related to incompleteness and indefinability, we demonstrate that a fully consistent and complete description of reality cannot be achieved through computation alone.”

“It requires non-algorithmic understanding, which by definition is beyond algorithmic computation and therefore cannot be simulated. Hence, this Universe cannot be a simulation.”

According to the team, the findings have profound implications.

“The fundamental laws of physics cannot be contained within space and time, because they generate them,” said Origin Project Foundation researcher Dr. Lawrence M. Krauss.

“It has long been hoped, however, that a truly fundamental theory of everything could eventually describe all physical phenomena through computations grounded in these laws.”

“Yet we have demonstrated that this is not possible. A complete and consistent description of reality requires something deeper — a form of understanding known as non-algorithmic understanding.”

“Any simulation is inherently algorithmic — it must follow programmed rules,” Dr. Faizal said.

“But since the fundamental level of reality is based on non-algorithmic understanding, the Universe cannot be, and could never be, a simulation.”

The study was published in the June 2025 issue of the Journal of Holography Applications in Physics.


Consequences of Undecidability in Physics on the Theory of Everything

By: Mir Faizal, Lawrence M. Krauss, Arshid Shabir, Francesco Marino
ArXiv: 29/07/2025

Abstract

General relativity treats spacetime as dynamical and exhibits its breakdown at singularities. This failure is interpreted as evidence that quantum gravity is not a theory formulated within spacetime; instead, it must explain the very emergence of spacetime from deeper quantum degrees of freedom, thereby resolving singularities. Quantum gravity is therefore envisaged as an axiomatic structure, and algorithmic calculations acting on these axioms are expected to generate spacetime. However, Gödel’s incompleteness theorems, Tarski’s undefinability theorem, and Chaitin’s information-theoretic incompleteness establish intrinsic limits on any such algorithmic programme. Together, these results imply that a wholly algorithmic “Theory of Everything” is impossible: certain facets of reality will remain computationally undecidable and can be accessed only through non-algorithmic understanding. We formalize this by constructing a “Meta-Theory of Everything” grounded in non-algorithmic understanding, showing how it can account for undecidable phenomena and demonstrating that the breakdown of computational descriptions of nature does not entail a breakdown of science. Because any putative simulation of the universe would itself be algorithmic, this framework also implies that the universe cannot be a simulation.

...

Recent work on system messaging

Mike's Notes

The work this week. 

I found a problem with the existing Pipi 6 era Messaging Engine (msg). It needed to be replaced to support the richer Pipi 9 internal environment of autonomous agents that can self-organise and move.

I spent days staring into space, and then the solution became very clear while daydreaming 😴 between morning coffee and ice cream summer afternoons 😎. Slow but getting there.

Resources

References

  • Enterprise Integration Patterns: Designing, Building, and Deploying Messaging Solutions (Addison-Wesley Signature Series), by Gregor Hohpe and Bobby Woolf.
  • Integration Patterns (Patterns & Practices). Microsoft.

Repository

  • Home > Ajabbi Research > Library > Authors > Gregor Hophe
  • Home > Handbook > 

Last Updated

25/01/2026

Recent work on system messaging

By: Mike Peters
On a Sandy Beach: 22/01/2026

Mike is the inventor and architect of Pipi and the founder of Ajabbi.

Pipi 4 (2005-2008)

A simple internal messaging system was invented and built for Pipi 4 around 2005. It had a messaging store and handled interactions between different internal systems. It was not called a messaging system; it was an unnamed part of the Metadata Repository. It was built in CFML code and ran on MS SQL Server.

Pipi 6 (2017-2019)

After reading about Apache Kafka and RabbitMQ, I realised that Pipi 4 had contained a primitive internal messaging system, 5 years before Kafka. A new, quick-and-dirty broker-based messaging system, similar to RabbitMQ, was built as a CFML module to send messages across hundreds of modules when Pipi 4 was rebuilt from memory as Pipi 6. The work of Gregor Hohpe and Bobby Woolf was an inspiration. Martin Fowler was an enormous influence on everything.


Pipi 9 (2023-

It has taken all week to figure out a solution. I ended up splitting the role of the engine

  • The existing Pipi 6 messaging module is now being fully refactored into the Pipi 9 Messaging Engine (msg). Previously, it used a wrapper to make it appear to be an agent. Some minor changes are being made to the Namespace Engine (nsp).
  • The new Messaging Engine (msg) is used to create the local messaging systems via the Factory Engine (fac). The Factory Engine (fac) will place a local message store using a separate embedded database inside each agent to connect to its Messaging Endpoint. Each system (made up of many agents) has its own messaging store attached to the system router.

As agents dynamically self-assemble in response to events, the messaging system always works.

The new Engine closely follows the patterns in Enterprise Integration Patterns and even uses the same icons, aka "Gregorgrams".

Summary of changes underway

  • Internal system messaging between hundreds of autonomous agents.
  • Possible because of the Namespace Engine (nsp) built into Pipi 8.
  • External messaging between Pipi and applications, such as databases, cloud platforms and containers, will be handled using an open-source messaging system, such as Kafka or RabbitMQ.
  • The two messaging systems need to interconnect. I don't know how yet! 😇
  • Event messaging and Pub/Sub are the most common; others include CQRS, Dead Letter, and Point-to-Point.
  • Each agent has a state.
  • Essential for robust Pipi self-management.
  • The pipiWiki will automatically document the configuration of each engine, including messaging (Gregorgrams) diagrams. See link to the Primative Engine (prm) mockup above.
  • The messaging configuration can change dynamically.
  • The Messaging Engine will be accessible for configuration via the coming msg module in the Agent Workspace

Understanding the Hidden Markov Model

Mike's Notes

A Markov Chain is a collection of states with transition probabilities between them.

Markov is used extensively in Pipi 9. Here is some excellent background explanations from Vivek Vinushanth Christopher on Built In.

Vivek is a fantastic teacher with an excellent YouTube channel on Data Science.

While the core code of Pipi will be closed source, the weights, algorithms, possible states, ontologies used, and related materials will be made freely available. The front-end workspaces will be shared on GitHub, GitLab, and other platforms.

The planned user documentation will include references to popular books, articles, and easy-to-understand videos from people like Vivek.

Resources

References

  • Reference

Repository

  • Home > Ajabbi Research > Library >
  • Home > Handbook > 

Last Updated

24/01/2026

Understanding the Hidden Markov Model

By: Vivek Vinushanth Christopher, Updated By: Brennan Whitfield
Built In: 14/08/2024

Vivek Vinushanth Christopher is a senior software engineer for WSO2 where he has worked since 2019. He has also served as a teaching assistant at University of Moratuwa. Christopher holds a bachelor’s degree in computer science and engineering. 

Hidden Markov models are probabilistic frameworks where the observed data are modeled as a series of outputs generated by one of several (hidden) internal states. Both Markov and hidden Markov models are engineered to handle data that can be represented as a sequence of observations over time.

Hidden Markov Model Definition

A hidden Markov model is a probabilistic framework used to predict the results of an event based on a series of observations with one or several hidden internal states.

While a Markov model or Markov chain concerns stochastic (random) process states that are visible to the observer, a hidden Markov model pertains to stochastic processes where states can be hidden or not directly visible to the observer.

What Is a Hidden Markov Model (HMM)?

A hidden Markov model (HMM) is utilized when we can’t observe the states of a stochastic process themselves, but only the result of some probability function (observation) of the states. HMM is a statistical Markov model in which the system being modeled is assumed to be a Markov process with unobserved (hidden) states.

Hidden Markov models can be used to identify underlying patterns or structures in sequential data. This makes it applicable for research and tasks in machine learning (including natural language processing and speech recognition), bioinformatics and gene analysis as well as time-series forecasting. 

For example, in speech recognition tasks, a hidden Markov model algorithm may be implemented to measure the probability of a certain word or lack of words occurring in a given audio recording. In this case, the occurrence of specific words or silence in the recording can represent states, and volume of speech throughout the recording can represent observations. By knowing observations (volume), this information can be used by the algorithm to determine the likelihood of hidden states — or words and lack of words in this example — and predict the most probable word being spoken.

Mathematically, here is how Markov models and hidden Markov models differ:

  • Markov model: Series of (hidden) states z={z_1,z_2………….} drawn from state alphabet S ={s_1,s_2,…….𝑠_|𝑆|} where z_i belongs to S.
  • Hidden Markov model: Series of observed output x = {x_1,x_2,………} drawn from an output alphabet V= {𝑣1, 𝑣2, . . , 𝑣_|𝑣|} where x_i belongs to V.

Hidden Markov Model Assumptions

A hidden Markov model is built on several assumptions, including:

1. Output Independence Assumption

Output observation is conditionally independent of all other hidden states and all other observations when given the current hidden state.

Eq. 5: Output independence assumption. | Image: Vivek Vinushanth Christopher

2. Emission Probability Matrix

Probability of hidden state generating output v_i given that state at the corresponding time was s_j.

Markov Model Assumptions

Markov models are developed based on two assumptions:

1. Limited Horizon Assumption

Probability of being in a state at a time t depend only on the state at the time (t-1).

Equation 1: Limited horizon assumption. | Image: Vivek Vinushanth Christopher

That means state at time t represents enough summary of the past to reasonably predict the future. This assumption is an order-1 Markov process. An order-k Markov process assumes conditional independence of state z_t from the states that are k + 1-time steps before it.

2. Stationary Process Assumption

Conditional (probability) distribution over the next state, given the current state, doesn’t change over time.

Equation 2: Stationary process assumption. | Image: Vivek Vinushanth Christopher

That means states keep on changing over time but the underlying process is stationary.

Notation Convention

  • There is an initial state and an initial observation z_0 = s_0
  • s_0: Initial probability distribution over states at time 0.
  • Initial state probability: (π)
  • At t=1, probability of seeing first real state z_1 is p(z_1/z_0).
  • Since z0 = s0:

Notation convention. | Image: Vivek Vinushanth Christopher

State Transition Matrix

State transition matrix. | Image: Vivek Vinushanth Christopher

𝐀𝐢,𝐣: probability of transitioning from state i to state j at any time t.

The following chart is a state transition matrix of four states, including the initial state:

Fig. 2: State transition matrix chart. | Image: Vivek Vinushanth Christopher

2 Questions Answered in a Markov Model

  1. What is the probability of particular sequences of state z?
  2. How do we estimate the parameter of state transition matrix A to maximize the likelihood of the observed sequence?

Probability of Particular Sequences in a Markov Model

Eq.4: Finding probability of particular sequence. | Image: Vivek Vinushanth Christopher

Consider the state transition matrix above. Let’s determine the probability of sequence:

{z1 = s_hot , z2 = s_cold , z3 = s_rain , z4 = s_rain , z5 = s_cold}

P(z) = P(s_hot|s_0 ) P(s_cold|s_hot) P(s_rain|s_cold) P(s_rain|s_rain) P(s_cold|s_rain)

= 0.33 x 0.1 x 0.2 x 0.7 x 0.2 = 0.000924

Hidden Markov Model Example

Consider the example given below, which elaborates how a person feels in different climates.

Fig.3: Markov model as finite state machine. | Image: Vivek Vinushanth Christopher 

  • Set of states: (S) = {Happy, Grumpy}
  • Set of hidden states: (Q) = {Sunny , Rainy}
  • State series over time: = z∈ S_T
  • Observed states for four day: = {z1=Happy, z2= Grumpy, z3=Grumpy, z4=Happy}

The feeling that you understand from a person emoting is called the observations, since you observe them. The weather that influences the feeling of a person is called the hidden state, since you can’t observe it.

Emission Probabilities

In the above example, feelings (“Happy” or “Grumpy”) can be only observed. A person can observe that a person has an 80 percent chance to be “happy” given that the climate at the particular point of observation is sunny. Similarly there’s a 60 percent chance of a person being “grumpy” given that the climate is rainy. The 80 percent and 60 percent are emission probabilities since they deal with observations.

Transition Probabilities

When we consider the climates (hidden states) that influence the observations, there are correlations between consecutive days being sunny or alternate days being rainy. There is an 80 percent chance for the Sunny climate to be in successive days, whereas there’s a 60 percent chance for it to be rainy on consecutive days. The probabilities that explain the transition to/from hidden states are transition probabilities.

How Does a Hidden Markov Model Work?

A hidden Markov model answers three primary questions:

  1. What is the probability of an observed sequence?
  2. What is the most likely series of states to generate an observed sequence?
  3. How can we learn the values for the HMMs parameters A and B given some data?

Probability of Observed Sequence

We have to add up the likelihood of the data x given every possible series of hidden states. This will lead to a complexity of O(|S|)^T. Hence, two alternate procedures were introduced to find the probability of an observed sequence.

Forward Procedure

Calculate the total probability of all the observations (from t_1) up to time t:

𝛼_𝑖 (𝑡) = 𝑃(𝑥_1 , 𝑥_2 , … , 𝑥_𝑡, 𝑧_𝑡 = 𝑠_𝑖; 𝐴, 𝐵)

Backward Procedure

Similarly calculate total probability of all the observations from final time (T) to t:

𝛽_i (t) = P(x_T , x_T-1 , …, x_t+1 , z_t= s_i ; A, B)

A tutorial on how the hidden markov model works. | Video: ritvikmath

Hidden Markov Model Using Forward Procedure

Below is an example of a hidden Markov model using forward procedure.

  • S = {hot,cold}
  • v = {v1=1 ice cream ,v2=2 ice cream, v3=3 ice cream}, where V is the Number of ice creams consumed in a day.
  • Example Sequence: = {x1=v2,x2=v3,x3=v1,x4=v2}

Fig.4: Given data as matrices. | Image: Vivek Vinushanth Christopher

Generated finite state machines for HMM. | Image: Vivek Vinushanth Christopher

We first need to calculate the prior probabilities, that is, the probability of being hot or cold previous to any actual observation. This can be obtained from S_0 or π. From Fig.4, S_0 is provided as 0.6 and 0.4, which are the prior probabilities. Then based on Markov and HMM assumptions, we follow the steps in the figures below to calculate the probability of a given sequence.

1. First Observed Output x1=v2

Fig. 6: Step 1 of the HMM. | Image: Vivek Vinushanth Christopher

2. Observed Output x2=v3

Fig. 7: Step 2 of HMM illustrated. | Image: Vivek Vinushanth Christopher

3. Observed Output x3 and x4

Similarly for x3=v1 and x4=v2, we have to simply multiply the paths that lead to v1 and v2.

Fig. 8: Step 3 and 4 of HMM. | Image: Vivek Vinushanth Christopher

4. Maximum Likelihood Assignment

For a given observed sequence of outputs 𝑥 𝜖 𝑉_𝑇, we intend to find the most likely series of states 𝑧 𝜖 𝑆_𝑇. We can understand this with an example found below.

Fig.9: Data for example two. | Image: Vivek Vinushanth Christopher

Fig.10: Markov model as a finite state machine from Fig.9. data. | Image: Vivek Vinushanth Christopher

The Viterbi algorithm is a dynamic programming algorithm similar to the forward procedure which is often used to find maximum likelihood. Instead of tracking the total probability of generating the observations, it tracks the maximum probability and the corresponding state sequence.

Consider the sequence of emotions: H,H,G,G,G,H for six consecutive days. Using the Viterbi algorithm we will find out the more likelihood of the series.

Fig.11: The Viterbi algorithm requires to choose the best path. | Image: Vivek Vinushanth Christopher

There will be several paths that will lead to sunny on Saturday, and many paths that lead to rainy on Saturday. Here, we intend to identify the best path to sunny or rainy Saturday and multiply with the transition emission probability of “Happy,” since Saturday makes the person feel “Happy.”

Let’s consider a sunny Saturday. The previous day, Friday, can be sunny or rainy. Then we need to know the best path up to Friday, and then multiply with emission probabilities that lead to a grumpy feeling. Iteratively, we need to figure out the best path at each day ending up in more likelihood of the series of days.

Fig.12: Step 1. | Image: Vivek Vinushanth Christopher

Fig. 13: Step 2. | Image: Vivek Vinushanth Christopher

Fig.14. Iterate the algorithm to choose the best path. | Image: Vivek Vinushanth Christopher

 The algorithm leaves you with maximum likelihood values and we now can produce the sequence with a maximum likelihood for a given output sequence.

5. Learn the Values for the HMMs Parameters A and B

Learning in HMMs involves estimating the state transition probabilities A and the output emission probabilities B that make an observed sequence most likely. Expectation-Maximization algorithms are used for this purpose. A commonly-used algorithm known as the Baum-Welch algorithm falls under this category and uses the forward algorithm.

Frequently Asked Questions

What is a hidden Markov model?

A hidden Markov model is a statistical model in which the system being modeled is assumed to be a Markov process with unobserved (hidden) states. It’s used when you can’t observe the states themselves but only the result of a probability function of the states

What’s the difference between a hidden Markov model vs. a Markov model?

    • A hidden Markov model is a probabilistic model used when the results are the product of one of several hidden internal states. 
    • A Markov model is a probabilistic model used to predict a sequence of events when the internal states can be observed.   

What are the basic problems of hidden Markov model?

The three basic problems of a hidden Markov model (HMM) include:

    1. Evaluation or Likelihood Problem: Given an HMM λ = (A, B) and an observation sequence of O = O_1 O_2, … O_T, determine the likelihood P(O'λ).
    2. Decoding Problem: Given an HMM λ = (A, B) and an observation sequence of O = O_1 O_2, … O_T, determine the optimal hidden state sequence of Q (set of finite states).
    3. Learning Problem: Given an observation sequence of O = O_1 O_2, … O_T, learn and adjust the HMM parameters A and B to maximize the probability P(O'λ).