@promptbook/openai 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 +2 -2
- package/umd/index.umd.js +1 -1
package/README.md
CHANGED
|
@@ -204,13 +204,15 @@ Rest of the documentation is common for **entire promptbook ecosystem**:
|
|
|
204
204
|
|
|
205
205
|
## π€ The Promptbook Whitepaper
|
|
206
206
|
|
|
207
|
+
|
|
208
|
+
|
|
207
209
|
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.
|
|
208
210
|
|
|
209
211
|
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:
|
|
210
212
|
|
|
211
213
|
1. **Fine-tune** the model to your specifications or even train your own.
|
|
212
214
|
2. **Prompt-engineer** the prompt to the best shape you can achieve.
|
|
213
|
-
3.
|
|
215
|
+
3. Orchestrate **multiple prompts** in a [pipeline](https://github.com/webgptorg/promptbook/discussions/64) to get the best result.
|
|
214
216
|
|
|
215
217
|
In all of these situations, but especially in 3., the Promptbook library can make your life easier.
|
|
216
218
|
|
|
@@ -222,7 +224,9 @@ In all of these situations, but especially in 3., the Promptbook library can mak
|
|
|
222
224
|
- Promptbook has built in versioning. You can test multiple **A/B versions** of pipelines and see which one works best.
|
|
223
225
|
- 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.
|
|
224
226
|
|
|
225
|
-
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
## π§ Pipeline _(for prompt-engeneers)_
|
|
226
230
|
|
|
227
231
|
**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.
|
|
228
232
|
|
|
@@ -539,6 +543,8 @@ The following glossary is used to clarify certain concepts:
|
|
|
539
543
|
- When you want to **version** your prompts and **test multiple versions**
|
|
540
544
|
- When you want to **log** the execution of prompts and backtrace the issues
|
|
541
545
|
|
|
546
|
+
[See more](https://github.com/webgptorg/promptbook/discussions/111)
|
|
547
|
+
|
|
542
548
|
### β When not to use
|
|
543
549
|
|
|
544
550
|
- When you have already implemented single simple prompt and it works fine for your job
|
|
@@ -548,6 +554,8 @@ The following glossary is used to clarify certain concepts:
|
|
|
548
554
|
- 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))_
|
|
549
555
|
- When you need to use recursion _([see the discussion](https://github.com/webgptorg/promptbook/discussions/38))_
|
|
550
556
|
|
|
557
|
+
[See more](https://github.com/webgptorg/promptbook/discussions/112)
|
|
558
|
+
|
|
551
559
|
## π Known issues
|
|
552
560
|
|
|
553
561
|
- [π€ΈββοΈ Iterations not working yet](https://github.com/webgptorg/promptbook/discussions/55)
|
|
@@ -560,63 +568,15 @@ The following glossary is used to clarify certain concepts:
|
|
|
560
568
|
|
|
561
569
|
## β FAQ
|
|
562
570
|
|
|
563
|
-
|
|
564
|
-
|
|
565
571
|
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).
|
|
566
572
|
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
We are considering creating a bridge/converter between these two libraries.
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
### Promptbooks vs. OpenAI`s GPTs
|
|
580
|
-
|
|
581
|
-
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.
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
### Where should I store my promptbooks?
|
|
598
|
-
|
|
599
|
-
If you use raw SDKs, you just put prompts in the sourcecode, mixed in with typescript, javascript, python or whatever programming language you use.
|
|
600
|
-
|
|
601
|
-
If you use promptbooks, you can store them in several places, each with its own advantages and disadvantages:
|
|
602
|
-
|
|
603
|
-
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.
|
|
604
|
-
|
|
605
|
-
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)_.
|
|
606
|
-
|
|
607
|
-
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.
|
|
608
|
-
|
|
609
|
-
### What should I do when I need same promptbook in multiple human languages?
|
|
610
|
-
|
|
611
|
-
A single promptbook can be written for several _(human)_ languages at once. However, we recommend that you have separate promptbooks for each language.
|
|
612
|
-
|
|
613
|
-
In large language models, you will get better results if you have prompts in the same language as the user input.
|
|
614
|
-
|
|
615
|
-
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.
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
573
|
+
- [β Why not just use the OpenAI SDK / Anthropic Claude SDK / ...?](https://github.com/webgptorg/promptbook/discussions/114)
|
|
574
|
+
- [β How is it different from the OpenAI`s GPTs?](https://github.com/webgptorg/promptbook/discussions/118)
|
|
575
|
+
- [β How is it different from the Langchain?](https://github.com/webgptorg/promptbook/discussions/115)
|
|
576
|
+
- [β How is it different from the DSPy?](https://github.com/webgptorg/promptbook/discussions/117)
|
|
577
|
+
- [β How is it different from _anything_?](https://github.com/webgptorg/promptbook/discussions?discussions_q=is%3Aopen+label%3A%22Promptbook+vs%22)
|
|
578
|
+
- [β Is Promptbook using RAG _(Retrieval-Augmented Generation)_?](https://github.com/webgptorg/promptbook/discussions/123)
|
|
579
|
+
- [β Is Promptbook using function calling?](https://github.com/webgptorg/promptbook/discussions/124)
|
|
620
580
|
|
|
621
581
|
## β Changelog
|
|
622
582
|
|
package/esm/index.es.js
CHANGED
|
@@ -6,7 +6,7 @@ import spaceTrim$1, { spaceTrim } from 'spacetrim';
|
|
|
6
6
|
/**
|
|
7
7
|
* The version of the Promptbook library
|
|
8
8
|
*/
|
|
9
|
-
var PROMPTBOOK_VERSION = '0.69.0-
|
|
9
|
+
var PROMPTBOOK_VERSION = '0.69.0-6';
|
|
10
10
|
// TODO: !!!! List here all the versions and annotate + put into script
|
|
11
11
|
|
|
12
12
|
/*! *****************************************************************************
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/openai",
|
|
3
|
-
"version": "0.69.0-
|
|
3
|
+
"version": "0.69.0-7",
|
|
4
4
|
"description": "Supercharge your use of large language models",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"module": "./esm/index.es.js",
|
|
48
48
|
"typings": "./esm/typings/src/_packages/openai.index.d.ts",
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@promptbook/core": "0.69.0-
|
|
50
|
+
"@promptbook/core": "0.69.0-7"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"colors": "1.4.0",
|
package/umd/index.umd.js
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
/**
|
|
15
15
|
* The version of the Promptbook library
|
|
16
16
|
*/
|
|
17
|
-
var PROMPTBOOK_VERSION = '0.69.0-
|
|
17
|
+
var PROMPTBOOK_VERSION = '0.69.0-6';
|
|
18
18
|
// TODO: !!!! List here all the versions and annotate + put into script
|
|
19
19
|
|
|
20
20
|
/*! *****************************************************************************
|