Using AI in Software Design: How ChatGPT Can Help With Creating a Solution Arch. by Ralf D. Müller

Devoxx
13 Mar 202446:27

Summary

TLDRRalph D Miller discusses the capabilities and intricacies of AI and chatbots, particularly focusing on GPT models. He emphasizes the importance of understanding the underlying technology and provides tips for effective usage, such as paying for the full version for enhanced capabilities. Miller also highlights the potential of AI in solving complex problems and stresses the need for careful priming and prompt engineering to guide the AI towards accurate and useful outputs.

Takeaways

  • 🚀 GPT models, such as GPT-3 and GPT-4, are powerful generative pre-trained Transformers capable of various tasks including text translation and code conversion.
  • 📈 GPT-4 has a significantly larger dataset and parameter count than GPT-3, leading to improved performance and more nuanced understanding.
  • 💡 When using GPT models, it's crucial to be aware of data protection and copyright issues to avoid legal complications.
  • 🤖 GPT models are often referred to as 'stochastic parrots' due to their ability to predict the next word based on probabilities, but they can also be seen as 'all-knowing monkeys' due to their vast knowledge base.
  • 🧠 The architecture of GPT models includes a neural network core, natural language processing, and multimodal capabilities allowing for text, image, and voice inputs and outputs.
  • 🔄 GPT models build context through interactions, which can be crucial for providing accurate and relevant responses; however, context length can vary and may impact performance.
  • 📚 Embeddings are a technique used to incorporate external data into the model's context, allowing it to better understand and interact with specific information or domains.
  • 💬 Prompt engineering is an essential skill when working with GPT models, as it involves priming the model with the right context, goals, and expectations for each session.
  • 🔄 Feedback loops are important for refining GPT model outputs, especially in coding scenarios where the model can iterate and improve based on expected outcomes.
  • 💰 Investing in the paid version of GPT models is recommended for serious users, as it offers more capabilities and better results compared to the free version.
  • 🎓 For complex tasks like software architecture exams, GPT models can be a valuable tool, but they require careful guidance, context management, and verification of their outputs.

Q & A

  • What is Ralph D Miller's profession and main interests?

    -Ralph D Miller works at DBST, the IT partner of the German Railway. His main interests include documentation, docs-as-code, security, architecture, and AI. He is also a maintainer of the Doc toolchain and an open source contributor to the docs.code project.

  • What is the significance of the difference in training data between GPT-3 and GPT-4?

    -GPT-3 was trained on 550 gigabytes of text data, while GPT-4 was trained on a much larger dataset, estimated to be around 4 to 5 terabytes. This larger dataset allows GPT-4 to have a more extensive knowledge base and potentially provide more accurate and comprehensive responses.

  • How does the context size limit in chat GPT models affect the conversation flow?

    -The context size limit, which was 2,000 tokens for GPT-3 and 32,000 tokens for GPT-4 at the time of the talk, affects the conversation by potentially causing the model to lose track of earlier parts of the discussion. As the conversation approaches the token limit, earlier messages may get 'out of context,' leading to less coherent responses from the model.

  • What is the role of embeddings in enhancing the capabilities of large language models like GPT?

    -Embeddings allow the model to understand and process information more effectively by representing words or phrases as vectors in a multi-dimensional space. This enables the model to relate and compare different pieces of information more accurately, improving its ability to answer questions and solve problems based on the provided context.

  • How can users provide custom instructions to improve the responses from GPT models?

    -Users can provide custom instructions through a feature that allows them to specify what they want the model to know about them for better responses. This could include their background, preferred libraries, coding style, and other relevant information that can help tailor the model's output to their needs.

  • What is the importance of prompt engineering when working with GPT models?

    -Prompt engineering is crucial as it involves carefully crafting the input to guide the model towards the desired output. By structuring prompts effectively, users can influence the model to follow specific directions, provide more accurate answers, and avoid irrelevant or incorrect information.

  • How does the GPT model handle tasks that require multi-step problem-solving?

    -The GPT model can handle multi-step problem-solving by following a series of prompts that guide it through each step of the process. It's important to first ask the model to explain its approach before it attempts to solve the problem. This allows for adjustments and refinements to the strategy before the model proceeds with the actual task.

  • What is the role of the mixture of experts architecture in the GPT model?

    -The mixture of experts architecture involves using multiple specialized neural networks within the larger model. Each 'expert' network focuses on different types of information or tasks, which can result in certain questions being answered more effectively than others based on the expertise of the relevant network.

  • How can users ensure that GPT models maintain context throughout a conversation?

    -Users can maintain context by being mindful of the token limit and structuring their conversation to ensure that important information is not lost. They can also use techniques like starting each session with a clear prompt, regularly reaffirming the task at hand, and breaking down complex tasks into smaller, manageable steps.

  • What are some limitations of GPT models in terms of reasoning and problem-solving?

    -While GPT models are proficient at generating text and providing answers based on their vast knowledge base, they may not always exhibit true reasoning capabilities. Their responses can sometimes be influenced by biases in the training data or fail to accurately understand complex tasks, requiring careful guidance and verification from the user.

  • What is the recommendation for users who want to fully utilize the capabilities of GPT models?

    -The recommendation is to subscribe to the paid version of the GPT model, which offers more advanced features and capabilities compared to the free version. The paid model provides a better context size, more accurate outputs, and access to additional functionalities like the code interpreter, making it worth the investment for serious users.

Outlines

00:00

🤖 Introduction and Disclaimer

The speaker, Ralph D Miller, introduces himself and his background in IT, documentation, security, and architecture. He mentions his work at DB Systel, the IT partner of the German Railway, and his involvement in open source documentation projects. The speaker emphasizes the importance of data protection and avoiding the sharing of personal information with AI systems. He also cautions against using AI for real exams, highlighting the potential dangers of copyrighted content generation. The introduction sets the stage for a discussion on the use of AI in creating solution architectures, with a focus on the isqb Advanced exam as a case study.

