The AI Risk Matrix
The greatest risk of AI-generated applications is their non-deterministic nature. The tendency to hallucinate means special care must be taken to validate LLM outputs.
The greatest advantage of AI-generated applications is speed; they are trivial to create. This means we can move really fast.
The greatest risk of existing tools is their rigidity; they struggle to adapt to emerging business requirements. They have to be fit for purpose and they must be maintained to stay useful and relevant.
The greatest advantage of tools is their precision. Their fitness for purpose ensures deterministic outcomes as long as we use the tool and they have strong reliability guarantees when requirements remain consistent.
The advantage of standards is wide interoperability, documentation and shared understanding. We save time by standing on the shoulders of giants.
How can we combine the best of standards, AI-generated code and existing toolchains to build better software faster?
The Thing That Gets You To The Thing
Code generation has emerged as one of the key use cases of generative AI. Too much time is spent thinking about how to create apps from text-based prompts. This is at the expense of discussions about the potential of AI to build reliable and interoperable systems when used to create the low-level boilerplate code that forms the lion's share of so many codebases.
Given LLMs propensity to hallucinate, we're required to create tooling and services that validate outputs. This is costly and perhaps even beside the point. Rather than use LLMs to generate apps from whole cloth, we should use them to build standards-compliant tools that can create deterministic outputs. These outputs can then be integrated into existing workflows.
AI isn't the thing. It's the thing that gets you to the thing...
We must use AI-generated code not only to produce lines of code but code that can cooperate with legacy and emerging systems, can be understood by maintainers and avoids becoming another app for the slop heap.
The New Standard
Over the next few posts we'll be sharing insights from building a tool we call Foundry.
Foundry is a CLI application that consumes an OpenAPI spec document and generates a working API service in a target language. The generated services can include a number of authentication schemes, middleware and validation mechanisms–all of which are specified within the source OpenAPI file.
The standards-based approach is the key value proposition for Foundry: wherever a known standard exists, we use it. Why the obsessive focus on standards?
Partly because we're lazy. When there is a sound proposed or fully published standard it means less work having to justify and document our approaches. It's one fewer design decision to make and guarantees that for the lifetime of our application there will be documentation and rich examples of our implementation whether we have the time or inclination to create our own documentation or not.
"Be lazy, bro. Just use a standard..."
A standards-centric also means others can create tools and services that connect and interoperate with our services without our explicit involvement.
The AI Workhorse
Lastly, we'll be using LLMs to create a lot of the boilerplate app generation code so we can focus on the best application design possible. Now that we can create code at the speed of a prompt, there is no reason to create well-crafted, standards-based code that's well-documented and delivers outsize value for end-users.
The speed of generative AI allows every team to be design-first
We'll also explore some insights on how to design codebases so that they are optimally suited to absorb AI-created code. It's imperative that we intentionally design our code so that we aren't plagued by the all-too common hallucinations and regressions that arise when using AI as a co-pilot.
Conclusion
Our project will succeed if we use AI to create a tool much faster than we otherwise could have, that itself produces dependable standards-compliant API services every single time. Stay tuned. The journey is just beginning....
Top comments (0)