[[Image(Public/ImageContainer:djai-banner.jpg, align=left, width=99%, margin-bottom=20, link=Public/DjAi)]] = AI middleware: from chat to integration == Lost in inference? Since November 2022 (not really long ago, is it?) you've chatted with ChatGPT, read articles on AI with prophecies from "we won't have to work anymore from next year on" to "we're doomed", have perhaps rendered a few funny pictures with Stable Diffusion or Midjourney and are now waiting until your local bakery or car mechanic claim to have their services based on AI now. Does that about describe your situation? To get started with using LLM functionality in a real business context, a few issues must be solved: * Accessing an LLM over the API and injecting a few-shot-training is normally a job for a software developer, no matter whether it is a cloud-based service like the ones by openAI or !AlephAlpha, or one that runs locally. * Creating the instructions to transform the input data as needed rather requires knowledge of the input and desired output data. This profile is one of a power user or technical writer. * Few-shot trainings are written in the specific language of the AI model and thus, actually requires the combination of developer and power user profiles. * Security keys of LLM services should not be widely distributed among users to avoid abuse. * Few-shot training cycles are unhandy, consisting of writing cryptic JSON code, copying it elsewhere, running the software and trying again. * A service might work well, but what happens with the data uploaded to it, and which data must not be uploaded? {{{#!div [[Image(Public/ImageContainer:ExtractTask_supreme.jpg, align=center, width=50%, margin-bottom=20, link=)]] }}} == A solution that you can start using tomorrow //dj//**AI** addresses all of these issues. * It provides a graphical user interface that allows power users to create few-shot trainings per drag&drop and without any cryptic command language. Users with knowledge about the data and the desired operation can build it without any additional skills. * Trainings can be stored as files and versioned as needed, for example in github or a DMS. * The current status of a training in the editor can be immediately applied and tested. This shortens turnaround cycles and speeds up development. Realistic trainings with some examples that produce good results can be created in less than half a day. * The training format is abstract and is translated to the specific LLM's syntax only when it's applied. This allows trying the same training on different models, or different versions of the same model. This way, it is also easy to determine which operations can run on simpler, cheaper versions of a model and which ones require more reasoning and linguistic capabilities. * The interface supports single-request operations, chat operations (with context management) and single-request operations with dynamically generated trainings. This allows ontology, terminology or other knowledge injection into the request or automatic attachment of examples chosen by keywords in the source. * The inference functionality with defined transforms (as called from the client software) can be easily integrated into your own software. Any environment able to send HTTP requests can access //dj//**AI** server by passing a local secret, the source data and the transform name. The service responds with the AI query result. * The AI request handling runs behind a web service. It is restricted to the functions defined by the training builders and is linked to a specific AI model such as {{{openAI GPT3.5}}} or {{{AlephAlpha luminous-extended}}}. Regular users can't change this. This way, transforms handling data to be protected can use a service like !AlephAlpha with servers in Germany for such tasks, and openAI models for tasks with less sensitive data, where they perform better or well enough for less money. * Plugins for GPT3.5 and GPT4 and !AlephAlpha are included. Other plugins will follow as required and can be added by implementing a simple software interface. The client is a .net 7 applications and runs on all recent Windows versions. HTTP access is possible from any environment (supporting HTTP requests). The //dj//**AI** server is a .net 7 Core application and runs on Windows and Linux. It does not need many resources, since it does not do the AI inference itself, but forwards the requests and trainings and returns the results. It can alternatively run on your desktop PC or as a server for many users in the network. {{{#!div [[Image(Public/ImageContainer:Editor.jpg, align=center, width=50%, margin-bottom=20, link=)]] }}}