05:00

📈 GPT Models and Technology Behind

The speaker delves into the differences between GPT-3 and GPT-4, noting the increase in training data from 550 GB to multiple terabytes for GPT-4. He highlights the significant jump in parameters from 175 billion for GPT-3 to 500 billion for GPT-4, and the resulting improvements in performance. The speaker also discusses the importance of using the paid version of GPT for serious work, as the free version has limitations. He touches on the Transformer architecture, the concept of context in AI conversations, and the multimodal capabilities of GPT, which include handling text, images, and voice.

10:03

🔄 Context Management and API Usage

The speaker explains the concept of context in AI interactions, detailing how the AI builds up context during a conversation and how the stateless API requires sending the full context with each request. He discusses the token limit of GPT-3 and GPT-4, and how the AI compresses its own responses to manage this limit. The speaker shares tips on priming the AI with relevant information to ensure accurate and contextually appropriate responses. He also mentions the potential for typos in the slides and the importance of being creative when working with AI systems.

15:05

🧠 Understanding Embeddings and Prompt Engineering

The speaker introduces the concept of embeddings, explaining how the neural network can be influenced by putting data in context. He discusses the cost implications of embedding large amounts of text through the API and suggests breaking down text into chunks and storing them in a vector space as a solution. The speaker emphasizes the power of the API and embeddings in giving the AI access to vast amounts of data. He also talks about prompt engineering, detailing how to prepare the AI for each session by setting the context, defining the goal, and specifying the desired output format.

20:09

🛠️ Working with GPT on Certification Tasks

The speaker describes his experience using GPT to solve an isqb Advanced exam task called 'Big Spender'. He outlines the process of priming the system with information about the task, including uploading relevant PDF documents and using custom instructions to improve the AI's understanding. The speaker discusses the importance of context and how the AI can extract and summarize information from documents. He also shares his experience in guiding the AI through the task, asking it to confirm understanding and clarify requirements before proceeding with solutions.

25:12

📊 Quality Attributes and Solution Strategy

The speaker continues his discussion on solving the 'Big Spender' task, focusing on deriving quality attributes and creating a solution strategy. He explains how he guided the AI to repeat the task objective and derive quality scenarios, resulting in an ASID table. The speaker emphasizes the importance of rephrasing prompts to maintain context and avoid confusion. He also discusses the AI's ability to identify key quality goals and create a solution strategy that aligns with the task requirements.

30:13

🔍 Deepening the Technical Context

The speaker explores the technical context of the 'Big Spender' task, noting the AI's initial difficulty in creating a useful context diagram. He describes a technique of giving the model time to think by specifying the steps it should take, which results in a more accurate technical overview. The speaker also discusses the AI's ability to map the business context to the technology stack, creating a workflow and identifying systems that contribute to quality goals. He highlights the importance of context management and the AI's reliance on accurate and complete information to produce meaningful results.

35:17

🎓 Conclusion and Final Thoughts

In the conclusion, the speaker reflects on his experience with GPT, expressing satisfaction with its capabilities in transforming exam input into solution output. He emphasizes the need for guidance and feedback when working with AI and the potential for the technology to evolve further. The speaker also suggests investing in the paid model of GPT for its enhanced capabilities and concludes with an invitation for questions, highlighting the interactive nature of the talk.

Mindmap

Keywords

💡AI and software

The term 'AI and software' refers to the integration of artificial intelligence (AI) capabilities into software applications. In the context of the video, this is central to the discussion as the speaker, Ralph D Miller, is exploring how AI, specifically chatbots like GPT, can be utilized to enhance and streamline various processes within software development and architecture. The video delves into the practical applications and potential of AI in creating solutions and improving efficiency in the software industry.

💡Chatbot GPT

Chatbot GPT, or Generative Pre-trained Transformer, is an AI language model that is capable of generating human-like text based on the input it receives. In the video, the speaker discusses the use of chatbot GPT in the context of solution architecture, highlighting its ability to process and produce text, code, and even recognize images. The speaker emphasizes the importance of using the paid version of GPT for more accurate and reliable results.

💡Solution Architecture

Solution architecture refers to the high-level design and planning of a system or software that addresses specific business needs and technical requirements. In the video, the speaker is focusing on how AI, particularly chatbot GPT, can assist in creating solution architectures by providing insights, generating code, and offering architectural suggestions. The process involves understanding the problem, defining the context, and iteratively refining the solution until it meets the desired objectives.

💡Data Protection

Data protection involves safeguarding the privacy and confidentiality of data, especially personal data, and ensuring that it is used responsibly and lawfully. In the context of the video, the speaker cautions against sending private or sensitive data to AI systems like chatbot GPT due to potential data protection issues. This is important as misuse of data can lead to privacy breaches and legal complications.

💡Copyright

Copyright refers to the legal rights that creators have over their original works, which includes the exclusive right to reproduce, distribute, and display the work. In the context of the video, the speaker mentions that chatbot GPT might generate copyrighted information, which could be problematic, especially when dealing with images. It is crucial to respect copyright laws when using AI-generated content to avoid infringement.

💡GPT-3 vs GPT-4

GPT-3 and GPT-4 are versions of the Generative Pre-trained Transformer models developed by OpenAI. Both are AI language models capable of understanding and generating human-like text based on the input they receive. GPT-4 is the more advanced version with a larger dataset and more parameters, which results in improved performance and understanding compared to GPT-3. The speaker in the video emphasizes the importance of using the paid version of GPT (which is GPT-4 at the time of the talk) for better results in tasks such as solution architecture.

💡Transformer Architecture

