ptbk 0.73.0 → 0.74.0-11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +172 -3
  2. package/package.json +7 -3
package/README.md CHANGED
@@ -48,12 +48,63 @@ In all of these situations, but especially in 3., the **✨ Promptbook can make
48
48
 
49
49
 
50
50
 
51
+
52
+
53
+
54
+ ## 💜 The Promptbook Project
55
+
56
+ Promptbook project is ecosystem of multiple projects and tools, following is a list of most important pieces of the project:
57
+
58
+ <table>
59
+ <thead>
60
+ <tr>
61
+ <th>Project</th>
62
+ <th>Description</th>
63
+ <th>Link</th>
64
+ </tr>
65
+ </thead>
66
+ <tbody>
67
+ <tr>
68
+ <td>Core</td>
69
+ <td>Promptbook core is a description and documentation of basic innerworkings how should be Promptbook implemented and defines which fetures must be descriable by book language</td>
70
+ <td rowspan=2>https://ptbk.io<br/>https://github.com/webgptorg/book</td>
71
+ </tr>
72
+ <tr>
73
+ <td>Book language</td>
74
+ <td>
75
+ Book is a markdown-like language to define core entities like projects, pipelines, knowledge,.... It is designed to be understandable by non-programmers and non-technical people
76
+ </td>
77
+ </tr>
78
+ <tr>
79
+ <td>Promptbook typescript project</td>
80
+ <td>Implementation of Promptbook in TypeScript published into multiple packages to NPM</td>
81
+ <td>https://github.com/webgptorg/promptbook + Multiple packages on NPM</td>
82
+ </tr>
83
+ <tr>
84
+ <td>Promptbook studio</td>
85
+ <td>No-code studio to write book without need to write even the markdown</td>
86
+ <td rowspan=2>https://promptbook.studio<br/>https://github.com/hejny/promptbook-studio</td>
87
+ </tr>
88
+ <tr>
89
+ <td>Promptbook miniapps</td>
90
+ <td>Builder of LLM miniapps from book notation</td>
91
+ </tr>
92
+ </tbody>
93
+ </table>
94
+
95
+
96
+
51
97
  ## 💙 Book language _(for prompt-engineer)_
52
98
 
