Summary

I make a conversable subject-matter expert for whatever you’re looking at. Right now, that means your computer. But in future this could be your eye sight. This uses Pen.el as the kernel.

kb f
M-SPC a c apostrophe-start-chatbot-from-selection pen-map

Demos

Chat with John Dee

Selecting text, then a subject matter expert from history

The text selection can be anything (including images in the future).

Peter Thiel

It appears that the Codex model makes Peter Thiel really distrusting, and it’s incredibly difficult to get ideas out of his projected imaginary Codex consciousness / image.

Prompts

Two prompts are necessary. Given an arbitrary text snippet, a list of related scholars needs to be generated, then a new prompt is needed to generate a short blurb for that scholar.

All of that goes into apostrophe, my imaginary interlocution chamber.

pf-who-is-the-subject-matter-expert-for-/1

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
task: "Who is the subject matter expert for?"
doc: "Given a prompt, be told of a subject-matter-expert."
prompt-version: 1
todo:
- |-
    Instead of having a document, have an
    entire multi-modal prompts array (time-
    wise)? The document should be 'multi-modal
    prompt format', whatever that is.    

# TODO Make a list of scholars and qualifications relating to a document

prompt: |+
  Document 1:
  ###
  Truth is the property of being in accord
  with fact or reality.[1] In everyday
  language, truth is typically ascribed to
  things that aim to represent reality or
  otherwise correspond to it, such as beliefs,
  propositions, and declarative sentences.[2]
  ###
  Document 1 scholars:
  - 1. Kant (1724-1804)
  - 2. Hegel (1770-1831)
  - 3. Schopenhauer (1788-1860)
  - 4. Kierkegaard (1813-1855)
  - 5. Nietzsche (1844-1900)
  ###
  Document 2:
  ###
  <document>
  ###
  Document 2 scholars:
  <:pp>- 1.  
engine: "OpenAI Codex"
temperature: 0.3
max-generated-tokens: 150
top-p: 1.0
delimiter: "###"
frequency-penalty: 0.3
stop-sequences:
- "<delim>"
- Document
cache: on
vars:
- document
var-defaults:
- "(pen-screen-or-selection)"
# no EOD? needed or default?
preprocessors:
- pen-str garbify | sed 's/^/  /'
examples:
- |-
    In Abrahamic religions, the Garden of Eden
    (Hebrew: ื’ึทึผืŸึพืขึตื“ึถืŸโ€Ž โ€“ gan-สฟแธ–แธen) or Garden of
    God (ื’ึทึผืŸึพื™ึฐื”ึนื•ึธื”โ€Ž โ€“ gan-Yhwh), also called
    the Terrestrial Paradise, is the biblical
    paradise described in Genesis 2-3 and Ezekiel
    28 and 31.[1][2] The location of Eden is
    described in the Book of Genesis as the source
    of four tributaries. Among scholars who
    consider it to have been real, there have been
    various suggestions for its location:[3] at
    the head of the Persian Gulf, in southern
    Mesopotamia (now Iraq) where the Tigris and
    Euphrates rivers run into the sea;[4] and in
    Armenia.    
validator: "grep -qP '^- [0-9]*\\. .*\\(.*\\)$'"
postpostprocessor: "sed 's/^- [0-9]*. //' | sed 's/^\\s\\+/ /g' | tr -d 'ย '"
info: on
filter: off
completion: off
insertion: off
end-split-patterns:
- "\n"

pf-generate-wiki-blurb-for-a-famous-person/1

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
task: "Generate wiki blurb for a famous person"
doc: "Create a wiki blurb for a famous person"
prompt-version: 1
prompt: |+
    <person> - Wikipedia

    en.wikipedia.org โ€บ wiki โ€บ <person>

    <:pp><person> was a    
engine: "OpenAI Codex"
temperature: 0.3
max-generated-tokens: 200
top-p: 1.0
stop-sequences:
- "."
cache: on
vars:
- "person"
examples:
- "John Dee"
postprocessor: pen-str join ' ' | sed -z 's/\s*\n$//' | sed -z 's/[^a-zA-Z0-9]*$//' | sed -z 's/$/./'
info: on
filter: off
completion: off
insertion: off