rag-pdl(1)
==========
NAME
----
rag-pdl - Execute a pdl file
SYNOPSIS
--------
[verse]
'rag pdl' <file> [--model <model>] [--models <file>] [--context <file>]
[--strict] [--escape] [--log <dir>] [--schema <schema>]
DESCRIPTION
-----------
This document explains `rag pdl` command, not the pdl format itself. Run
`rag help pdl-format` to read documents on the file format.
Pdl is a Prompt Description Language, which allows you to write pragmatic prompts.
It executes a pdl file and dumps the result to stdout.
OPTIONS
-------
--model::
An LLM model to run the prompt with. If the model's not set, it tries
to guess the model. If it's inside a knowledge-base, it reads the
configuration of the knowledge-base and uses the default model of the
knowledge-base.
--models::
Path to `models.json` file. If it's not given, ragit will try to find
one. If it's inside a knowledge-base, it'll use `.ragit/models.json`.
If `~/.config/ragit/models.json` is found, it'll use the file.
--context::
Path to a json file which adds a context to the prompt. A pdl file is
pragmatic: you can parameterize your prompt using tera template engine.
--strict::
By default, ragit ignores errors in pdl files. For example, if there's
`{{ name }}` in the pdl file but there's no `name` in the context, it
just turns off the tera renderer.
If this flag is enabled, the program dies if there's an error while
parsing the pdl file.
--escape::
There are some special syntaxes that pdl use. For example, `<|user|>`
indicates a beginning of a user turn. You might want to include the
string `<|user|>` in the prompt, instead of using it as a marker. In
that case, you can write `&lt;|user|>` instead of `<|user|>`, then
enable this flag. The string won't be parsed by the pdl engine and
later converted to `<|user|>`.
--log::
A directory to dump logs. If it's not set, it doesn't dump any log.
If the directory does not exist, it creates one.
--schema::
It overrides `<|schema|>` in the pdl file. Run `rag help pdl-format`
to learn about pdl schemas.