Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

What's the prompt?


view as:

From what I understand:

- Typescript definition (turn raw html markup >> well-formed JSON)

- Dewey Decimal classification/score

So probably combination of those two


One of the prompts is

  Extract the description and a list of guests from the supplied episode notes from a podcast.

  Also provide a Dewey Decimal Classification code and label for the description

  Return valid JSON conforming to the following Typescript type definition:

  {
    "description": string,
    "guests": {"name": string, "affiliation": string | null}[]
    "dewey_decimal": {"code": string, "label": string},
  }

  Episode synopsis (Markdown):

  {notes}

  Valid JSON:
(And the completion tends to be JSON, but not always.)

I like the typescript definition, rather than example json that I normally use.

Credit where it's due: I was working with structured data as JSON for the completion, and the Typescript definition hugely increased reliability. I took that from helpful advice (on Twitter) from Noah Brier who afiak came up with the approach:

https://brxnd.substack.com/p/the-prompt-to-rule-all-prompts-...


One interesting side effect of the Typescript interface approach is that it doesn't tokenize well: https://twitter.com/m1guelpf/status/1630015536632569857

Legal | privacy