Prompt Docs

Essential

QUERY · REPLY · TODAY

Search Result Section

Anchor · Brief · CategoryPaths · ChunkId · Content · Date · DocId · DocIdSpace · INDEX · Language · Link · Origin · Raw · SectionPath · Thumbnail · Title · Url

Advanced

! · !TellEm · FILTER · INSTRUCTION · JSON · LANG · LINGO · LLM · PARAMS · PROFILE · REFINED_QUERY · STATUS · STITCHES · TAGS · TODO · TODO_PENDING · TODO_PREVIOUS · USER_QUERY

Special

Comment · JsonPath · Literal injector · NO_REPLY · Profile Properties · Prompt Specific Parameter


!

Embedded TellEm script. Available libraries: llm, inquiry, prompt, assistant, instructions, io, json, csv, math, regex, sys, url, stack, toon. Supports // and /* */ comments.

TellEm scripting guide & builtin reference →

Example

(>!
// Fetch a section from this prompt
var doc = prompt#section("MySection")

// Use $ to access inquiry json (query, history, etc.)
var q = $.UserQuestion
llm#isTrue(q).when {
    true -> instructions#get("detailed")
    false -> doc
}<)

!TellEm

Embedded TellEm script. Available libraries: llm, inquiry, prompt, assistant, instructions, io, json, csv, math, regex, sys, url, stack, toon. Supports // and /* */ comments.

TellEm scripting guide & builtin reference →

Example

(>!TellEm
// Fetch a section from this prompt
var doc = prompt#section("MySection")

// Use $ to access inquiry json (query, history, etc.)
var q = $.UserQuestion
llm#isTrue(q).when {
    true -> instructions#get("detailed")
    false -> doc
}<)

Anchor

Position in the document

Example

(>Anchor<)

Brief

The content brief of the search record

Example

(>Brief<)

CategoryPaths

The category paths that the document belongs to

Example

(>CategoryPaths<)

ChunkId

The id of the chunk

Example

(>ChunkId<)

Comment

Will insert the search result associated with the current chat inquiry. If a Chunk or SearchResult section exists, it will iterate this for each entry of the result set. If not, it will fall back to a default formatting. This inject is synonymous to CHUNKS.

Example

(>/ Comment here <)

Content

The content of the search record

Example

(>Content<)

Date

The date of the search record

Example

(>Date<)

DocId

The source id of the document

Example

(>DocId<)

DocIdSpace

The id-space of the document id — which source the record came from

Example

(>DocIdSpace<)

FILTER

This will insert relevant chat context identified by TellusR dialogue. This may involve conversation history and present topic.

Example

#! User

##? FILTER

The user has activated the following filter: (>FILTER<)

(>FILTER<)

##! Question

(>QUERY<)

INDEX

This inject is available in iterated sections, used for example when inserting search results to a query. Here you can use the INDEX inject to show the present iterator index. This is useful for giving the LLM an index that it can refer to.

Example

(>INDEX<)

INSTRUCTION

Injects instructions

Example

(>INSTRUCTION:some_instruction_key<)

JSON

The JSON inject will insert the json associate with the present prompt section.

Example

(>JSON<)

JsonPath

If the inject starts with $. it will be considered to be jsonpath value. TellusR supports a subset of dialect with some domain specific extensions. This inject can be used to fetch specific values from the json associated with the specific section. For top level sections this will be a json representation of the present chat inquiry. Iterated sections may be associated with another json structure. A search result iterator will for example be associated with the json structure returned by the search backend. The json path syntax is the main way of fetching project specific metadata from a search result.

Example

To return the full associated json:

```
(>$.json()<)
```


Search Result iterator example:

```
Title: (>$.title<)
Description: (>$.docHits[*].relevantSegments[*].value.join()<)
```

LANG

The LANG inject will insert the language variable defined in the profile configuration.

Example

Respond in (>LANG<).

LINGO

The LINGO inject will insert lingo that seems relevant to the present user query. The lingo is found by doing a semantic search against the present lingo index. The lingo is usually generated with a separate by walking through the documents of the search back end in a separate preparatory step, or by adding terms manually through the lingo api.