The Transformer architecture is a type of deep learning model architecture that is particularly effective for natural language processing tasks. It is the underlying technology behind models like GPT-3 and GPT-4. The architecture is characterized by its attention mechanisms that allow the model to focus on different parts of the input data and generate contextually relevant output. In the video, the speaker briefly touches on the Transformer architecture to explain the technical foundation of the AI models they are discussing.

💡Context

In the context of AI and natural language processing, 'context' refers to the information that is provided to the AI system to help it understand the situation or topic at hand. This includes previous interactions, user inputs, and any relevant data that the AI can use to generate more accurate and relevant responses. The speaker in the video emphasizes the importance of context in AI interactions, explaining how it can affect the quality and relevance of the AI's output.

💡Embeddings

Embeddings in AI and machine learning are vector representations of words, phrases, or documents that capture their semantic meaning in a numerical form. These embeddings allow AI models to understand and process natural language by treating words and phrases as points in a multi-dimensional space, where the distances and directions between points represent semantic relationships. In the video, the speaker talks about using embeddings to feed custom data into GPT, enabling the model to understand and interact with specific documents or codes.

💡Prompt Engineering

Prompt engineering is the process of crafting input text or prompts for AI models, particularly language models like GPT, to guide the AI to produce desired outputs. This involves carefully structuring the input to include specific instructions, context, and goals that will help the AI generate accurate and relevant responses. The speaker in the video discusses the importance of prompt engineering in effectively utilizing AI for tasks such as solution architecture and provides tips on how to create effective prompts.

💡Custom Instructions

Custom instructions are specific directions or information provided to an AI model to tailor its responses to the user's particular needs or preferences. In the context of the video, the speaker refers to a feature in GPT that allows users to input custom instructions to improve the relevance and accuracy of the AI's output. This feature enables the AI to incorporate user-provided context and goals into its responses, leading to more effective interactions.

Highlights

Ralph D Miller discusses the use of AI and software in creating solution architectures.

Miller highlights the importance of data protection and avoiding the input of personal data into AI systems.

The talk introduces the isqb Advanced exam, an international software architecture qualification board certification process.

GPT models are compared, with GPT-3 trained on 550 GB and GPT-4 on an estimated 500 TB of text data.

GPT-4 outperforms GPT-3 and the average human in academic tests, scoring 82% compared to GPT-3's 65% and the human average of 75%.

The architecture of GPT includes natural language processing, a neural network core, and multimodal capabilities including image and voice recognition.

Miller emphasizes the value of using the paid version of GPT for professional work, citing its superior capabilities.

The concept of 'context' in AI chat models is discussed, explaining how it affects the model's understanding and response.

Embeddings are introduced as a method to incorporate external data into the AI model's context.

Prompt engineering is explored, demonstrating how the input to GPT can be crafted for desired outputs.

The use of custom instructions to provide the AI with specific user context is highlighted.

Miller's experience with GPT's ability to create images and the bias inherent in the model is shared.

The importance of priming the AI with context, goal, and desired solution format is emphasized for effective interaction.

The process of working with GPT to solve complex tasks, such as the isqb exam, is demonstrated step by step.

Miller discusses the challenges and workarounds when dealing with the limitations of the AI's context window.

The potential of GPT models to assist in software development tasks, such as creating algorithms and technical contexts, is showcased.

The talk concludes with a recommendation to subscribe to the paid model of GPT for its enhanced capabilities and value.

Transcripts

play00:02

welcome to my talk using Ai and software

play00:06

design how chat GPT can help with

play00:08

creating a solution architecture I'm

play00:11

quite happy that the room is full I hope

play00:14

that everybody will take some takeaways

play00:19

home some few words about me my name

play00:22

Ralph D Miller um I work at dbst the it

play00:27

partner of the German Railway

play00:30

my interests are mainly documentation

play00:33

docs as

play00:34

code a little bit of security or to

play00:38

architecture and now ai I'm a maintainer

play00:42

of Doc toolchain and open source uh

play00:45

documentation dox's code um pro project

play00:50

and I'm contributor to Arc

play00:53

42 um you can easily find me on the on

play00:56

the internet find my email addresses so

play00:59

if if you want to contact me later this

play01:02

is not a

play01:03

problem a short

play01:06

disclaimer when you use chubbt be aware

play01:09

of

play01:11

dangers data protection might be a

play01:14

problem don't send private data personal

play01:18

data um to the

play01:20

system and there's also a problem with

play01:24

copyright because chat GPT might

play01:27

generate copyrighted info um that's very

play01:31

visible when you work with images it's

play01:34

not so visible when you work with text

play01:37

and code but I wanted to say this um up

play01:41

front and um yeah don't do this with a

play01:44

real exam um I'm talking now about the

play01:49

is aqb Advanced exam for those who don't

play01:54

know it is aqb is a international

play01:56

software architecture qualification

play01:59

board they have a certification process

play02:02

for Architects and they have an an

play02:07

example um task exam um which I will try

play02:12

to solve with ch GPT but you are not

play02:16

allowed to use chpt in the real exam so

play02:19

don't use those approaches for the real

play02:23

exam another short

play02:25

disclaimer I'm not the AI expert

play02:30

Specialists I'm a prompt

play02:32

engineer I use Ai and chpt I'm not too

play02:39

familiar with the backgrounds but

play02:43

nevertheless I want to talk about the

play02:46

basics how chpt works because you have

play02:49

to know it um in order to use it and um

play02:54

many people call those large language

play02:57

models like chpt

play03:00

a stochastic parrot not better than the

play03:04

um autoc completion of your mobile

play03:08

phone it's a neural

play03:11

network and um it just produces some um

play03:17

yeah probabilistic um for the next word

play03:21

which might follow and this um looks

play03:25

like something intelligent that's what

play03:29

people say

play03:31

say I say it's might be more the all

play03:36

knowing knowing monkey and why I think

play03:39

it's the case I will now try to explain

play03:44

it starts with comparing the gpt3 versus

play03:48

the GPT 4

