GenC

GenC is an open-source framework for building GenAI-powered applications.

The central problem GenC aims to solve is the fragmentation of the GenAI ecosystem. Many capabilities useful to GenAI developers evolve independently in siloed domains, and do not easily compose or interoperate with one-another.

For example, LangChain/Python/Jupyter is popular as a platform of choice for modeling GenAI logic in many domains, particularly when prototyping, but e.g., mobile apps are commonly written in Java or Kotlin, and the two worlds don't mix easily. Developers must choose between the rich high-level APIs and ease and speed of prototyping offered by the former vs. an easy path to mobile deployment or access to latest on-device LLM APIs offered by the latter.

GenC is a glue framework that enables developers to compose capabilities across these and other domains. Our target audience is any GenAI developers, especially those seeking benefits such as composability, portability, and deep customizability (see the summary of benefits).

For example, here's how you can use GenC to author a simple chain powered by a device-to-Cloud model cascade in LangChain/Python/Jupyter:

import genc
import langchain

my_app_logic = genc.python.interop.langchain.create_computation(
    langchain.chains.LLMChain(
        llm=genc.python.interop.langchain.ModelCascade(models=[
            genc.python.interop.langchain.CustomModel(uri="/cloud/gemini"),
            genc.python.interop.langchain.CustomModel(uri="/device/gemma")]),
        prompt=langchain.prompts.PromptTemplate(
            input_variables=["topic"], template="Tell me about {topic}.")))

The result is a platform and language-independent Intermediate Representation (IR) that can be loaded and executed as follows (see a complete step-by-step walkthrough and deployment instructions in Tutorial 1):

myAppLogic = ... // load the application logic, e.g., from a file or asset
myRuntime = new DefaultExecutor(...);
javaCallable = Runner.create(myAppLogic, myRuntime.getExecutorHandle());

... = javaCallable.call("scuba diving");

The example illustrates several dimensions of composability and portability offered by GenC:

GenC shares common goals with platforms such as LangChain, in that we aim to provide modular, customizable development surfaces to maximize developer velocity; albeit GenC aims to go further, extending compositionality benefits across ecosystems and frameworks.

GenC's relationship to platforms like LangChain is synergistic, characterized by layering, as shown in the diagram below. Our overarching goal is to take advantage of all capabilities that already exist, and bring them together for use by GenAI developers.

GenC Diagram

If you're intrigued, please review the summary of GenC's benefits, or dive straight into the tutorials and documentation to experience what GenC has to offer:

At this stage, GenC is intended for experimental and research use only, and at the "beta" stage of development. You can expect the APIs and capabilities to evolve, in part based on demand and feedback from the community.

Use GitHub issues for tracking requests and bugs.

Please direct questions to Stack Overflow using the genc tag.