Configuring the App

PSL supports following types of configurational sections:

  1. Metadata (Optional): A section specifying author, title, description and other metadata for the GenAI App.

  2. Default (Optional): A section specifying default values for the models and associated parameters

  3. Imports (Required only if sub-workflows are used in the PSL): A section specifying all the imported components/sub-workflows used in the PSL file.

Metadata (Optional)

NOTE: Please do NOT specify metadata section when using the Create button on PromptSpace UI as it will not be read. While using the UI, please use the Basic Information panel to supply the metadata. You should provide the metadata section if you are using an API access (not released publicly yet) to create GenAI apps.

The metadata section contains information about the GenAI app, such as the version and author. It must include the following fields:

  • version: The version of the app.

  • author: The author of the app.

  • title: The title of the app.

  • description: A description of what the app is about.

  • image: (Optional) A header image URL for the app.

  • language: (Optional) The language used in the app (e.g., English, Spanish, etc.).

  • tags: (Optional) A comma-separated list of tags describing the app. (e.g., travel, learning, game)

Example:

[metadata]
version = 1.0.0
author = John Doe
title = Workout Planner
description = Use AI to generate custom workout plans
image = https://example.com/images/workout_planner.jpg
language = English
tags = fitness, workout, exercise

Default

The default section defines the default model and other parameters like system role used for the models used in the app. When model_name is not specified in this section it defaults to theidentity model which simply prints its input.

Example:

[default]
model_name = gpt-3.5-turbo
gpt-3.5-turbo.system_role = You are an AI generating pictionary hints for movies.
gpt-4.system_role = You are an AI evaluating players response to a pictionary based movie game.

Imports

The imports section is used to specify all the components/sub-workflows used in the PSL file. The syntax is like this:

[imports]
<Component_#_Name> = <Component Identifier>

Components are identified using a unique identifier (uuid) a list of which will be provided in an appendix. You can name the imported component whatever you like, the name simply serves as a replacement for the uuid of the component.

Example:

[imports]
mermaidify = <Component Identifier>

Example Usage:

Our linear algebra course uses our memaidify component to add visuals to the lecture. Here is an excerpt from the course to see how it is used.

[prompt.visual_1]
message = -- This will not display (dummy message) --
retrier = 
    {
        "module": "mermaidify",
        "input_injections": {
            "user_input": "{{response.generate_lecture.Lecture.main_content_1}}"
        },
        "condition": "is_success",
        "max_retries": "1",
        "bring_to_scope": {},
        "on_exhausted_retries": "error"
    }
display = False

Here is_success is a prompt section in the mermaidify component which returns a bool. More details on how to use retrier sub-workflow will be provided in a later section.

Last updated