play03:51

model both are generative pre-trained

play03:55

Transformers that's yeah Transformer it

play03:59

can transform text so it can um

play04:02

translate um text or it can translate um

play04:07

for instance uh um also your code from

play04:10

python to Java something like this and

play04:14

it is also capable you I guess raise

play04:17

your hand if you already have used uh

play04:20

Chet

play04:21

CHT yes so

play04:24

everybody who has used G uh jet GPT 4

play04:27

the paid model wow

play04:30

many people I would say

play04:32

50% so um you all know what GPT is

play04:38

that's great let's take a look at the

play04:41

difference so gpt3 was trained on 550

play04:46

gigabyte of text Data GPT 4 they say

play04:51

many

play04:52

terabyte um I say they say it's not

play04:58

really known you don't don't get too

play05:00

much information about what is behind

play05:03

those models what is behind this

play05:06

technology but some data leaked and some

play05:09

people estimate about it and yeah so

play05:13

these are the

play05:15

results and

play05:17

um the parameters so the weights of the

play05:21

neuron Network um for gpt3 it

play05:26

is uh 75 5 billion parameters and for

play05:32

GPT 4 it is said to be 500 billion

play05:36

parameters so there is a huge difference

play05:39

between those models between the free

play05:42

version and the paid version and there's

play05:45

also a huge difference between the free

play05:48

GPT 4 model which you can use with uh

play05:52

bing a the yeah Microsoft Bing search

play05:55

the um chat with Bing and nowadays it's

play05:59

called renamed

play06:01

co-pilot it behaves in a different

play06:04

way so gpt3 is four to get the real

play06:09

thing the real stuff you have to pay

play06:12

currently I think it's

play06:14

$20 but it's worth it so that's my first

play06:18

tip if you really want to work with um

play06:21

CHT then pay for it it's really worth it

play06:25

um that is uh another comparison so that

play06:29

um there is an an yeah uh a test an an

play06:36

academic test um and there are lots of

play06:39

tests uh which uh they have um applied

play06:42

to those models and

play06:45

gpt3 do5 scores

play06:49

65% the average human

play06:52

75% and gbt 4

play06:55

82% the reasons why those models reach

play06:59

those scores are different um they know

play07:04

a lot they they have seen nearly the

play07:07

whole internet and that might be the

play07:09

best reason why they score So High um

play07:13

people yeah argue about whether there's

play07:16

really reasoning behind it or not but if

play07:20

you want to work with such a model these

play07:22

figures count because it's important

play07:25

that you get the real stuff and not the

play07:28

silly answers

play07:29

from the stochastic

play07:31

parrot when you search for the

play07:34

architecture behind

play07:36

jgpt you get lots of scientific papers

play07:40

and you often get this Transformer

play07:43

architecture and yes if you are the AI

play07:48

expert you will understand this picture

play07:50

I'm not the AI expert so I made up my

play07:53

own

play07:55

architecture and um so what we know is

play08:00

that at a core is a neural

play08:02

network and we have text input we have

play08:06

natural language processing this is

play08:09

already quite important because your

play08:12

text will not just fed to the neural

play08:15

network there's a language processor

play08:18

before it so that it understands the

play08:21

difference of words for instance whether

play08:24

when you talk about Washington whether

play08:26

it's a a person or um the

play08:30

city this fed to the neural network then

play08:34

there's again some kind of output

play08:36

processor and text

play08:39

output but that's not

play08:42

everything because we have a context we

play08:45

just not only feed your question to the

play08:50

model but we also have a context when

play08:52

you chat with a model you build up

play08:54

context I will tell you a little bit

play08:57

more about this later and there's a

play09:00

so-called mixture of experts it seems

play09:03

that there's not only one neural network

play09:06

at the core but several expert neural

play09:09

networks so that might be also reason

play09:12

why some questions are better answered

play09:16

than

play09:18

others and it's

play09:21

multimodal what does it mean we not only

play09:25

can feed text to the machine we can also

play09:27

feed image images to the machine there's

play09:30

an image

play09:32

recognition which then results in some

play09:35

textural

play09:36

output there's Deli 3 for instance as

play09:40

output processor to generate uh artistic

play09:43

images not diagrams just artistic

play09:46

images and we have voice

play09:50

recognition and we also have text to

play09:53

speech

play09:54

output and we have a lot of more things

play09:57

like the code interpretor and that's for

play10:00

instance an an interesting point because

play10:03

nowadays when you have the code

play10:04

interpreter enabled because you have the

play10:07

paid model and you ask the model a

play10:11

mathem mathematical question like what's

play10:14

the square root of

play10:16

15 it will not respond from its neural

play10:20

network it will create code for the code

play10:23

interpreter to calculate the

play10:28

answer lots of plugins

play10:30

aailable and that's it about the

play10:33

architecture what I think it's important

play10:37

it's also important to know that when

play10:39

you use uh jgpt you have the predefined

play10:43

font

play10:44

end and uh yeah you you have to take

play10:48

what it gives you um soon you will

play10:52

notice that you will have

play10:56

more yeah

play10:58

more Freedom if you work with the API

play11:02

and build your own front

play11:05

end oh sorry there is a typo with a

play11:09

context is you will notice a lot of

play11:11

typos in in these slides please I'm

play11:14

sorry for that let's talk about the

play11:16

context of the model when you start to

play11:19

chat with a

play11:21

model you will enter some priming I'm a

play11:27

software developer working on a

play11:29

web-based application with spring Boot

play11:31

and

play11:31

MySQL so the machine knows something

play11:35

about you something about the context of

play11:38

the

play11:39

problem you then start to chat with the

play11:42

machine and everything which you what

play11:46

you exchange with a machine adds to the

play11:49

context and the API is stateless so

play11:52

every time you send a new request the

play11:55

full context is sent to the machine and

play11:58

