@promptbook/cli 0.74.0-5 → 0.74.0-7
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.
- package/README.md +60 -14
- package/esm/index.es.js +639 -176
- package/esm/index.es.js.map +1 -1
- package/package.json +4 -3
- package/umd/index.umd.js +643 -180
- package/umd/index.umd.js.map +1 -1
package/README.md
CHANGED
|
@@ -109,8 +109,6 @@ Rest of the documentation is common for **entire promptbook ecosystem**:
|
|
|
109
109
|
|
|
110
110
|
## 🤍 The Promptbook Whitepaper
|
|
111
111
|
|
|
112
|
-
|
|
113
|
-
|
|
114
112
|
If you have a simple, single prompt for ChatGPT, GPT-4, Anthropic Claude, Google Gemini, Llama 3, or whatever, it doesn't matter how you integrate it. Whether it's calling a REST API directly, using the SDK, hardcoding the prompt into the source code, or importing a text file, the process remains the same.
|
|
115
113
|
|
|
116
114
|
But often you will struggle with the **limitations of LLMs**, such as **hallucinations, off-topic responses, poor quality output, language and prompt drift, word repetition repetition repetition repetition or misuse, lack of context, or just plain w𝒆𝐢rd resp0nses**. When this happens, you generally have three options:
|
|
@@ -179,23 +177,17 @@ Promptbook project is ecosystem of multiple projects and tools, following is a l
|
|
|
179
177
|
|
|
180
178
|
## 💙 Book language _(for prompt-engineer)_
|
|
181
179
|
|
|
182
|
-
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.
|
|
183
|
-
|
|
184
180
|
|
|
185
181
|
|
|
186
|
-
```markdown
|
|
187
|
-
# 🌟 My first Book
|
|
188
182
|
|
|
189
|
-
|
|
190
|
-
- OUTPUT PARAMETER {article}
|
|
183
|
+
## 💙 The blueprint of book language
|
|
191
184
|
|
|
192
|
-
|
|
185
|
+
Following is the documentation and blueprint of the Book language.
|
|
193
186
|
|
|
194
|
-
|
|
187
|
+
### Example
|
|
195
188
|
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
## Write an article
|
|
189
|
+
```markdown
|
|
190
|
+
# 🌟 My first Book
|
|
199
191
|
|
|
200
192
|
- PERSONA Jane, marketing specialist with prior experience in writing articles about technology and artificial intelligence
|
|
201
193
|
- KNOWLEDGE https://ptbk.io
|
|
@@ -204,11 +196,65 @@ Promptbook [pipelines](https://github.com/webgptorg/promptbook/discussions/64) a
|
|
|
204
196
|
- EXPECT MAX 1 Paragraph
|
|
205
197
|
|
|
206
198
|
> Write an article about the future of artificial intelligence in the next 10 years and how metalanguages will change the way AI is used in the world.
|
|
207
|
-
> Look specifically at the impact of
|
|
199
|
+
> Look specifically at the impact of Promptbook on the AI industry.
|
|
208
200
|
|
|
209
201
|
-> {article}
|
|
210
202
|
```
|
|
211
203
|
|
|
204
|
+
### Goals and principles of book language
|
|
205
|
+
|
|
206
|
+
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.
|
|
207
|
+
|
|
208
|
+
It has file with `.ptbk.md` or `.book` extension with `UTF-8` non BOM encoding.
|
|
209
|
+
|
|
210
|
+
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.
|
|
211
|
+
|
|
212
|
+
But unlike programming languages, it is designed to be understandable by non-programmers and non-technical people.
|
|
213
|
+
|
|
214
|
+
### Structure
|
|
215
|
+
|
|
216
|
+
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.
|
|
217
|
+
|
|
218
|
+
### Header
|
|
219
|
+
|
|
220
|
+
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.
|
|
221
|
+
|
|
222
|
+
### Parameter
|
|
223
|
+
|
|
224
|
+
Foo bar
|
|
225
|
+
|
|
226
|
+
#### Parameter names
|
|
227
|
+
|
|
228
|
+
Reserved words:
|
|
229
|
+
|
|
230
|
+
- _each command_ like `PERSONA`, `EXPECT`, `KNOWLEDGE`, etc.
|
|
231
|
+
- `content`
|
|
232
|
+
- `context`
|
|
233
|
+
- `knowledge`
|
|
234
|
+
- `examples`
|
|
235
|
+
- `modelName`
|
|
236
|
+
- `currentDate`
|
|
237
|
+
|
|
238
|
+
#### Parameter notation
|
|
239
|
+
|
|
240
|
+
### Template
|
|
241
|
+
|
|
242
|
+
Todo todo
|
|
243
|
+
|
|
244
|
+
### Command
|
|
245
|
+
|
|
246
|
+
Todo todo
|
|
247
|
+
|
|
248
|
+
### Block
|
|
249
|
+
|
|
250
|
+
Todo todo
|
|
251
|
+
|
|
252
|
+
### Return parameter
|
|
253
|
+
|
|
254
|
+
### Examples
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
|
|
212
258
|
## 📦 Packages _(for developers)_
|
|
213
259
|
|
|
214
260
|
This library is divided into several packages, all are published from [single monorepo](https://github.com/webgptorg/promptbook).
|