About BasedLang

Overview

𝔹asedLang runs natively on BasedAI (𝔹). It allows developers to make versioned calls to Large Language Models (LLMs) in various codebases, smart contracts, and files.

BasedLang offers a meta programming standard that enables the integration of Large Language Models (LLMs) into various codebases and data files. It is designed to be gracefully compatible with smart contracts, Python scripts, and Excel documents. BasedLang addresses the need for a secure and standardized method to leverage LLMs for enhancing development workflows and decision-making processes.

Incorporating LLMs into existing systems presents multiple challenges

  • Future-Proofing: Smart contracts and other codebases often lack the flexibility to adapt to future LLM advancements or to integrate LLM-driven decision-making logic.
  • Code: Embedding LLM logic must not compromise the readability and maintainability of the original code.
  • Standardization: The absence of a unified approach for embedding LLM queries leads to inconsistent and makeshift solutions.

BasedLang Core Features

  • Standardized Comments: BasedLang uses a standardized comment syntax, !based, to embed LLM queries. This allows for easy identification and processing by the BasedLang compiler without affecting the code's execution.
  • Non-Intrusive Integration: LLM logic is encapsulated within comments, ensuring that the primary functionality of the code or data file remains intact.
  • Versatile Compiler: The BasedLang compiler supports multiple file types, such as .sol, .js, .py, .csv, and .xlsx. It can compile LLM queries, manage comment injection and removal, and separate LLM logic into distinct mapping files for clarity.
  • Meta Programming: Developers can use BasedLang to define variables, functions, and control structures within comments, which can be interpreted or executed by LLMs, facilitating a meta programming paradigm.

While BasedLang was initially developed for the BasedAI protocol, it is an open standard that encourages adoption by anyone who values being based and seeks to integrate LLMs into their systems.