the first problem occures when you get

play12:01

out of the

play12:03

context in the beginning the context was

play12:06

quite

play12:07

small I think currently chat gbt 4 has a

play12:11

context so there's a chat front end of

play12:14

8,000 tokens a token is something

play12:18

between uh one character and a

play12:21

word

play12:23

and when you reach the end of the

play12:27

context your first messages will get out

play12:31

of context and it will forget about your

play12:34

priming about the main problem and so it

play12:38

will drift it will drift with its

play12:40

answers because it doesn't know about

play12:44

the the beginning of the of the session

play12:48

um

play12:49

interestingly it somehow depends on the

play12:52

front and because I investigated a

play12:56

little bit more in the context and

play12:59

noticed that jpt starts to compress the

play13:03

context by reducing its own answer size

play13:09

to something sometimes just hey I've

play13:13

answered the question of the user that's

play13:16

it so it keeps your statements but

play13:21

compresses its own statements to work

play13:24

around this

play13:26

problem gpt3 was said to have 2,000

play13:30

tokens GPT 4 um some months ago had uh

play13:35

32,000 tokens um these are the token

play13:40

sizes or um yeah token size of the of

play13:44

the model um when you use the front end

play13:48

um the front is end is relatively cheap

play13:52

say avoid to give you the full cont

play13:55

context size which is at the moment um

play14:00

128,000 tokens so if you use a chat I

play14:05

think you have around 8,000 tokens if

play14:09

you use the API you can get the full

play14:13

set so first priming

play14:16

tip I started to start every

play14:21

session

play14:24

with with um The Prompt that CHT should

play14:29

start every response with a greater sign

play14:33

why because it produces markdown output

play14:37

and in markdown it's just the the quote

play14:40

Mark the line on the left and this way I

play14:45

can see whether my first statement ran

play14:48

out of context or

play14:51

not um it works quite

play14:56

well for some chat front ends so as I

play15:01

said if it compresses its own um answers

play15:05

this will not work but it's somehow an

play15:09

an indicator and it shows you that you

play15:11

have to be a little bit creative when

play15:15

you work with a

play15:18

system embeddings embeddings is also

play15:21

something um quite powerful and this is

play15:24

only a short introduction to embeddings

play15:27

um

play15:29

the the neural network is

play15:33

already yeah trained and you you can't

play15:36

easily change it and uh the solution to

play15:41

um to give your model your own data or

play15:45

to give Chet GPT your own data your own

play15:47

documents you want to work with for

play15:49

instance your code is to put your code

play15:52

in context if you have limited

play15:55

context then you can't put your your

play15:58

whole

play15:59

document your whole codee in context

play16:02

when you have the huge context through

play16:05

the API is a one 28k

play16:08

context you could put it in the context

play16:12

I mean um that's enough for some books

play16:15

but it gets costly if the context is

play16:18

full you pay I think one for 1 cent for

play16:23

th000 tokens so you pay more than €1 per

play16:28

request if the context is full so the

play16:31

solution is to break down the your text

play16:35

your um context you want to embed into

play16:39

fragments into

play16:41

chunks and um put those chunks in a

play16:45

vector

play16:46

space um turn those words into vectors

play16:52

and store them in a vector database so

play16:54

that with every request you can take a

play16:58

look at at the vector space see your own

play17:01

prompt is near which chunks in the

play17:04

vector space and just use this chunk

play17:08

or uh some of those chunks to embed into

play17:13

the context to talk with with ch about

play17:17

your

play17:19

data again it's a matter of how many

play17:22

chunks you embed but that's a a good way

play17:26

to to work with your own documents your

play17:28

own data with such a

play17:32

model again we have huge contexts

play17:35

available but it's also a little bit

play17:38

costly and now with um with knowing

play17:43

about all of this I

play17:46

think the model chpt the API is quite

play17:52

powerful and with those

play17:55

embeddings it can have access to the

play17:58

data of the whole world not only the

play18:02

weights of uh its neural network you can

play18:05

use a browser plugin for instance so

play18:08

that it can um search for its own data

play18:11

you can embed your data and so um chat

play18:15

chip T knows everything can retrieve

play18:21

everything but it's not too good at

play18:25

reasoning like an all- knowing monkey

play18:30

but let's get started let's talk about

play18:32

prompt

play18:35

engineering priming the preparation when

play18:38

you start to work with CET GPT every

play18:41

session starts from

play18:43

scratch there were some changes

play18:46

to let chat chpt memorize some

play18:50

information it's not rolled out to all

play18:52

users at the moment but there are some

play18:55

work

play18:56

arounds and but you you still have to

play19:00

keep in mind every session starts from

play19:03

scratch chat chpt doesn't know about the

play19:06

other sessions you already had with it

play19:09

so you have

play19:11

to prepare it you have to tell it what

play19:14

the cont context is you want to talk

play19:18

with um you have to tell it about the

play19:21

goal you want to achieve in this session

play19:25

and you should also tell it how this

play19:28

solution look should look like so for

play19:31

instance

play19:33

um context that your um Java developer

play19:37

and your goal is um to create some kind

play19:40

of algorithm and the solution should be

play19:44

a

play19:47

library um here's an example of a

play19:51

context and what I found quite

play19:53

interesting with this example is I mean

play19:57

an experience software architect I don't

play20:00

like um JavaScript um and I created an

play20:05

IM through Delhi I asked uh chpt to

play20:08

create an image and um it depicted me as

play20:12

quite

play20:14

old I thought about it I thought about

play20:18

how can I change this bias and I told it

play20:22

hey I really like JavaScript I like

play20:25

front-end code and yes

play20:31

okay take a look at it's this old style

play20:35

calculator and all those

play20:38

books okay so it got me I'm

play20:43

old so um I also extended this context

play20:49

to give him to give CHP some knowledge

play20:53

about my experience so it knows what it

play20:57

