1
00:00:00,600 --> 00:00:01,880
Let's start with a company inbox.

2
00:00:02,200 --> 00:00:05,320
A customer writes: The wardrobe arrived damaged. Please replace
it.

3
00:00:05,560 --> 00:00:06,760
The shop opens tomorrow.

4
00:00:07,400 --> 00:00:08,760
What should the system do?

5
00:00:09,080 --> 00:00:11,320
One small decision is enough to start.

6
00:00:11,507 --> 00:00:14,520
Route the message to complaints, sales, or accounting?

7
00:00:15,000 --> 00:00:17,320
We need a choice instead of a long reply.

8
00:00:17,600 --> 00:00:20,280
That's what a typed-decision model is for.

9
00:00:20,680 --> 00:00:23,400
You define the allowed response type in advance.

10
00:00:23,613 --> 00:00:26,920
The model scores the options; the application uses the result.

11
00:00:27,187 --> 00:00:32,920
We'll move from this simple choice to probabilities, dynamic
classifiers, and decisions with costs.

12
00:00:33,180 --> 00:00:36,840
The numbers in these animations are teaching examples, not
benchmark results.

13
00:00:38,733 --> 00:00:40,573
Before we look inside, a little history.

14
00:00:40,829 --> 00:00:43,933
TypeSafe introduced Jev as the first System One model.

15
00:00:44,533 --> 00:00:50,413
It highlighted a simple idea: AI can give a program a ready-to-use
decision and probabilities.

16
00:00:50,933 --> 00:00:53,053
Classification itself has been around for a long time.

17
00:00:53,253 --> 00:00:57,613
What matters here is combining language understanding with a task
defined in each request.

18
00:00:57,913 --> 00:01:00,973
One interface can serve many different processes.

19
00:01:01,253 --> 00:01:05,933
Tools, open implementations and further improvements began to
emerge around Jev.

20
00:01:06,253 --> 00:01:13,053
Basal is part of this movement: a Polish project developing models
and its own decision engine that you can run locally.

21
00:01:13,346 --> 00:01:18,253
That is the path we will follow: from the idea and simple answer
types to basal's extensions.

22
00:01:18,553 --> 00:01:21,293
First, let's unpack the name System One.

23
00:01:23,167 --> 00:01:25,327
Where does the name System One come from?

24
00:01:25,887 --> 00:01:29,727
It refers to a distinction popularized by psychologist Daniel
Kahneman.

25
00:01:29,956 --> 00:01:33,407
System One describes fast, automatic responses.

26
00:01:33,590 --> 00:01:37,326
System Two means slower, deliberate consideration of each step.

27
00:01:37,807 --> 00:01:40,527
In AI, this is an analogy for how a system works.

28
00:01:40,847 --> 00:01:44,927
A quick choice among options, rather than generating a long
explanation.

29
00:01:45,227 --> 00:01:50,527
It does not mean the model recreates the human mind or that a fast
answer is always correct.

30
00:01:50,827 --> 00:01:58,127
One example is basal: a Polish open decision model, a dynamic
System One classifier.

31
00:01:58,500 --> 00:02:03,647
You can run it on your own hardware, supplying questions and
descriptions of the allowed answers.

32
00:02:04,067 --> 00:02:06,847
We will use basal as our concrete example from here on.

33
00:02:07,027 --> 00:02:10,366
First, let us see what such a decision looks like from an
application’s perspective.

34
00:02:12,167 --> 00:02:15,447
You can think of this model as an intelligent IF or CASE.

35
00:02:15,927 --> 00:02:18,007
You provide the input data: the context.

36
00:02:18,287 --> 00:02:21,047
You add a question and several possible answers.

37
00:02:21,607 --> 00:02:26,167
Instead of coding a rule for every wording, you ask the model to
interpret the meaning.

38
00:02:26,455 --> 00:02:32,007
You get the probability of each option and the model's choice of
the most appropriate one.

39
00:02:32,647 --> 00:02:39,287
In our example: 82% for complaints, 12% for sales, and 6% for
accounting.

40
00:02:39,714 --> 00:02:42,887
When choosing one category, they add up to 100%.

41
00:02:43,267 --> 00:02:45,927
The tallest bar marks the selected category.

42
00:02:46,117 --> 00:02:51,207
The program gets a predefined identifier and numbers, making it
easy to choose the next step.

43
00:02:51,727 --> 00:02:58,647
Reading out a choice instead of generating a long reply usually
takes less computation, time, and money.

44
00:02:58,927 --> 00:02:59,927
But be careful.

45
00:03:00,167 --> 00:03:02,567
Correct formatting does not mean a correct decision.