53
- Promptbook [pipelines](https://github.com/webgptorg/promptbook/discussions/64) are written in markdown-like language called [Book](https://github.com/webgptorg/book). It is designed to be understandable by non-programmers and non-technical people.
54
99
 
55
100
 
56
101
 
102
+ ## 💙 The blueprint of book language
103
+
104
+ Following is the documentation and blueprint of the Book language.
105
+
106
+ ### Example
107
+
57
108
  ```markdown
58
109
  # 🌟 My first Book
59
110
 
@@ -69,6 +120,60 @@ Promptbook [pipelines](https://github.com/webgptorg/promptbook/discussions/64) a
69
120
  -> {article}
70
121
  ```
71
122
 
123
+ ### Goals and principles of book language
124
+
125
+ File is designed to be easy to read and write. It is strict subset of markdown. It is designed to be understandable by both humans and machines and without specific knowledge of the language.
126
+
127
+ It has file with `.ptbk.md` or `.book` extension with `UTF-8` non BOM encoding.
128
+
129
+ As it is source code, it can leverage all the features of version control systems like git and does not suffer from the problems of binary formats, proprietary formats, or no-code solutions.
130
+
131
+ But unlike programming languages, it is designed to be understandable by non-programmers and non-technical people.
132
+
133
+ ### Structure
134
+
135
+ Book is divided into sections. Each section starts with heading. The language itself is not sensitive to the type of heading _(`h1`, `h2`, `h3`, ...)_ but it is recommended to use `h1` for header section and `h2` for other sections.
136
+
137
+ ### Header
138
+
139
+ Header is the first section of the book. It contains metadata about the pipeline. It is recommended to use `h1` heading for header section but it is not required.
140
+
141
+ ### Parameter
142
+
143
+ Foo bar
144
+
145
+ #### Parameter names
146
+
147
+ Reserved words:
148
+
149
+ - _each command_ like `PERSONA`, `EXPECT`, `KNOWLEDGE`, etc.
150
+ - `content`
151
+ - `context`
152
+ - `knowledge`
153
+ - `examples`
154
+ - `modelName`
155
+ - `currentDate`
156
+
157
+ #### Parameter notation
158
+
159
+ ### Template
160
+
161
+ Todo todo
162
+
163
+ ### Command
164
+
165
+ Todo todo
166
+
167
+ ### Block
168
+
169
+ Todo todo
170
+
171
+ ### Return parameter
172
+
173
+ ### Examples
174
+
175
+
176
+
72
177
  ## 📦 Packages _(for developers)_
73
178
 
74
179
  This library is divided into several packages, all are published from [single monorepo](https://github.com/webgptorg/promptbook).
@@ -107,11 +212,66 @@ Or you can install them separately:
107
212
 
108
213
 
109
214
 
215
+
216
+
217
+
110
218
  ## 📚 Dictionary
111
219
 
220
+
221
+
222
+
223
+
224
+
225
+ ### 📚 Dictionary
226
+
112
227
  The following glossary is used to clarify certain concepts:
113
228
 
114
- ### Core concepts
229
+ #### General LLM / AI terms
230
+
231
+ - **Prompt drift** is a phenomenon where the AI model starts to generate outputs that are not aligned with the original prompt. This can happen due to the model's training data, the prompt's wording, or the model's architecture.
232
+ - **Pipeline, workflow or chain** is a sequence of tasks that are executed in a specific order. In the context of AI, a pipeline can refer to a sequence of AI models that are used to process data.
233
+ - **Fine-tuning** is a process where a pre-trained AI model is further trained on a specific dataset to improve its performance on a specific task.
234
+ - **Zero-shot learning** is a machine learning paradigm where a model is trained to perform a task without any labeled examples. Instead, the model is provided with a description of the task and is expected to generate the correct output.
235
+ - **Few-shot learning** is a machine learning paradigm where a model is trained to perform a task with only a few labeled examples. This is in contrast to traditional machine learning, where models are trained on large datasets.
236
+ - **Meta-learning** is a machine learning paradigm where a model is trained on a variety of tasks and is able to learn new tasks with minimal additional training. This is achieved by learning a set of meta-parameters that can be quickly adapted to new tasks.
237
+ - **Retrieval-augmented generation** is a machine learning paradigm where a model generates text by retrieving relevant information from a large database of text. This approach combines the benefits of generative models and retrieval models.
238
+ - **Longtail** refers to non-common or rare events, items, or entities that are not well-represented in the training data of machine learning models. Longtail items are often challenging for models to predict accurately.
239
+
240
+
241
+
242
+ _Note: Thos section is not complete dictionary, more list of general AI / LLM terms that has connection with Promptbook_
243
+
244
+ #### Promptbook core
245
+
246
+ - **Organization** _(legacy name collection)_ group jobs, workforce, knowledge, instruments, and actions into one package. Entities in one organization can share resources (= import resources from each other).
247
+ - **Jobs**
248
+ - **Task**
249
+ - **Subtask**
250
+ - **Workforce**
251
+ - **Persona**
252
+ - **Team**
253
+ - **Role**
254
+ - **Knowledge**
255
+ - **Public**
256
+ - **Private**
257
+ - **Protected**
258
+ - **Instruments**
259
+ - **Actions**
260
+
261
+ #### Book language
262
+
263
+ - **Book file**
264
+ - **Section**
265
+ - **Heading**
266
+ - **Description**
267
+ - **Command**
268
+ - **Block**
269
+ - **Return statement**
270
+ - **Comment**
271
+ - **Import**
272
+ - **Scope**
273
+
274
+ #### 💯 Core concepts
115
275
 
116
276
  - [📚 Collection of pipelines](https://github.com/webgptorg/promptbook/discussions/65)
117
277
  - [📯 Pipeline](https://github.com/webgptorg/promptbook/discussions/64)
@@ -124,7 +284,7 @@ The following glossary is used to clarify certain concepts:
124
284
  - [🔣 Words not tokens](https://github.com/webgptorg/promptbook/discussions/29)
125
285
  - [☯ Separation of concerns](https://github.com/webgptorg/promptbook/discussions/32)
126
286
 
127
- ### Advanced concepts
287
+ ##### Advanced concepts
128
288
 
129
289
  - [📚 Knowledge (Retrieval-augmented generation)](https://github.com/webgptorg/promptbook/discussions/41)
130
290
  - [🌏 Remote server](https://github.com/webgptorg/promptbook/discussions/89)
@@ -139,6 +299,15 @@ The following glossary is used to clarify certain concepts:
139
299
  - [👮 Agent adversary expectations](https://github.com/webgptorg/promptbook/discussions/39)
140
300
  - [view more](https://github.com/webgptorg/promptbook/discussions/categories/concepts)
141
301
 
302
+
303
+
304
+ ### Terms specific to Promptbook TypeScript implementation
305
+
306
+ - Anonymous mode
307
+ - Application mode
308
+
309
+
310
+
142
311
  ## 🔌 Usage in Typescript / Javascript
143
312
 
144
313
  - [Simple usage](./examples/usage/simple-script)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ptbk",
3
- "version": "0.73.0",
3
+ "version": "0.74.0-11",
4
4
  "description": "Supercharge your use of large language models",
5
5
  "private": false,
6
6
  "sideEffects": false,
@@ -50,9 +50,13 @@
50
50
  }
51
51
  ],
52
52
  "peerDependencies": {
53
- "@promptbook/core": "0.73.0"
53
+ "@promptbook/core": "0.74.0-11"
54
54
  },
55
55
  "dependencies": {
56
- "promptbook": "0.73.0"
56
+ "promptbook": "0.74.0-11"
57
+ },
58
+ "bin": {
59
+ "promptbook": "bin/promptbook-cli.js",
60
+ "ptbk": "bin/promptbook-cli.js"
57
61
  }
58
62
  }