can can expect what I already

play21:00

know and I don't want to put in this

play21:04

whole context with every session so open

play21:08

AI said okay we can fix this there's a

play21:12

feature called custom

play21:14

instructions what would you like jgpt to

play21:16

know about you to provide better

play21:20

responses it's an limited field input

play21:24

field but it's enough to put in this

play21:27

context

play21:28

so the results will get better and

play21:31

that's some kind of long-term memory you

play21:35

sometimes have to go back to it to brush

play21:38

it up to add some experience you gained

play21:42

and maybe remove some um so that's

play21:45

really

play21:47

helpful and there are not only the

play21:49

custom

play21:51

instructions but

play21:53

also how would you like Chet GPT to

play21:57

respond

play21:59

and I found some

play22:03

interesting information on the internet

play22:05

what you can

play22:06

write and for instance here this start

play22:10

every response with a greater sign and

play22:12

this was a m

play22:14

mistake

play22:16

because it will keep this in the session

play22:21

so this this doesn't work in a good way

play22:24

but um everybody's talking about the h

play22:28

ination of the um large language

play22:31

models provide accurate and factual

play22:35

answers which basically says don't lie

play22:37

to

play22:38

me and um there's also no need to

play22:42

disclose your an AI so um you know those

play22:46

lengthy disc discussions where the

play22:48

system always tells you hey there's an

play22:51

information cut off and yes I'm only in

play22:53

Ai

play22:55

and wow these prompts will shorten the

play22:59

answers and save you some context and

play23:03

bring the discussion to the

play23:07

point

play23:10

um yeah Leave Out All politeness phrases

play23:13

answer shortly and precisely PR yeah um

play23:18

regarding politeness it

play23:22

seems the way that it it makes sense to

play23:25

be polite to say thank

play23:28

you because the model was trained with

play23:32

the whole data on of the

play23:34

internet and if you are polite you get

play23:37

the part of the internet where people

play23:39

are polite if you're not

play23:42

polite you get the bad

play23:45

parts at least that's what Scott

play23:47

Hanselman um reasoned uh in a talk by

play23:51

him he's from

play23:54

Microsoft and um I also added I I mean I

play23:59

I like to document things and I like to

play24:01

use asid do instead of uh markdown and

play24:05

so I told the system when you create a

play24:08

document please create asid do output

play24:12

and also how I want to have it formatted

play24:16

so for instance with when you um work

play24:19

with chpt and want to produce some code

play24:21

you can also this is a place where you

play24:25

tell jet gbt which libraries you

play24:28

normally use which libraries the system

play24:31

should avoid so that you don't have to

play24:34

fix that in every

play24:38

session

play24:40

um I also start every session with a

play24:45

little bit of small talk I ask the

play24:48

system whether it knows about the

play24:51

Technologies and things I want to talk

play24:53

about so here I ask whether it knows the

play24:57

is aqb and this way it creates its own

play25:02

context I don't have to tell it about it

play25:05

it retrieves this information from its

play25:08

knowledge and puts it into the context

play25:12

that's from my regards uh it's it's

play25:16

quite

play25:17

helpful I also asked it about the

play25:20

advanced level

play25:22

certification before I start to solve

play25:24

the advanced level certification with it

play25:30

and I also used the feature that I can

play25:34

upload

play25:35

PDFs

play25:37

to

play25:38

yeah to upload the rules um of the

play25:43

certification so it knows about it and

play25:46

can stick to the

play25:48

rules also a

play25:50

glossery it was a wable so it makes

play25:54

sense that system knows about it and

play25:57

it's quite convenient that I can just

play25:59

upload those documents as PDF but there

play26:02

are

play26:04

limitations

play26:06

now we have primed the system we have

play26:09

the example task it's called Big Spender

play26:12

it's a webbased

play26:15

application and um I tell the system it

play26:19

should um read the document and not

play26:23

start with a task yet with with solving

play26:26

the task

play26:28

it summarizes document so I see yes it

play26:32

seems it has read the

play26:34

document

play26:36

but it extracts the text from the PDF

play26:41

not the images in this document there

play26:43

are two

play26:45

images a business context and a business

play26:49

class model and I already had some

play26:54

experience and know knew that um it will

play26:57

not not extract those images so I got

play27:00

those images and also uploaded

play27:04

them and it's interesting that it can

play27:08

recognize those

play27:10

diagrams um if you ask the system

play27:13

whether yeah what What's um visible uh

play27:17

on this diagram and what kind of

play27:19

connections there are it is quite good

play27:22

at telling you it recognizes the

play27:25

content but it's only quite good it's

play27:28

not

play27:32

perfect so

play27:34

um I also had the idea when I started to

play27:37

solve the

play27:38

problem to tell the system before you

play27:42

solve a task che check if you have any

play27:44

questions regarding the task and ask me

play27:47

those

play27:48

questions that that was just a test and

play27:53

oops it came back with 10

play27:56

questions wow

play27:58

wow that was a great experience and you

play28:02

can even for instance if you want to

play28:04

decide on a library or you looking for a

play28:06

library or something like this or a tool

play28:09

you can tell the system hey I'm looking

play28:12

for a library please ask me questions

play28:16

and then make a suggestion it works and

play28:19

you can answer these questions one by

play28:21

one or in one long prompt it works

play28:26

great there's

play28:28

one example is a regul regulatory

play28:32

requirements and that is something I

play28:34

made a mistake I gave a wrong answer and

play28:39

poisoned my session through this because

play28:43

because of this wrong answer

play28:46

which was the answer was more important

play28:50

for the system than the the given task

play28:54

and so it made some wrong decisions

play28:57

based based on on my

play28:59

answer First subtask Quality attributes

play29:04

um again I asked the system to repeat

play29:09

the task in order to create some some

play29:13

context so it I'm I'm sure that it

play29:16

really knows about the task and the task