46
00:03:02,940 --> 00:03:07,927
If the right answer is missing, the model may still choose one of
the options provided.

47
00:03:08,407 --> 00:03:11,847
It helps to include 'other topic' or 'insufficient data'.

48
00:03:13,733 --> 00:03:17,093
A conventional classifier is often trained for a fixed set of
classes.

49
00:03:17,280 --> 00:03:19,893
For example: complaints, sales, and accounting.

50
00:03:20,293 --> 00:03:23,893
Changing that set may require new data and further training.

51
00:03:24,173 --> 00:03:26,613
Here, class descriptions are part of the input.

52
00:03:26,973 --> 00:03:31,093
For the same message, we can now ask: what kind of help does the
customer want?

53
00:03:31,693 --> 00:03:34,613
The options are replacement, refund, and repair.

54
00:03:35,093 --> 00:03:36,933
The model's weights stay the same.

55
00:03:37,213 --> 00:03:41,653
By redefining the task, we dynamically create a different
classifier.

56
00:03:41,906 --> 00:03:47,893
The model must already be trained for such tasks, but we don't
retrain it for every list of classes.

57
00:03:48,266 --> 00:03:52,053
The first decision can also determine the next question.

58
00:03:52,426 --> 00:03:55,413
For a complaint, we ask how to resolve it.

59
00:03:55,653 --> 00:03:57,973
If it's an offer, we'd ask about the product.

60
00:03:58,373 --> 00:04:00,773
The application or agent defines this logic.

61
00:04:02,633 --> 00:04:04,393
Let's look inside basal.

62
00:04:05,065 --> 00:04:08,073
The context, question, and option descriptions go into the
transformer.

63
00:04:08,420 --> 00:04:11,193
Each option gets a short code, such as a letter.

64
00:04:11,593 --> 00:04:14,633
After processing the input, we read the scores for those codes.

65
00:04:14,873 --> 00:04:17,673
We don't need to generate a whole sentence token by token.

66
00:04:18,193 --> 00:04:22,473
Successive layers build a representation used to score each
option.

67
00:04:22,766 --> 00:04:24,953
These raw scores are called logits.

68
00:04:25,193 --> 00:04:29,513
Softmax turns them into positive values that add up to one.

69
00:04:29,730 --> 00:04:33,673
Temperature can then adjust how sharp the distribution is during
calibration.

70
00:04:33,973 --> 00:04:36,633
The engine maps the codes back to our labels.

71
00:04:36,926 --> 00:04:39,513
This is one way to build decision models.

72
00:04:39,806 --> 00:04:43,273
Other implementations may use a separate classification head.

73
00:04:43,573 --> 00:04:46,313
The response format alone does not dictate the architecture.

74
00:04:48,167 --> 00:04:51,127
A regular generative model can classify a message too.

75
00:04:51,407 --> 00:04:55,367
It first processes the input, then produces its answer one token
at a time.

76
00:04:55,740 --> 00:04:58,407
Each new fragment depends on the preceding ones.

77
00:04:58,847 --> 00:05:01,927
A longer answer means more sequential computation steps.

78
00:05:02,527 --> 00:05:07,527
With basal, after processing the input, we read the scores for the
allowed options and stop.

79
00:05:07,847 --> 00:05:10,407
We do not need a loop that writes an entire sentence.

80
00:05:10,674 --> 00:05:17,687
A generative model can cache earlier computations, but it still
has to determine the next tokens.

81
00:05:18,207 --> 00:05:24,247
Fewer steps and a smaller, specialized model mean less time and
less computation.

82
00:05:24,847 --> 00:05:31,367
For selection tasks, it can be many times faster and much cheaper
than a large model generating an answer.

83
00:05:32,114 --> 00:05:34,887
Across thousands of decisions, those savings add up.

84
00:05:35,180 --> 00:05:36,727
There is no fixed multiplier.

85
00:05:36,914 --> 00:05:40,727
A generative model returning just one letter can also be fast.

86
00:05:41,447 --> 00:05:47,687
Measure gains on the same tasks at the required quality,
accounting for hardware, input length and load.

87
00:05:49,567 --> 00:05:52,047
We can ask three different questions about the same message.

88
00:05:52,310 --> 00:05:54,527
Choice: which team should handle it?

89
00:05:54,900 --> 00:05:56,767
Complaints, sales or accounting?

90
00:05:57,127 --> 00:06:01,967
The result is one option and a probability distribution that adds
up to 100%.

91
00:06:02,607 --> 00:06:05,407
Noul: is the customer asking for a replacement?

