@promptbook/utils 0.69.0-5 β 0.69.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 +17 -57
- package/esm/index.es.js +1 -1
- package/package.json +1 -1
- package/umd/index.umd.js +1 -1
package/README.md
CHANGED
|
@@ -161,13 +161,15 @@ Rest of the documentation is common for **entire promptbook ecosystem**:
|
|
|
161
161
|
|
|
162
162
|
## π€ The Promptbook Whitepaper
|
|
163
163
|
|
|
164
|
+
|
|
165
|
+
|
|
164
166
|
If you have a simple, single prompt for ChatGPT, GPT-4, Anthropic Claude, Google Gemini, Llama 2, 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.
|
|
165
167
|
|
|
166
168
|
But often you will struggle with the limitations of LLMs, such as hallucinations, off-topic responses, poor quality output, language drift, word repetition repetition repetition repetition or misuse, lack of context, or just plain wππ’rd responses. When this happens, you generally have three options:
|
|
167
169
|
|
|
168
170
|
1. **Fine-tune** the model to your specifications or even train your own.
|
|
169
171
|
2. **Prompt-engineer** the prompt to the best shape you can achieve.
|
|
170
|
-
3.
|
|
172
|
+
3. Orchestrate **multiple prompts** in a [pipeline](https://github.com/webgptorg/promptbook/discussions/64) to get the best result.
|
|
171
173
|
|
|
172
174
|
In all of these situations, but especially in 3., the Promptbook library can make your life easier.
|
|
173
175
|
|
|
@@ -179,7 +181,9 @@ In all of these situations, but especially in 3., the Promptbook library can mak
|
|
|
179
181
|
- Promptbook has built in versioning. You can test multiple **A/B versions** of pipelines and see which one works best.
|
|
180
182
|
- Promptbook is designed to do [**RAG** (Retrieval-Augmented Generation)](https://github.com/webgptorg/promptbook/discussions/41) and other advanced techniques. You can use **knowledge** to improve the quality of the output.
|
|
181
183
|
|
|
182
|
-
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
## π§ Pipeline _(for prompt-engeneers)_
|
|
183
187
|
|
|
184
188
|
**P**romp**t** **b**oo**k** markdown file (or `.ptbk.md` file) is document that describes a **pipeline** - a series of prompts that are chained together to form somewhat reciepe for transforming natural language input.
|
|
185
189
|
|
|
@@ -496,6 +500,8 @@ The following glossary is used to clarify certain concepts:
|
|
|
496
500
|
- When you want to **version** your prompts and **test multiple versions**
|
|
497
501
|
- When you want to **log** the execution of prompts and backtrace the issues
|
|
498
502
|
|
|
503
|
+
[See more](https://github.com/webgptorg/promptbook/discussions/111)
|
|
504
|
+
|
|
499
505
|
### β When not to use
|
|
500
506
|
|
|
501
507
|
- When you have already implemented single simple prompt and it works fine for your job
|
|
@@ -505,6 +511,8 @@ The following glossary is used to clarify certain concepts:
|
|
|
505
511
|
- When your main focus is on something other than text - like images, audio, video, spreadsheets _(other media types may be added in the future, [see discussion](https://github.com/webgptorg/promptbook/discussions/103))_
|
|
506
512
|
- When you need to use recursion _([see the discussion](https://github.com/webgptorg/promptbook/discussions/38))_
|
|
507
513
|
|
|
514
|
+
[See more](https://github.com/webgptorg/promptbook/discussions/112)
|
|
515
|
+
|
|
508
516
|
## π Known issues
|
|
509
517
|
|
|
510
518
|
- [π€ΈββοΈ Iterations not working yet](https://github.com/webgptorg/promptbook/discussions/55)
|
|
@@ -517,63 +525,15 @@ The following glossary is used to clarify certain concepts:
|
|
|
517
525
|
|
|
518
526
|
## β FAQ
|
|
519
527
|
|
|
520
|
-
|
|
521
|
-
|
|
522
528
|
If you have a question [start a discussion](https://github.com/webgptorg/promptbook/discussions/), [open an issue](https://github.com/webgptorg/promptbook/issues) or [write me an email](https://www.pavolhejny.com/contact).
|
|
523
529
|
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
We are considering creating a bridge/converter between these two libraries.
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
### Promptbooks vs. OpenAI`s GPTs
|
|
537
|
-
|
|
538
|
-
GPTs are chat assistants that can be assigned to specific tasks and materials. But they are still chat assistants. Promptbooks are a way to orchestrate many more predefined tasks to have much tighter control over the process. Promptbooks are not a good technology for creating human-like chatbots, GPTs are not a good technology for creating outputs with specific requirements.
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
### Where should I store my promptbooks?
|
|
555
|
-
|
|
556
|
-
If you use raw SDKs, you just put prompts in the sourcecode, mixed in with typescript, javascript, python or whatever programming language you use.
|
|
557
|
-
|
|
558
|
-
If you use promptbooks, you can store them in several places, each with its own advantages and disadvantages:
|
|
559
|
-
|
|
560
|
-
1. As **source code**, typically git-committed. In this case you can use the versioning system and the promptbooks will be tightly coupled with the version of the application. You still get the power of promptbooks, as you separate the concerns of the prompt-engineer and the programmer.
|
|
561
|
-
|
|
562
|
-
2. As data in a **database** In this case, promptbooks are like posts / articles on the blog. They can be modified independently of the application. You don't need to redeploy the application to change the promptbooks. You can have multiple versions of promptbooks for each user. You can have a web interface for non-programmers to create and modify promptbooks. But you lose the versioning system and you still have to consider the interface between the promptbooks and the application _(= input and output parameters)_.
|
|
563
|
-
|
|
564
|
-
3. In a **configuration** in environment variables. This is a good way to store promptbooks if you have an application with multiple deployments and you want to have different but simple promptbooks for each deployment and you don't need to change them often.
|
|
565
|
-
|
|
566
|
-
### What should I do when I need same promptbook in multiple human languages?
|
|
567
|
-
|
|
568
|
-
A single promptbook can be written for several _(human)_ languages at once. However, we recommend that you have separate promptbooks for each language.
|
|
569
|
-
|
|
570
|
-
In large language models, you will get better results if you have prompts in the same language as the user input.
|
|
571
|
-
|
|
572
|
-
The best way to manage this is to have suffixed promptbooks like `write-website-content.en.ptbk.md` and `write-website-content.cs.ptbk.md` for each supported language.
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
530
|
+
- [β Why not just use the OpenAI SDK / Anthropic Claude SDK / ...?](https://github.com/webgptorg/promptbook/discussions/114)
|
|
531
|
+
- [β How is it different from the OpenAI`s GPTs?](https://github.com/webgptorg/promptbook/discussions/118)
|
|
532
|
+
- [β How is it different from the Langchain?](https://github.com/webgptorg/promptbook/discussions/115)
|
|
533
|
+
- [β How is it different from the DSPy?](https://github.com/webgptorg/promptbook/discussions/117)
|
|
534
|
+
- [β How is it different from _anything_?](https://github.com/webgptorg/promptbook/discussions?discussions_q=is%3Aopen+label%3A%22Promptbook+vs%22)
|
|
535
|
+
- [β Is Promptbook using RAG _(Retrieval-Augmented Generation)_?](https://github.com/webgptorg/promptbook/discussions/123)
|
|
536
|
+
- [β Is Promptbook using function calling?](https://github.com/webgptorg/promptbook/discussions/124)
|
|
577
537
|
|
|
578
538
|
## β Changelog
|
|
579
539
|
|
package/esm/index.es.js
CHANGED
|
@@ -4,7 +4,7 @@ import spaceTrim$1, { spaceTrim } from 'spacetrim';
|
|
|
4
4
|
/**
|
|
5
5
|
* The version of the Promptbook library
|
|
6
6
|
*/
|
|
7
|
-
var PROMPTBOOK_VERSION = '0.69.0-
|
|
7
|
+
var PROMPTBOOK_VERSION = '0.69.0-6';
|
|
8
8
|
// TODO: !!!! List here all the versions and annotate + put into script
|
|
9
9
|
|
|
10
10
|
/*! *****************************************************************************
|
package/package.json
CHANGED
package/umd/index.umd.js
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
/**
|
|
13
13
|
* The version of the Promptbook library
|
|
14
14
|
*/
|
|
15
|
-
var PROMPTBOOK_VERSION = '0.69.0-
|
|
15
|
+
var PROMPTBOOK_VERSION = '0.69.0-6';
|
|
16
16
|
// TODO: !!!! List here all the versions and annotate + put into script
|
|
17
17
|
|
|
18
18
|
/*! *****************************************************************************
|