play29:19

is freshly in the context it

play29:22

worked what's interesting here it didn't

play29:26

look up the document again it just knew

play29:30

it and so I started to

play29:34

um yeah repeat the task and told it to

play29:38

um derive the quality scenarios and hey

play29:41

it created me an ased do table that's

play29:44

what I wanted and it looks quite good

play29:48

okay the importance of of everything is

play29:50

high only one medium but that's okay for

play29:54

for a first start what I didn't do is to

play29:58

dig deeper into this um if you take a

play30:03

deep look at the results yes they are

play30:06

okayish but no you won't succeed with

play30:10

the exam with those

play30:13

results greater utility as a

play30:18

graphic wow it told me not only here is

play30:22

a source code of plant uml uh text to

play30:25

diagram Library it created a file and

play30:29

said here's a file to download it was

play30:32

something new to me um normally it just

play30:35

created a source code and I had to copy

play30:37

and paste

play30:38

it chat GPT can't create

play30:43

diagrams not with this front end if you

play30:46

build your own front end you can use for

play30:50

instance the croi server which is

play30:52

capable of creating diagrams and that's

play30:55

quite interesting because if you tell

play30:57

the system here's a tool use it it uses

play31:01

the tool it will get in very likely a

play31:05

syntax error the syntax error will be

play31:08

sent back to the API and the API say oh

play31:12

sorry wait a moment I will fix this it

play31:15

will iterate over its own source code

play31:17

and create uh come up with a with a good

play31:23

example and here yes utility tree looks

play31:26

like a ility tree not the best but yes

play31:30

we have a result and now I could go

play31:33

deeper into discussion with the system

play31:36

and uh help the system to come up with a

play31:40

better

play31:42

result now um

play31:47

yeah identify and wait key quality goals

play31:51

so I I um I mean the the content of this

play31:56

is not so so so much important it's just

play32:00

important that you see what the system

play32:02

is capable of um I ask it to um to

play32:06

explain the motivation in two to three

play32:11

sentences create a table with a column

play32:15

ID

play32:19

and yeah the the motivation should be in

play32:23

a line by its own which has a call span

play32:26

of

play32:28

three it is capable of doing

play32:31

so and I think that's quite

play32:36

good and um now that I prepared the

play32:40

system with just some subtasks I asked

play32:43

it to create those subtasks and then I

play32:47

asked it uh to create the final solution

play32:50

for the task and also create some

play32:54

introductory test text um um and yes it

play32:58

created an asid do document with all the

play33:03

information and I was quite happy I

play33:07

think that's quite a surprisingly good

play33:14

result second subtask a solution

play33:17

strategy repeat the OB objective for

play33:20

second

play33:21

subtask as stated in the document as you

play33:24

can see here um we can

play33:29

rephrase

play33:31

our our um statements so um I it took

play33:35

three approaches in this case to find

play33:38

the proper prompt when I said repeat the

play33:42

objective for the second subtask without

play33:45

as stated in the

play33:46

document it wasn't correct so I added

play33:50

this as stated in the

play33:53

document and um as you can see it then

play33:56

started to to again look up the

play33:59

document

play34:02

um when you do it this way when you

play34:04

rephrase your prompt it helps to keep

play34:08

the context short if you just create a

play34:12

new prompt which is rephrased then you

play34:16

add to the to the context and maybe

play34:19

poison your session because the first

play34:21

results were not as good and um maybe um

play34:26

retrieved wrong information and this

play34:28

poisons your session so always use the

play34:33

the um the feature to modify your

play34:39

prompt so in this way it worked that it

play34:42

uh yeah re repeated the

play34:46

objective I asked it to solve the um

play34:50

solution

play34:51

strategy and uh it came up with um yeah

play34:56

a solution ution strategy that's okay

play34:59

and um ah it said it needs to confirm a

play35:04

few aspects in the beginning I told the

play35:08

system to ask questions when

play35:13

it need some more

play35:16

information and here it uses used this

play35:21

and um needed said it needs to confirm

play35:25

some things um for the solution it needs

play35:27

for instance uh to know about the

play35:30

deployment environment scalability and

play35:33

so on and so I gave it this information

play35:36

in this case one more complex uh

play35:43

prompt and it came up with a solution

play35:47

strategy I was a bit surprised you

play35:50

haven't Now read the the whole task but

play35:54

the T it it really sticks to the task

play35:57

um I would have um described the

play36:00

solution strategy as free form text but

play36:04

um the task really uh requires to name

play36:08

the key constraints assumptions and

play36:10

basic principles and it does it this way

play36:14

so it really follows the

play36:18

task now I was worried about the context

play36:22

and ask the system how much is

play36:24

left says 2 tokens out of 4,000 tokens

play36:29

this information is not reliable it

play36:32

doesn't really know about the context

play36:35

some front ends shows you the

play36:38

context what's interesting if you ask it

play36:41

to to save the whole context in a file

play36:45

it will start the code

play36:48

interpreter and write with python the

play36:51

context uh to a file and then you will

play36:53

see that it maybe already compressed the

play36:56

cont

play36:59

context at this moment I thought okay I

play37:04

wasn't aware of the problems with this

play37:06

but

play37:08

I yeah Reloaded The the answer and now I

play37:13

got 8,000 tokens

play37:16

so it's not really reliable and yeah the

play37:21

greater signus is gone don't know where

play37:24

it's gone but here it's back again as

play37:28

you can

play37:30

see don't

play37:31

know okay third subtask technical

play37:37

context yeah in the

play37:40

original task it's stated that you have

play37:43

to create a technical context which is

play37:47

defined as a

play37:48

blackbox and in the task it also States

play37:52

you should create an overview of

play37:54

purchased and open source

play37:57

Parts but if it's still a black box you

play38:00

don't have purchased and open source

play38:02

part uh parts so

play38:05

