@promptbook/node 0.75.0-2 → 0.75.0-4

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 (50) hide show
  1. package/README.md +27 -17
  2. package/esm/index.es.js +178 -104
  3. package/esm/index.es.js.map +1 -1
  4. package/esm/typings/src/_packages/core.index.d.ts +10 -4
  5. package/esm/typings/src/_packages/types.index.d.ts +8 -6
  6. package/esm/typings/src/commands/EXPECT/ExpectCommand.d.ts +1 -1
  7. package/esm/typings/src/commands/SECTION/SectionCommand.d.ts +1 -1
  8. package/esm/typings/src/commands/_common/types/CommandParser.d.ts +0 -2
  9. package/esm/typings/src/config.d.ts +9 -2
  10. package/esm/typings/src/conversion/pipelineJsonToString.d.ts +1 -1
  11. package/esm/typings/src/conversion/prettify/renderPipelineMermaidOptions.d.ts +2 -2
  12. package/esm/typings/src/conversion/utils/extractParameterNamesFromTask.d.ts +3 -3
  13. package/esm/typings/src/conversion/utils/renameParameter.d.ts +2 -2
  14. package/esm/typings/src/dialogs/simple-prompt/SimplePromptInterfaceTools.d.ts +1 -1
  15. package/esm/typings/src/execution/ScriptExecutionTools.d.ts +1 -1
  16. package/esm/typings/src/formfactors/_boilerplate/BoilerplateFormfactorDefinition.d.ts +2 -2
  17. package/esm/typings/src/formfactors/_common/AbstractFormfactorDefinition.d.ts +3 -0
  18. package/esm/typings/src/formfactors/chatbot/ChatbotFormfactorDefinition.d.ts +32 -2
  19. package/esm/typings/src/formfactors/generator/GeneratorFormfactorDefinition.d.ts +14 -0
  20. package/esm/typings/src/formfactors/generic/GenericFormfactorDefinition.d.ts +2 -2
  21. package/esm/typings/src/formfactors/index.d.ts +72 -10
  22. package/esm/typings/src/formfactors/matcher/MatcherFormfactorDefinition.d.ts +2 -2
  23. package/esm/typings/src/formfactors/sheets/SheetsFormfactorDefinition.d.ts +12 -2
  24. package/esm/typings/src/formfactors/translator/TranslatorFormfactorDefinition.d.ts +12 -2
  25. package/esm/typings/src/pipeline/PipelineInterface/PipelineInterface.d.ts +5 -4
  26. package/esm/typings/src/pipeline/PipelineInterface/constants.d.ts +2 -2
  27. package/esm/typings/src/pipeline/PipelineJson/{TaskJsonCommon.d.ts → CommonTaskJson.d.ts} +13 -13
  28. package/esm/typings/src/pipeline/PipelineJson/DialogTaskJson.d.ts +2 -2
  29. package/esm/typings/src/pipeline/PipelineJson/ParameterJson.d.ts +2 -0
  30. package/esm/typings/src/pipeline/PipelineJson/PersonaJson.d.ts +1 -1
  31. package/esm/typings/src/pipeline/PipelineJson/PipelineJson.d.ts +2 -2
  32. package/esm/typings/src/pipeline/PipelineJson/PromptTaskJson.d.ts +2 -2
  33. package/esm/typings/src/pipeline/PipelineJson/ScriptTaskJson.d.ts +2 -2
  34. package/esm/typings/src/pipeline/PipelineJson/SimpleTaskJson.d.ts +2 -2
  35. package/esm/typings/src/pipeline/PipelineJson/TaskJson.d.ts +1 -1
  36. package/esm/typings/src/pipeline/PipelineString.d.ts +1 -1
  37. package/esm/typings/src/prepare/isPipelinePrepared.d.ts +1 -1
  38. package/esm/typings/src/prepare/prepareTasks.d.ts +5 -5
  39. package/esm/typings/src/types/Prompt.d.ts +3 -3
  40. package/esm/typings/src/types/SectionType.d.ts +21 -0
  41. package/esm/typings/src/types/TaskProgress.d.ts +1 -1
  42. package/esm/typings/src/types/TaskType.d.ts +15 -0
  43. package/esm/typings/src/types/typeAliases.d.ts +1 -1
  44. package/esm/typings/src/utils/organization/TODO_remove_as.d.ts +6 -0
  45. package/esm/typings/src/utils/parameters/extractParameterNames.d.ts +1 -1
  46. package/package.json +2 -2
  47. package/umd/index.umd.js +178 -104
  48. package/umd/index.umd.js.map +1 -1
  49. package/esm/typings/src/commands/SECTION/SectionType.d.ts +0 -13
  50. /package/esm/typings/{promptbook-collection → books}/index.d.ts +0 -0
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  # ![Promptbook logo - cube with letters P and B](./other/design/logo-h1.png) Promptbook
4
4
 
5
- Build responsible, controlled and transparent applications on top of LLM models!
5
+ It's time for a paradigm shift! The future of software is in plain English, French or Latin.
6
6
 
7
7
 
8
8
 
@@ -55,25 +55,24 @@ Core of the library for Node.js runtime, it contains the main logic for promptbo
55
55
 
56
56
  Rest of the documentation is common for **entire promptbook ecosystem**:
57
57
 
58
- ## 🤍 The Promptbook Whitepaper
59
58
 
60
- 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.
61
59
 
62
- 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:
63
60
 