92
00:06:06,031 --> 00:06:10,048
We get the probability of a yes answer: for example, 91%.

93
00:06:10,528 --> 00:06:13,568
This is a number from zero to one, not just true or false.

94
00:06:13,888 --> 00:06:18,528
Score: how urgent is it, on a defined scale from zero to four?

95
00:06:19,228 --> 00:06:22,928
The model assesses the levels, and the engine can compute their
weighted average.

96
00:06:23,128 --> 00:06:25,410
Here, that average is 2.65.

97
00:06:25,837 --> 00:06:28,370
It is a rating on a scale, not a confidence percentage.

98
00:06:28,663 --> 00:06:32,530
These three basic types are available in both the Jev interface
and basal.

99
00:06:32,890 --> 00:06:36,850
One choice, a yes-or-no assessment, or an ordered scale.

100
00:06:37,290 --> 00:06:39,810
But what if a message fits several labels at once?

101
00:06:41,767 --> 00:06:44,007
Let's return to the cracked wardrobe and the replacement request.

102
00:06:44,327 --> 00:06:47,607
Now we ask: which topics are present in this message?

103
00:06:47,927 --> 00:06:50,887
Damage, replacement or a payment issue?

104
00:06:51,227 --> 00:06:54,327
The multi type assesses each label independently.

105
00:06:54,607 --> 00:07:01,687
In our example, damage has 95%, replacement 83%, and payment 12%.

106
00:07:02,447 --> 00:07:04,247
Two topics can apply at the same time.

107
00:07:04,467 --> 00:07:07,047
The engine selects labels using a threshold we set.

108
00:07:07,260 --> 00:07:10,567
At 50%, damage and replacement are selected.

109
00:07:10,807 --> 00:07:16,807
These probabilities do not have to add up to 100%, because we are
not choosing one mutually exclusive category.

110
00:07:17,074 --> 00:07:19,047
This is one of the basal engine's extensions.

111
00:07:19,314 --> 00:07:27,447
We added multi, act and tool to the basic types: selecting a set,
a cost-based action, or an agent's tool.

112
00:07:27,767 --> 00:07:30,967
They save us from rebuilding this logic in every application.

113
00:07:32,867 --> 00:07:36,947
Suppose the model reports 90% confidence on 100 similar decisions.

114
00:07:37,427 --> 00:07:42,707
If it is well calibrated, we expect about 90 correct answers in
that group.

115
00:07:43,134 --> 00:07:46,707
This is a property of many decisions, not a guarantee for one
message.

116
00:07:46,987 --> 00:07:49,347
The model can be overconfident.

117
00:07:49,647 --> 00:07:54,147
So we fit calibration on separate data and check it on an
independent test set.

118
00:07:54,587 --> 00:07:56,547
Now let's set a threshold.

119
00:07:56,847 --> 00:07:59,667
Above it, the case is handled automatically.

120
00:07:59,967 --> 00:08:01,187
Below it, a person takes over.

121
00:08:01,827 --> 00:08:05,667
Raising the threshold usually means the system handles fewer cases
on its own.

122
00:08:06,254 --> 00:08:08,707
We choose the threshold based on the measured error in our
process.

123
00:08:08,960 --> 00:08:12,387
The max_error parameter offers no magic guarantee.

124
00:08:12,654 --> 00:08:19,587
Without a validated threshold, or if the data changes, we need
verification and the option to withhold an automated decision.

125
00:08:21,433 --> 00:08:23,033
Now imagine a refund.

126
00:08:23,453 --> 00:08:27,193
The model estimates a 90% probability that the complaint is valid.

127
00:08:27,713 --> 00:08:30,153
Should we pay out automatically?

128
00:08:30,553 --> 00:08:37,193
Suppose a wrongful payout costs PLN 1000, a wrongful refusal PLN
200, and human review PLN 20.

129
00:08:37,646 --> 00:08:39,593
These are illustrative costs for our example.

130
00:08:40,113 --> 00:08:44,073
The expected cost of paying is 10% times 1000: PLN 100.

131
00:08:44,593 --> 00:08:49,754
The expected cost of refusing is 90% times 200: PLN 180.

132
00:08:50,446 --> 00:08:51,913
Human review costs PLN 20.

133
00:08:52,313 --> 00:08:56,793
The act type chooses the action with the lowest expected cost
under the given rules.

134
00:08:57,033 --> 00:08:59,273
Here, that's human review.

135
00:08:59,513 --> 00:09:02,873
The model estimates probabilities; code calculates costs.

136
00:09:03,313 --> 00:09:06,793
Separate permissions and rules decide whether the action is
allowed.

