HACKER Q&A
📣 samsquire

Can we create compositional architecture, APIs from embeddings?


I am not talking about using ChatGPT or a model to write code. I am trying to think what I should code against that isn't an API that leads to an architecture that composes naturally and is easy to programmatically transform.

I'm a complete beginner at machine learning and know almost nothing about AI.

I read about the addition of vectors creates a new vector with the meaning or relationships of that new vector is associated with what was added. So could we use that to mutate software architecture?

My dream: I can drastically change the architecture of my software by changing its configuration, a diagram file or definition of meaning and nothing shall break. No behaviour of what I've implemented shall break.

I want to configure extremely high level and low level decisions such as load balancers, multiplex, agregate, introduce enterprise design patterns, caching and data flow by tweaking configuration.

Every architect's dream.

The question becomes, what language is this configuration of the architecture in?

APIs are too rigid. Using AI models to generate code leads to code that needs to be maintained or regenerated from an updated prompt. But you'll have to tell the AI to keep compatible with the previous version when you mutate the architecture.

Could someone help me understand how the representation of meaning in an AI model and its relationship to ORDERING of tokens of a prompt.

Something I've been thinking of recently, when I was growing up I ported a markov chat bot from python to msn plus javascript and I trained the markov bot on the bible and I configured it to reply to messages to me from the markov chain.

I've been thinking whether or not software architecture and its APIs can be configured from markov chains and embeddings/vectors similar to ChatGPT.

I want it to be extremely cheap and easy to change the architecture of software by representing behaviours with vectors, so code is coded against relationships and vectors rather than rigid APIs, so we can dynamically and drastically change the architecture of software by changing which vectors are being used.

I want seamless merging of behaviour that makes sense.

For example,

you have a complicated architecture and you want to change the architecture without changing what is already written.

I wrote an epoll echo server, an interpreter, a compiler and a lightweight thread scheduler.

How do I combine it all together?

An example is service mesh or microservice configuration. It's a pain and a complexity nightmare. There's usually a bottleneck in the system and a reason why software architecture is the way it is, and there's always a better architecture that leads to better maintenance properties. What if you could transform the architecture of your software by changing the prompt? But skip the English component and program directly against vectors?


  👤 verdverm Accepted Answer ✓
This is something that I think about and try to enable with my project https://github.com/hofstadter-io/hof

Basically the idea is to bring ideas from declarative infrastructure to application implementation through code generation. The tool is really a framework and the technologies and languages live in modules which can be combined in interesting ways. Schemas are where the interoperability and ensuring correctness can happen.