A combined generative and symbolic AI system to create controllably accurate smart contracts in a chat dialog.
LEXON HYBRID AI is a concept to provide a novel, reliable, chat-based way to write smart contracts for EVM-based blockchains in English. Despite being AI-supported, it will offer precision and transparency.
The solution is a unique AI system that combines an LLM with a symbolic AI toolchain in a new way, powered by deterministic program code that reads like plain English: the Lexon compiler and grammar. (See this grant).
While the LLM service plays an essential role in this architecture, the center of gravity lies with the symbolic AI component that is based on the Lexon language, which provides full transparency, is completely accessible, and easily malleable to best support the user in a chat dialog. Different from prompt-based engineering, achieving the intended outcome is significantly simplified for the user.
The proposed approach is the result of experimentation with Google oX, Microsoft co-pilot, and the Lexon syntax and compiler, to arrive at the most effective way to join generative and symbolic AI for the creation of robust code.
Where an LLM provides unrestricted freedom of expression, the symbolic AI provides the uncompromising reliability that is required to create a smart contract.
.
The result will be a web-based, AI-powered chat app for non-programmers to create accurate EVM-based smart contracts, from a free text that describes the contract in any level of detail.
A verification dialog powered by hybrid AI that understands the contract—which means: has an internal representation of its meaning—helps to make sure that the contract shapes up precisely as intended. This is what generative AI alone cannot offer.
This addresses the problem that non-programmers—businesspeople, legal professionals, or private citizens—know better what they want to express than the programmers they have to work with but today cannot write nor verify smart contracts themselves. This app makes everything plain English.
Because with the absolute accuracy that smart contracts require, the occasional slip-ups of LLMs are problematic. The symbolic AI component of this project adds full accuracy and more productive fine-tuning.
The relative opacity of crypto programming as well as gen AI has hampered the mainstreaming of blockchain tech. The verification dialog flow described below provides transparency with every step.
.
A user will
enter a free description of a smart contract to be created in a chat box
examine the resulting proposed algorithm in English
rework the prompt, or the plain-text algorithm (native-text program)
to finally deploy the smart contract to EVM-based chains.
Behind the scenes,
(#1 / generative and free-form:) the first stage is a communication with an LLM that has the capability to learn domain specific knowledge (“long context”), and is trained to create Lexon texts, i.e., write texts in the special programming language for smart contracts that reads like English and can be compiled to Solidity (see below).
(#2 / symbolic and exact:) The LLM output is checked by the user, then compiled to Solidity by the Lexon compiler. The end result is Solidity code that precisely follows the English “pseudo code”—like algorithm presented in the Lexon text. It has no hallucinations because it is translated from English by fully deterministic compiler technology, rather than machine learning. This is a more restricted procedure that is better suited to achieving accuracy and full transparency.
.
EVM-based chains and freely dictated smart contracts are a perfect fit, because Lexon “speaks Solidity” to effect a reduction of hurdles to everyday use of blockchain tech beyond payments. Long-term, together, AI smart contracts on EVM-based chains can become the household name for DIY contracting for any purpose, private or public, personal, or community governance, company administration or politics, investment, or art.
The goal is to make easily conjured smart contracts a ubiquitous part of daily life for everyone like, e.g., smart phone messenger apps. Not in the form of one-size-fits-all projects but fully bespoke agreements tailored to the billions of situations of real life, to onboard the next billion users to blockchain generally and EVM-based chains specifically.
.
Gen AI has fired up the imagination of millions about new, personalized ways to digitally interact. This creates the opportunity to mainstream smart contract use with the help of AI, as a ubiquitous, personal technology, just like everyone is using chats or Excel today. Its simplicity, combined with its novel twist, makes the proposed Hybrid AI concept a contender for the blockchain-AI killer app.
The prospect to easily create unbreakable, safe, and legally enforceable agreements in plain English, makes a wealth of new, personal forms of organization and trade possible for the first time, just like Ebay created a global flee market. The historic breakthroughs of both generative and symbolic AI allow this for the first time right now.
As the blockchain space seeks to onboard the next billion users, a focus on transparence and ease-of-use is needed—which Lexon brings to both smart contracts and black box generative AI: lifting the veil, giving them both a friendlier appeal and new momentum.
.
Lexon AI can strengthen the image and awareness of smart contracts beyond crypto.
Done right, AI-supported smart contracts are an obvious, generic and versatile concept that can speak to a wide spectrum of potential new users. At this point in time, “AI” can motivate people to look at blockchain again and find out what progress has been made. In the course, to find out about EVM-based chains and what its advantages are.
Because lawyers & judges can read smart contracts written in plain language, they can finally advance the common way that firms are organized, with EVM-based chains as the rails for a consequential cultural and behavioral shift on the grass-roots level in commerce, finance and government.
Natural language—the common medium of contracting, business, and law—is really the 'interface' that can make crypto and smart contracts backwards compatible to the existing OS of the world.
.
Everyone — the approach is designed to broaden smart contract and DAO adoption by including non-programmers and non-tech-affine users. This is a 10kx augmentation of the potential user pool.
Like Apple pushed for the idea of a computer in everyone's living room, smart contracts should likewise become an everyday normal phenomenon. This goal needs the no-code transparency of Lexon, to allow for smart contracts and DAOs in every walk of life, so smart contracts can become a part of school education and the definition of literacy, the standard way to manage any community or private undertaking.
Lexon AI targets everyday citizens, philosophers, politicians, businesspeople—who are experts in contracts to the same degree that lawyers are—as well as finance specialists, investors, DAO communities, or artists.
As a matter of fact, lawyers have been excited about writing Lexon smart contracts. Were used as legal agreements, judges will be a relevant target group as readers.
.
.
This HYBRID AI approach offers a generalizable solution to the mishaps (or occasional voluntary incompleteness) that code creation with LLMs can suffer, even with its reasoning models.
It will be be the more valuable the more difficult it will turn out eventually for an LLM to completely overcome hallucinations. Because LLM output is a creative aggregation of its learning material, it appears possible that a hard limit will remain especially regarding programs that are genuinely new. This Hybrid AI approach can be the cure.
On top of that, LLMs can give up on code for a modest level of nested requirements. This is still frequently the case for real tasks, and it remains unclear when, if ever, gen AI will rise to the level of abstraction needed for the creation of complete programs.
The sentiment has recently shifted to looking at LLMs as a productivity tool rather than a full replacement of programmers (supported by experiences in different industries: https://www.nytimes.com/2025/03/29/opinion/ai-tech-innovation.html). Other sources report that AI mostly helps junior developers; with only small gains reported for more difficult assignments, and for senior dev users (this including the well-known report that is used to advertise Microsoft’s co-pilot. The reported gains are clearly leaning towards novice users).
This hybrid AI concept, however, DOES intend to replace programmers. Therefore, a different architecture is proposed.
The described hybrid combination (above) of generative AI with symbolic AI, has been practically determined as the most robust approach. The joining of machine learning with symbolic elements like reasoning is in full swing across the AI industry, after the limits of reinforced learning for gen AI have been reached. This comprises a fusion of concepts similar to the one proposed here. But the way in which components are composed here is new:
.
Tests with different approaches to combine symbolic and generative AI resulted in the specific method presented here. A possibly more intuitive attempt (namely, to have generative AI write Solidity programs based on a non-ambiguous Lexon text) failed and is less attractive for an additional reason. Tests used real U.S. law (Intestate Estates, U.C.C. financing) and well-researched, realistic Lexon text examples to test different combinations of generative and symbolic AI engines under near-real world conditions.
The mentioned naive sequence of (a) writing a code specification in the Lexon syntax, i.e., in English, for the LLM to create Solidity code, did not succeed, and the emerging class of problems looks difficult to overcome. In general, the LLM tended to overlook central keywords, even though they are in plain English and that in a Lexon text carry fundamental logical significance, (like object definitions, or loops); or the LLM declined to code the complete contract when requirements got more complex, proposing that the user contribute the missing (deeper nested) parts (e.g., for the U.S. law for intestate estates).
In the tests, the utilization proposed here furnished the best results, i.e.: (b) letting the LLM write Lexon texts and compile them using the Lexon compiler. As a most valuable and welcome advantage, with this flow, hallucinations of the LLM are caught and eliminated by the human writer in the intermediary dialog steps that also allow a non-programmer to verify the created contract logic in English, before it is 100% deterministically translated to Solidity (as opposed to the naïve flow (a) where the LLM creates Solidity code).
This makes the proposed constellation (b) of machine-learning and compiler technology the path of choice.
.
In future editions, the proposed app will receive a voice dictation front end to allow for smart contract creation without typing.
An iteration of the system will offer GUI generation for the created smart contracts, which can be comprehensive because the plain-text code of Lexon supports the generation of an interface better than normal 3rd generation language code, as it is information-richer as the starting point of a GUI, thanks to its linguistic nature.
.
.
The intermediary language that drives the app’s chat, Lexon, defines a subset of English as a programming language so that natural language texts themselves become the program.
This is the way to arrive at precise execution.
That symbolic AI should be the solution, is unsurprising, given that programming is the home-game of symbolic AI, as opposed to the more data-centric generative AI. The challenge of our time is to identify the best way of interconnecting the two, unleashing linguistic expressiveness without losing exactness. The proposed architecture breaks new ground, based on Lexon’s unique contribution on the symbolic side.
Lexon smart contracts read like normal English. They are accessible, readable for anyone, as they come. The Lexon compiler translates such plain-text smart contracts to Solidity, with full accuracy and determinism. There are no hallucinations, as Lexon is NOT based on gen AI. It is a linguistic feat instead: “simply” a programming language that is readable like English.
The technology fundamentally works like any compiler, the twist is how natural language is accepted in its richness. The main technical achievement of Lexon is the definition and implementation of a non-ambiguous subset of the English grammar. It turns out that this is the catalyst for a quantum leap.
.
This is the result of a long scientific quest. The vision of “normal text as a program” is a centuries-old philosophical project that is today interpreted as the beginning of computer sciences in the 17th century and the foundation of modern mathematics in the 19th. The biggest names in the history of logic are associated with it, the result was today’s computer technology as well as AI.
This research was not originally associated with artificial intelligence but was pursued for the logical clarity of expression that it was hoped it would bring. However, because this path of exploration led to the development of computers, arguably, computers were created for this.
As such, symbolic AI, and “universal language” research were what started computer science, and paved the way to computers. To achieve “programming with language,” beginning with Descartes and Leibniz, through the game-changing contributions of Frege, was the north star of the journey from ancient Greek logic to modern computers. (See Characteristica Universalis https://www.amazon.com/dp/B0D8Y6F8DW).
The combination of the current apex of this technology with generative AI is potentially a crowning achievement, enabling a quantum leap in productivity, constituting a milestone in the history of programming. This high ambition may appear more plausible in light of the fact that the proposed concept is NOT hoping to replace all human intervention in the act of programming—but “only” the expertise of programmers. This goal is in keeping with the historically demonstrated strengths of symbolic AI, which led to the creation of expert systems.
The current roadmap for the Lexon language has its focus on extending the Lexon grammar for DAOs/ This grant’s trajectory will directly combine with the coming advanced DAO syntax, which is the next milestone.
.
The main differentiator to a generative AI approach of programming by prompt is that with Lexon, language itself is interpreted like a program, not merely used as the description of a program. The difference is fundamental, both on the technical and conceptual level. The result is a decisively more transparent, reliable and safe workflow.
The approach is good for different objectives: for DIY smart contracts that are short, as well as for complex contracts, like DAOs. Lexon is portable to 60 hardware platforms, works off-line, is very fast, and fiercely resource-optimized—many magnitudes more resource-friendly than gen AI.
.
There is a growing recognition that pure, generative AI might disappoint the expectations that have been building.
Industry-wide, a consensus is forming that hybrid AI is the way forward for AI. That would be the combination of generative and symbolic AI in one of many possible ways. And under the hood, all big AI services already implement symbolic AI elements to augment the power of their generative AI offerings.
But unbelievably, on the research side, an unnecessary blood feud between the research communities—generative and symbolic—is holding up progress. The animosity between researchers of the different AI camps is going for decades, is personal, and bears an unscientific take-no-prisoners mentality. There has been open advocacy for defunding the respective other branch (cf. Nobel-laureate Hinton’s advice to the EU to not fund symbolic AI).
Accordingly, some very smart people find it plausible that Lexon could be a milestone in the history of logic, while others dismiss its approach wholesale.
Fundamentally, while gen AI and symbolic AI are similar (see tensors, below), Lexon has a different workflow and different strengths than LLMs, making it good at things that are perfectly complementary to gen AI.
It makes the blueprint of machine execution transparent to humans; it does NOT propose to think or write for the user but “only” to help with the programming and clarification of thoughts (by means of a restricted grammar); it can visualize its understanding (cf. --tree option). This is on each count the opposite of gen AI.
Notably, Lexon has an internal representation of meaning of a text that generative AI does not have. This is what allows for precise processing of the exact meaning of a text. How it is parsed and understood by the Lexon AI is the topic of the books and papers on Lexon (below). It is a new approach that reaches beyond the meaning of individual words to the network of relationships they form.
Lexon thus provides unfailing accessibility, and perfect agency: a text is just exactly what it is. It is aligned and transparent by design.
However, for a convincing impression of how similar symbolic AI Lexon code looks to generative AI tensors consider the optics of this Lexon parser module: https://github.com/lexonian/lexon/blob/dbb46e554c7c444bbf3d114c15a1f6faa11f76ff/build/scanner.c#L456
These Lexon tensor tables are the machine-translated model of the Lexon grammar (https://github.com/lexonian/lexon/blob/master/grammar/english.lgf). The difference is that they are magnitudes smaller than gen AI tensors. This is, because they are precise. Lexon’s way is not to learn from billions of examples but to incorporate one precise grammar description and operate on that (https://github.com/lexonian/lexon/blob/master/grammar/english.lgf). This is reflected in these matrices that are the core element for text analysis: they are small and exact. Basically, this is the difference between symbolic AI and generative AI, marking their different strengths and weaknesses.
The following is information on Lexon, which is the symbolic half of the AI system.
Please note that to READ Lexon texts, NO preparation is necessary.
The Lexon subset of English is optimized for readability—because any program, and contract, is more often read than written (Brian J. Fox).
Most documentation below revolves around writing Lexon—which this grant application strives to greatly simplify. Some literature on Lexon is scientific and philosophic, comparing it to similar approaches and suggesting its place in the history of logic.
Lexon is documented in articles, books, and academic papers, and supported by hands-on documentation: a manual, tutorial, etc. The central place to learn about it is the lexon site at github.com/lexonian/lexon.
The source code is at github.com/lexonian/lexon.
.
.
Full-cycle technical proof that feeds a selection from Lexon grammar, approx. 1,000 pages documentation and 5,000 examples to Google o3 via its context window, finding the optimal learning set to allow o3 to create the best Lexon text.
The setup follows Google’s instructions for providing long context in the fastest and most economical way to achieve the lowest cost, highest hit result during text creation.
The terminal-based proof of concept system feeds the results to the Lexon compiler to create Solidity text.
Result:
.
The LLM results are optimized by tuning the long context inputs and exploration of different examples and styles to write prompts.
Other LLMs—online and off, commercial and free—than o3 are revisited and tested to identify possible better suited candidates, measured by accuracy of results, response time, complexity of setup and price.
Result:
.
A chat-like web interface is created that interacts with the server that processes user input.
The user enters a contract description prompt in free form, obtains a first response in Lexon’s plain-text code that can be verified for accuracy and redone from scratch or fine-tuned, before submitting to the Lexon compiler to create Solidity from it.
The result is deployed to an EVM-based chain using a connected browser wallet.
The intermediate step of verification is the central contribution of the hybrid setup, which the GUI is to dress with the best possible UX.
Result:
.
The user experience is tested by volunteers to tweak the flow and visual presentation.
Documentation, examples, and a tutorial are tied into the app to guide first-time users and provide reference for advanced users.
(Note again that no documentation or learning is necessary to read Lexon code.)
Web pages are created, including a landing screen, to host the app and provide the docs.
Result:
.
Live tests, opening to public; source clean up, commenting; repo clean up; github push; final grant reporting.
Result:
.
.
Henning Diedrich (development) created Lexon, wrote the first book on Ethereum, was the first technical architect for IBM's blockchain, first director for blockchain of BCG, consulted for the European Commission, the Singapore SWF Temasek, LUMA and Art Basel. He architected the Diamond Blockchain TRACR for DeBeers.
Marco Heinrich (test contract creation, community support) assists development taking care of prototyping, content creation, and testing. He has previously worked on commercial programming assignments with Henning as trusted and diligent supporter, and participated in Lexon from the start.
Daniel Nemet (test creation, community reachout) is a community builder in the blockchain space with a special interest in user experience and making blockchain accessible. He worked as consultant in the renewables and eco-space. Currently builds the NYM community and writes a Ph.D. on crypto.