137
00:09:08,667 --> 00:09:10,027
An agent needs to handle a complaint.

138
00:09:10,294 --> 00:09:15,067
We give it three tools: check the order, request a photo, and
arrange a replacement.

139
00:09:15,280 --> 00:09:17,467
The question is: which tool should it choose now?

140
00:09:17,687 --> 00:09:19,947
The procedure requires checking the purchase first.

141
00:09:20,187 --> 00:09:24,427
The tool type evaluates tool descriptions against the state and
selects the order check.

142
00:09:24,720 --> 00:09:27,947
It can also choose not to call a tool, or to ask for
clarification.

143
00:09:28,294 --> 00:09:30,507
Choosing a tool is not the same as executing it.

144
00:09:30,857 --> 00:09:32,347
Basal does not create arguments here.

145
00:09:32,574 --> 00:09:35,227
The application or agent provides the order number.

146
00:09:35,427 --> 00:09:39,227
Code checks the arguments and permissions before running the
operation.

147
00:09:39,487 --> 00:09:41,067
The result of the lookup goes back into the state.

148
00:09:41,307 --> 00:09:44,827
The model can now select the next step using the new information.

149
00:09:45,047 --> 00:09:48,267
Act and tool are experimental extensions of the basal engine.

150
00:09:48,534 --> 00:09:51,387
We test them in our own process before enabling automatic actions.

151
00:09:53,500 --> 00:09:54,780
Back to our message.

152
00:09:55,260 --> 00:10:00,060
We want its category, urgency, whether it needs a reply, and
matching labels.

153
00:10:00,487 --> 00:10:05,100
We could send four separate queries, processing the same text four
times.

154
00:10:05,650 --> 00:10:08,860
The basal engine can share computations for this context.

155
00:10:09,127 --> 00:10:11,820
This is SOAM: state once, ask many.

156
00:10:12,260 --> 00:10:15,900
We compute the shared prefix once; the questions form separate
branches.

157
00:10:16,220 --> 00:10:18,460
Each branch gets its own result.

158
00:10:18,700 --> 00:10:22,700
Independent questions can go in a single request to the System One
interface.

159
00:10:23,073 --> 00:10:27,660
If a question depends on the previous answer, we send it in the
next step.

160
00:10:27,873 --> 00:10:31,100
This saves repeated computation, especially with long contexts.

161
00:10:31,420 --> 00:10:35,420
The exact gain depends on the hardware, input length, and engine.

162
00:10:35,780 --> 00:10:39,820
One request need not mean one physical forward pass through the
entire network.

163
00:10:41,667 --> 00:10:42,707
What does this look like in a program?

164
00:10:43,147 --> 00:10:46,547
The application retrieves the message and sends one request to the
server.

165
00:10:46,803 --> 00:10:50,867
The state field provides context. The questions field defines what
to ask.

166
00:10:51,214 --> 00:10:53,987
Here, we ask which team to use and whether the customer wants a
replacement.

167
00:10:54,240 --> 00:10:57,027
The model does not open the inbox or company database itself.

168
00:10:57,467 --> 00:10:58,787
It evaluates the information it receives.

169
00:10:59,187 --> 00:11:07,027
The response contains the complaints ID and probabilities,
alongside the result of the yes-or-no question.

170
00:11:07,247 --> 00:11:08,707
Let's separate three roles.

171
00:11:08,920 --> 00:11:10,387
The model assesses meaning.

172
00:11:10,587 --> 00:11:15,747
The engine prepares the input, reads the outputs and computes the
required rules, such as costs.

173
00:11:16,187 --> 00:11:19,267
The application supplies data and carries out permitted actions.

174
00:11:19,567 --> 00:11:22,467
Engine features are not always new decision types.

175
00:11:22,774 --> 00:11:25,987
Facts helps calculate recognized amounts and dates in code.

176
00:11:26,327 --> 00:11:28,627
MCP makes decisions available to agents.

177
00:11:28,907 --> 00:11:33,027
We still need rules for our own process, not just a connection to
a model.

178
00:11:34,900 --> 00:11:38,340
Don't ask everything at once: is the case urgent, is the claim
valid, and should we replace the item?

179
00:11:38,660 --> 00:11:39,860
Those are several different assessments.

180
00:11:40,020 --> 00:11:41,780
Split them into separate, short questions.

181
00:11:42,073 --> 00:11:43,540
Define what the answers mean.

182
00:11:44,020 --> 00:11:46,820
For urgency, zero to four alone is unclear.

183
00:11:47,012 --> 00:11:53,220
Zero could mean no action needed, three a reply today, and four an
immediate safety threat.