it's the system

play38:08

just left this out I'm not sure whether

play38:11

it notic that it doesn't make sense or

play38:15

whether some other problem so let's

play38:20

see

play38:22

um so I asked the system to create a

play38:26

context diagram with a um C4 model

play38:30

notation by Simon

play38:32

Brown and it came up with something very

play38:36

trivial that's not useful that's plain

play38:42

wrong so I thought about it and there's

play38:46

a technique gives the model time to

play38:50

think again build up

play38:54

context um let's start to work on the

play38:57

technical context first name all actors

play39:01

then name all external system then name

play39:03

all external

play39:06

interfaces and now I get an overview

play39:09

this is exactly what I want to see in

play39:11

the technical uh in the context

play39:14

yeah and now I told I

play39:18

repeated my

play39:20

prompt and now I get a good technical

play39:24

context so this method that the system

play39:28

first has to tell you which steps it

play39:32

will it plans to take will give you

play39:37

better answers and that's not only for

play39:39

the diagram that's for everything

play39:42

there's a easy mistake which you can do

play39:46

uh when you when you ask the the system

play39:50

to solve a

play39:52

problem and then explain it to me that's

play39:56

the wrong way around because it first

play39:59

solves the problem in the wrong way and

play40:02

then explains the wrong way to you ask

play40:05

the model to First explain how it will

play40:09

solve the

play40:10

problem and then solve

play40:15

it now with a business structure it's uh

play40:18

nearly the the same um I knew that it

play40:24

will come up with a not so good result

play40:27

so I already gave the model time to

play40:30

think and got a better

play40:33

result then we have the technology uh

play40:36

technology stack the next task and here

play40:39

it's quite

play40:41

interesting because it didn't manage to

play40:44

repeat the

play40:45

objective and I was quite surprised why

play40:49

not and I took a look at the original

play40:52

document and found out

play40:54

that there's a page break in

play40:58

between and that a is a problem for the

play41:01

system because it extracts all the text

play41:04

and I'm I'm not sure what it does with a

play41:07

page break with a footer I guess it will

play41:10

also extract the footer it is somehow in

play41:13

between the task and um this yeah this

play41:17

results in the problem that it can't

play41:20

really retrieves the

play41:22

task as a work around so if you have it

play41:25

under your own control if you use the

play41:28

API you would fix it that you will

play41:30

recognize the footer in this case I

play41:33

could only um do the work around that I

play41:36

put the the whole text of the task in

play41:39

the context

play41:41

and yes then

play41:44

um it worked quite well it uh came up

play41:48

with um with a business context um and

play41:54

the task was to map the business context

play41:58

to the uh technology stack and it came

play42:01

up with some uh

play42:04

workflow on the left and with the

play42:07

systems involved and um the contribution

play42:10

to Quality goals I'm quite impressed

play42:13

with

play42:15

this about the

play42:17

context wait a

play42:19

moment it says everything's fine now it

play42:22

has

play42:24

8,192 Co tokens okay

play42:27

so it doesn't really know about

play42:30

itself

play42:32

um now I had to State read the full

play42:36

objective with the next

play42:39

task and um here it should um wait the

play42:44

scenarios quality scenarios by

play42:47

risk I was quite um yeah those results

play42:53

are quite okay sorry I'm a bit bit

play42:56

running out of time and um

play43:00

now I re again ask about the context and

play43:05

now it noticed okay it thinks that we

play43:08

have uh used up more tokens than uh we

play43:12

really have a

play43:14

wable and um now it says the earliest

play43:18

parts of our conversation are no longer

play43:21

in the immediate context this is

play43:23

something you always have to keep in

play43:26

mind the context the context is quite

play43:28

Val valuable um you have to use a model

play43:32

which has enough context which uh for

play43:35

for your task for your session and keep

play43:38

the context somehow in

play43:43

mind now the

play43:46

conclusion I'm quite happy um what I

play43:49

learned from this experiment and I'm

play43:52

quite surprised of uh about what the

play43:55

model is capable

play43:59

of it can transform the exam input to a

play44:03

solution output it is a Transformer it

play44:06

works quite well with

play44:08

this it needs

play44:10

guidance um you have to tell it what to

play44:13

do you have to take a look at the output

play44:17

verify the output get into a feedback

play44:21

loop as I told you with a diagrams

play44:24

plugin it can get get itself into the

play44:27

feedback loop if you give it a code

play44:30

interpreter for your language you can

play44:33

create a Java code interpretor you can

play44:36

do test driven development you can give

play44:38

it a problem you can give it some

play44:41

expected output and it will create code

play44:46

verify the result against your expected

play44:49

output and iterate over it that's really

play44:54

great uh

play44:57

um yeah you can

play45:01

even put those results it created again

play45:05

back as prompt into the machine and ask

play45:08

it whether it's a good result or not and

play45:12

it will find its own

play45:16

shortcomings yeah um there's an examiner

play45:21

um about wolf I had some uh YouTube

play45:24

video sessions with him to go through

play45:26

the answers and know those answers are

play45:31

not good enough to be

play45:34

accepted um CH GPD would have uh re to

play45:38

rework it and um the oral exam

play45:43

afterwards after the

play45:45

homework as you all know we can create

play45:48

video we can create um uh text to speech

play45:53

so the future is near that such an model

play45:57

will also be able to pass an oral

play46:01

exam the main tip I want to give you is

play46:05

pay those 20 bucks for the paid model

play46:09

it's really worth

play46:11

it thank you for your attention if you

play46:15

have any questions I will be

play46:18

around just approach

play46:22

[Applause]

play46:24

me

Rate This

5.0 / 5 (0 votes)

Related Tags
AI in TechSoftware ArchitectureGPT ApplicationsChatbot DevelopmentDocumentation ToolsTech IndustryInnovative SolutionsData ProtectionOpen SourceProfessional Development