64
- 1. **Fine-tune** the model to your specifications or even train your own.
65
- 2. **Prompt-engineer** the prompt to the best shape you can achieve.
66
- 3. Orchestrate **multiple prompts** in a [pipeline](https://github.com/webgptorg/promptbook/discussions/64) to get the best result.
61
+ ## 🤍 The Book Abstract
62
+
63
+ > It's time for a paradigm shift! **The future of software is in plain English**, French or Latin.
64
+
65
+ During the computer revolution, we have seen [multiple generations of computer languages](https://github.com/webgptorg/promptbook/discussions/180), from the physical rewiring of the vacuum tubes through low-level machine code to the high-level languages like Python or JavaScript. And now, we're on the edge of the **next revolution**!
66
+
67
+ It's a revolution of writing software in plain human language that is understandable and executable by both humans and machines – and it's going to change everything!
68
+
69
+ The incredible growth in power of microprocessors and the Moore's Law have been the driving force behind the ever-more powerful languages, and it's been an amazing journey! Similarly, the large language models (like GPT or Claude) are the next big thing in language technology, and they're set to transform the way we interact with computers.
70
+
71
+ This shift is going to happen, whether we are ready for it or not. Our mission is to make it excellently, not just good.
72
+
73
+ > **Join us in this journey!**
67
74
 
68
- In all of these situations, but especially in 3., the **✨ Promptbook can make your life waaaaaaaaaay easier**.
69
75
 
70
- - [**Separates concerns**](https://github.com/webgptorg/promptbook/discussions/32) between prompt-engineer and programmer, between code files and prompt files, and between prompts and their execution logic. For this purpose, it introduces a new language called [the **💙 Book**](https://github.com/webgptorg/book).
71
- - Book allows you to **focus on the business** logic without having to write code or deal with the technicalities of LLMs.
72
- - **Forget** about **low-level details** like choosing the right model, tokens, context size, `temperature`, `top-k`, `top-p`, or kernel sampling. **Just write your intent** and [**persona**](https://github.com/webgptorg/promptbook/discussions/22) who should be responsible for the task and let the library do the rest.
73
- - We have built-in **orchestration** of [pipeline](https://github.com/webgptorg/promptbook/discussions/64) execution and many tools to make the process easier, more reliable, and more efficient, such as caching, [compilation+preparation](https://github.com/webgptorg/promptbook/discussions/78), [just-in-time fine-tuning](https://github.com/webgptorg/promptbook/discussions/33), [expectation-aware generation](https://github.com/webgptorg/promptbook/discussions/37), [agent adversary expectations](https://github.com/webgptorg/promptbook/discussions/39), and more.
74
- - Sometimes even the best prompts with the best framework like Promptbook `:)` can't avoid the problems. In this case, the library has built-in **[anomaly detection](https://github.com/webgptorg/promptbook/discussions/40) and logging** to help you find and fix the problems.
75
- - Versioning is build in. You can test multiple **A/B versions** of pipelines and see which one works best.
76
- - Promptbook is designed to use [**RAG** (Retrieval-Augmented Generation)](https://github.com/webgptorg/promptbook/discussions/41) and other advanced techniques to bring the context of your business to generic LLM. You can use **knowledge** to improve the quality of the output.
77
76
 
78
77
 
79
78
 
@@ -185,7 +184,9 @@ Reserved words:
185
184
 
186
185
  #### Parameter notation
187
186
 
188
- ### Template
187
+ ### Task
188
+
189
+ ### Task type
189
190
 
190
191
  Todo todo
191
192
 
@@ -246,6 +247,11 @@ Or you can install them separately:
246
247
 
247
248
  ## 📚 Dictionary
248
249
 
250
+
251
+
252
+
253
+
254
+
249
255
  ### 📚 Dictionary
250
256
 
251
257
  The following glossary is used to clarify certain concepts:
@@ -261,6 +267,8 @@ The following glossary is used to clarify certain concepts:
261
267
  - **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.
262
268
  - **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.
263
269
 
270
+
271
+
264
272
  _Note: Thos section is not complete dictionary, more list of general AI / LLM terms that has connection with Promptbook_
265
273
 
266
274
  #### Promptbook core
@@ -297,7 +305,7 @@ _Note: Thos section is not complete dictionary, more list of general AI / LLM te
297
305
 
298
306
  - [📚 Collection of pipelines](https://github.com/webgptorg/promptbook/discussions/65)
299
307
  - [📯 Pipeline](https://github.com/webgptorg/promptbook/discussions/64)
300
- - [🎺 Pipeline templates](https://github.com/webgptorg/promptbook/discussions/88)
308
+ - [🙇‍♂️ Tasks and pipeline sections](https://github.com/webgptorg/promptbook/discussions/88)
301
309
  - [🤼 Personas](https://github.com/webgptorg/promptbook/discussions/22)
302
310
  - [⭕ Parameters](https://github.com/webgptorg/promptbook/discussions/83)
303
311
  - [🚀 Pipeline execution](https://github.com/webgptorg/promptbook/discussions/84)
@@ -321,6 +329,8 @@ _Note: Thos section is not complete dictionary, more list of general AI / LLM te
321
329
  - [👮 Agent adversary expectations](https://github.com/webgptorg/promptbook/discussions/39)
322
330
  - [view more](https://github.com/webgptorg/promptbook/discussions/categories/concepts)
323
331
 
332
+
333
+
324
334
  ### Terms specific to Promptbook TypeScript implementation
325
335
 
326
336
  - Anonymous mode