Skip to content

Commit 556723d

Browse files
committed
manual: Update system prompt index, improve code highlights
* doc/manual.org (Directives): (Output in a specified JSON schema): * doc/style.css (pre[class^="display"]): (body.dark-theme button#dark-theme-toggle):
1 parent ab27a99 commit 556723d

File tree

2 files changed

+17
-9
lines changed

2 files changed

+17
-9
lines changed

doc/manual.org

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ always contains the last request as a gptel state-machine object (see
481481
:CUSTOM_ID: directives
482482
:END:
483483

484-
#+cindex: system message
484+
#+cindex: system message, system prompt
485485
In addition to the text in your buffer, LLMs can be prompted with
486486
instructions on how they should respond. They are prioritized and
487487
treated specially by most LLMs, and is one of the primary levers for
@@ -493,10 +493,10 @@ The system message can be used to specify the LLM's general tone and
493493
tenor, output format, structure or restrictions, as well as general
494494
objectives it should work towards in its interactions with the user.
495495

496-
The following is a typical system message describing the tone and
496+
The following is a brief system message describing the tone and
497497
proscribing certain common LLM behaviors.
498498

499-
#+begin_example
499+
#+begin_quote
500500
To assist: Be terse. Do not offer unprompted advice or
501501
clarifications. Speak in specific, topic relevant terminology. Do
502502
NOT hedge or qualify. Speak directly and be willing to make creative
@@ -507,12 +507,12 @@ willing to reference less reputable sources for ideas.
507507

508508
Do NOT summarize your answers. Never apologize. Ask questions when
509509
unsure.
510-
#+end_example
510+
#+end_quote
511511

512512
Here is another example, this time specifying an objective for the LLM
513513
to work towards:
514514

515-
#+begin_example
515+
#+begin_quote
516516
You are a tutor and domain expert in the domain of my questions. You
517517
will lead me to discover the answer myself by providing hints. Your
518518
instructions are as follows:
@@ -525,7 +525,11 @@ instructions are as follows:
525525
my answer is wrong, again provide only hints to correct it.
526526
- If you use LaTeX notation, enclose math in \( and \) or \[ and \]
527527
delimiters.
528-
#+end_example
528+
#+end_quote
529+
530+
In practice system messages can be document-length, composed of
531+
several sections that provide both instructions and a generous amount
532+
of context required to accomplish a task.
529533

530534
#+vindex: gptel--system-message
531535
You can control system message gptel uses via the variable
@@ -1635,10 +1639,13 @@ Note:
16351639
~gptel-request~ presents a versatile API, and its uses and arguments
16361640
are specified in greater detail in the sections that follow.
16371641

1638-
** Prompt transformations
1642+
** TODO Prompt transformations
16391643
:PROPERTIES:
16401644
:CUSTOM_ID: gptel-prompt-transform-functions
16411645
:END:
1646+
1647+
# =gptel-send='s default
1648+
16421649
** Output in a specified JSON schema
16431650

16441651
~gptel-request~ can force the LLM to generate output that follows a

doc/style.css

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ pre[class^="display"] {
295295
background: var(--display-bg); /* light blue */
296296
}
297297
pre[class*="example"], pre[class*="lisp"], pre[class^="display"],
298-
pre.verbatim, div[class*="example"], table.cartouche {
298+
pre.verbatim, pre[class*="json"], div[class*="example"], table.cartouche {
299299
border-radius: .3em;
300300
color: var(--pre-fg);
301301
/*TODO: Fix this color for dark mode, lisp keywords are note readable*/
@@ -711,7 +711,8 @@ body.dark-theme button#dark-theme-toggle {
711711
border-color: : var(--accent);
712712
}
713713

714-
body.dark-theme pre[class*="lisp"],
714+
body.dark-theme pre[class*="lisp"],
715+
body.dark-theme pre[class*="json"],
715716
body.dark-theme pre[class="example"] {
716717
filter: invert(0.9) hue-rotate(180deg) brightness(0.9) saturate(0.8);
717718
}

0 commit comments

Comments
 (0)