Example

#! User

##? (>LINGO<)

Take the following lingo into account

(>LINGO<)

##! Question

(>QUERY<)

LLM

Insert some useful status and debug info

Example

(>LLM<)

Language

The language of the document

Example

(>Language<)

The url of the document with anchor

Example

(>Link<)

Literal injector

Outputs a literal injector reference instead of resolving it: the text after cmd: is wrapped in the inject markers and emitted as-is. Use it to document prompt syntax inside a prompt.

Example

(>cmd:QUERY<)

NO_REPLY

This inject will insert the phrase to use when the assistant has no answer to give. It resolves to the assistant's configured empty response, or — when that is not set — to a default phrase in the assistant's language.

Example

(>NO_REPLY<)

Origin

The import source of the search record

Example

(>Origin<)

PARAMS

Tha PARAMS inject will insert the list of parameters passed to the prompt

Example

(>PARAMS<)

PROFILE

(>PROFILE<) will inject the name of the profile.

Example

(>PROFILE<)


Profile Properties

Insert a configuration variable for the current profile. A setting property path will inject that property.

Example

(>ResponseProperties/DoubleLinedResponse<)

Prompt Specific Parameter

The parameter inject is used to add prompt specific parameters.

Example

(>Prompt Specific Parameter<)

QUERY

This inject will insert the user question associated with the present inquiry. QUERY will return a refined query if one exists, and fall back on the original user query if none is found.

Example

(>QUERY<)

REFINED_QUERY

The REFINED_QUERY is a contextualized version of the USER_QUERY, where some words that cannot be understood out of context may be replaced with specific terms. 'It' might be replaced with a noun, for example

Example

(>REFINED_QUERY<)

REPLY

This inject will insert the the last LLM reply in the inquiry inquiry.

Example

(>REPLY<)

Raw

The raw json of the search record

Example

(>Raw<)

STATUS

Insert some useful status and debug info

Example

(>STATUS<)

STITCHES

Will insert the search result associated with the current chat inquiry. If a Chunk or SearchResult section exists, it will iterate this for each entry of the result set. If not, it will fall back to a default formatting.

Example

(>STITCHES<)

SectionPath

The section path of the chunk

Example

(>SectionPath<)

TAGS

This will insert the tags (categories) the current inquiry is restricted to, each as `name: label` — the name is what tool arguments and filters speak, the label is what the user picked. Empty when no tags are in effect, so guard the section with `##? TAGS` to leave it out entirely rather than emitting a dangling sentence.

Example

#! User

##? TAGS

The user has restricted the search to: (>TAGS<)

(>TAGS<)

##! Question

(>QUERY<)

TODAY

Injects today's date

Example

(>TODAY<)

TODO

Inserts the inquiry's checklist as a checkbox list — one line per item, with `[x]` for answered, `[!]` for asked but unanswered and `[ ]` for still open, and any answer indented underneath. Blank when there is no checklist, so it also works as a conditional subsection heading: `##? TODO` renders its block only once one exists. For counting rather than showing, use `$.ToDo` — it carries `total`, `answered`, `failed` and `pending` alongside the items.

Example

(>TODO<)

TODO_PENDING

Inserts only the checklist items that are still unanswered, one per line, without checkboxes or numbering. Blank when everything is settled, which makes `##? TODO_PENDING` a block that disappears the moment the checklist is complete.

Example

(>TODO_PENDING<)

TODO_PREVIOUS

Inserts the previous turn's checklist as a checkbox list, in the same form as `TODO`. Every turn starts with a fresh checklist, so this is where the model sees what the conversation already settled and can confirm it item by item with `todo_update` (key without a result). Blank on the first turn, so `##? TODO_PREVIOUS` renders its block only once there is an earlier turn to show.

Example

(>TODO_PREVIOUS<)

Thumbnail

A URL to a thumbnail of the document

Example

(>Thumbnail<)

Title

The title field of the search record

Example

(>Title<)

USER_QUERY

This inject will insert the user question associated with the present inquiry exactly as the user entered it.

Example

(>USER_QUERY<)

Url

The url of the document

Example

(>Url<)