1. Handlebars Helpers
  2. LLM ID Random Check

Handlebars Helpers

LLM ID Random Check

Checks that a LLM random ID with a checksum character is valid This helper is great for preventing LLM hallucinations when using LLM Random IDs.

Uses

  • Use to check the validity of a previously generated random ID

Usage

Helper name : llm_random_id_check

Parameter Description
1 Previously generated ID to check for validity
2 Value to return if the provided ID is valid (default: the provided ID)
3 Value to return if the provided ID is invalid (default: "invalid")

eg. {{#llm_random_id_check "aAmhV" "valid" "invalid"}}{{/llm_random_id_check}}

Examples

Check a previously generated ID

This example checks if the stubpost.data provided ID is valid. If it is, it returns the ID; if not, it returns 'invalid task id'.

Example definition:

loading...

Substituted definition

loading...