| 14 | On the other hand, ChatGPT or other large models with a broad general knowledge (the Open Source model Bloom, for example), can be used for a variety of tasks without any specific training. The user just provides instructions and the data to be used with the instructions in natural language. The user can also provide examples. The AI model can "understand" all these and create a useful response (hopefully, without any hallucinated pseudo-information). |
| 15 | |
| 16 | A hypothetical model that can understand and answer in natural language with a broad, general knowledge and a capability of (simulated) reasoning, all at least on the level of a human being with average intelligence and education is called an AGI (Artificial General Intelligence). A user could discuss with an AGI just as with a human chat partner on the other end. |
| 17 | |
| 18 | AI models available outside of laboratories are not yet there, but it feels like they are getting closer rapidly. And I'm not quite sure what happens inside the labs. |
| 19 | |
| 20 | But how do users interact with these systems to perform a specific task? Let's look at two examples. |
| 21 | |
| 22 | |
| 23 | |
| 24 | == Using chat-based LLMs |
| 25 | === Example 1: Text generation |
| 26 | Let's say you want to use ChatGPT to assist you in writing a text promoting a new product for social media. You know the product, want to point out some unique features and have an idea of the target group and the language to address them in. So you probably start out by giving the chat an outline of what this is about. Next, you will perhaps give it a few examples on how to write the text - perhaps from previous, similar campaigns. You will give it further instructions about the expected length and other details, and more facts to be used as the basis for the text. |
| 27 | |
| 28 | So if we take this apart, we have three categories: |
| 29 | * Instructions |
| 30 | * Examples |
| 31 | * Facts |
| 32 | |
| 33 | Finally, you ask ChatGPT to generate the text, iteratively give it some more instructions to improve the result and when it's good enough use it for your intended purpose. |
| 34 | |
| 35 | === Example 2: Structuring unstructured text |
| 36 | We did a number of tests with using LLM for standardized text operations. One example is to provide a confusing text like this one: |
| 37 | {{{#!div style="background: #F8C471; margin: 5px; margin-left: 40%; margin-right: 30px; padding: 5px; border-radius: 10px;" |
| 38 | We have a new variant of the MBZ1xxx series, the MBZ1403. The main difference is its axial fan which performs a lot better than the radial one we still use in the MBZ1000 models. To servcie the device, you must first open the casing. To do so, you must reliese the two locks on the sides and slide the casing upward. Oh BTW, need less to say to unplug the power cord before you open the box. The new variant operates at a voltage of 220 volts and consumes 1400 watts of power. To replace the fuse (10 amps, not 8 amps like for MBZ1000), first remove the protective cap. Make sure to use the correct rating. The device has an overload protection that triggers the fuse before it overheats. After replacing the fuse, close the casing (but don't forget to replace the protective cap before that). |
| 39 | }}} |
| 40 | |
| 41 | And get this result (to be further refined in subsequent processing steps): |
| 42 | {{{#!div style="background: #EEEEEE; margin: 5px; margin-right: 40%; margin-left: 30px; padding: 5px; border-radius: 10px;" |
| 43 | {{{ |
| 44 | OUTPUT |
| 45 | ***task*** |
| 46 | * Release the two locks on the sides. |
| 47 | * Slide the cover upward. |
| 48 | * Unplug the power cord to reduce the risk of electric shock. |
| 49 | WARNING Danger of death by electric shock. |
| 50 | * Remove the protective cap. |
| 51 | * Remove the fuse. |
| 52 | * Insert a 10A fuse. |
| 53 | * Replace the protective cap. |
| 54 | * Close the cover. |
| 55 | ***reference*** |
| 56 | Device version Voltage Power consumption Fuse rating Fan type |
| 57 | MBZ1000 220V 1000W 8A Radial |
| 58 | MBZ1403 220V 1400W 10A Axial |
| 59 | ***concept*** |
| 60 | The axial fan of the MBZ1403 performs much better than the radial fan used in the MBZ1000 model. |
| 61 | ***other*** |
| 62 | ***metadata*** |
| 63 | CAT TechDoc |
| 64 | AUDIENCE Tech |
| 65 | TITLE MBZ1403 Device Servicing Instructions |
| 66 | ***log*** |
| 67 | ***end*** |
| 68 | }}} |
| 69 | }}} |
| 70 | |
| 71 | Yes, this is actually the result received from ChatGPT 3.5 API with a single call. |
| 72 | |
| 73 | |
| 74 | |
| 75 | == How does this work? |
| 76 | The secret is, we do not only pass the actual text "We have a new variant..." to the LLM, but we prefix it with what we call a **briefing**. LLM APIs allow to not only pass one message and expect a response, but an entire dialog between human and AI can be passed, that the AI then continues with its response. This is how chat works, the latest history of the chat is passed again to the machine, together with the new user message. |
| 77 | |
| 78 | We use this mechanism to prefix the user input with a preconfigured dialog containing very condensed training data, consisting of instructions, examples and facts. We also define an input and output syntax in that. This prefix is stored as a file and automatically sent to the model when a user passes data, and chooses the specific operation. |
| 79 | |
| 80 | It's a small fraction of the data normally used for training, but if the operation is not too complex in its details, it works quite well and fits conveniently into the 4k token limit of many models. It works due to the much better text understanding and reasoning capabilities of today's models, few examples are sufficient to learn the relevant patterns. |
| 81 | |
| 82 | To make this easily usable in all types of applications, we've written a web based API to provide such a system with briefing capabilities. |
| 83 | |
| 84 | [[Image(Public/ImageContainer:djAI.jpg, align=center, width=50%, margin-bottom=20, link=)]] |
| 85 | |
| 86 | |