184
00:11:53,673 --> 00:11:58,900
If a company rule or document is needed, the application should
include it in the context.

185
00:11:59,300 --> 00:12:02,820
When choosing one team, define clear category boundaries.

186
00:12:03,060 --> 00:12:04,980
For several topics, choose multi.

187
00:12:05,407 --> 00:12:07,220
Plan for missing data too.

188
00:12:07,540 --> 00:12:10,820
If we don't know the delivery date, we don't ask the model to
guess it.

189
00:12:11,100 --> 00:12:14,500
Let it identify the missing information, so the process can ask
for it.

190
00:12:14,860 --> 00:12:17,220
Leave exact calculations to code.

191
00:12:19,333 --> 00:12:20,373
How does the model learn to do this?

192
00:12:20,933 --> 00:12:25,333
For basal, we start with a language model and train it further on
decision tasks.

193
00:12:25,593 --> 00:12:32,133
Training teaches the task; calibration tunes confidence; an
independent test checks performance on new examples.

194
00:12:32,693 --> 00:12:35,253
In the application, we separate responsibilities.

195
00:12:35,803 --> 00:12:37,173
Code calculates amounts and deadlines.

196
00:12:37,373 --> 00:12:39,173
The model interprets meaning.

197
00:12:39,413 --> 00:12:41,333
Rules check permissions.

198
00:12:41,973 --> 00:12:44,533
Difficult or risky cases go to a person.

199
00:12:44,833 --> 00:12:49,813
A typed result alone does not protect against errors or malicious
instructions in a document.

200
00:12:50,093 --> 00:12:54,773
We need to test our own process and control what the application
does with the response.

201
00:12:55,413 --> 00:12:57,253
What about an image or recording?

202
00:12:57,913 --> 00:13:00,213
In a multimodal model, the input changes.

203
00:13:00,653 --> 00:13:04,933
The principle stays the same: context, question, and an allowed
result type.

204
00:13:05,233 --> 00:13:07,733
The basal omni family works this way too.

205
00:13:09,633 --> 00:13:12,353
Take one process and examples labelled by a person.

206
00:13:12,793 --> 00:13:17,473
Include everyday messages, edge cases and missing information.

207
00:13:17,873 --> 00:13:24,593
Also test pairs that differ by one word: please replace it, and
please don't replace it.

208
00:13:24,993 --> 00:13:28,913
Check each category separately, not just the average result.

209
00:13:29,553 --> 00:13:34,993
Measure errors, response time, and how many cases you can handle
at an acceptable level of risk.

210
00:13:35,660 --> 00:13:40,353
Choose the threshold on different examples from those used to
assess the final result.

211
00:13:41,193 --> 00:13:43,552
Does correcting an answer teach the model?

212
00:13:43,853 --> 00:13:46,353
A click alone does not change its weights.

213
00:13:46,577 --> 00:13:53,313
Corrections can become labels for tests, better questions, or a
separate fine-tuning step.

214
00:13:53,953 --> 00:13:56,913
Changing the options in a request is not training.

215
00:13:57,433 --> 00:14:02,913
Start in observation mode: the system proposes decisions but does
not execute them.

216
00:14:03,366 --> 00:14:08,273
After checking quality, gradually enable automation and watch for
new errors.

217
00:14:08,633 --> 00:14:12,353
That is how you build trust in a particular deployment.

218
00:14:14,333 --> 00:14:15,213
Let's put it all together.

219
00:14:15,453 --> 00:14:16,813
The message goes to the model.

220
00:14:17,186 --> 00:14:18,413
The question defines the task.

221
00:14:18,693 --> 00:14:20,653
The options define the space of possible answers.

222
00:14:21,093 --> 00:14:25,373
We get a probability distribution, then choose an action according
to the process rules.

223
00:14:25,629 --> 00:14:28,493
Generative and decision models can complement each other.

224
00:14:29,053 --> 00:14:31,533
Basal decides that a photo of the damage is needed.

225
00:14:31,773 --> 00:14:34,653
Bielik can draft a polite request for that photo.

226
00:14:34,933 --> 00:14:38,813
One task is a choice within limits; the other is writing new
content.

227
00:14:39,213 --> 00:14:39,933
One model.

228
00:14:40,213 --> 00:14:42,493
Many dynamically defined classifiers.

229
00:14:42,840 --> 00:14:44,493
You define the possibilities.

230
00:14:44,866 --> 00:14:45,613
The model scores them.

231
00:14:45,893 --> 00:14:46,813
The application acts.

232
00:14:47,053 --> 00:14:49,693
And people stay in control where needed.
