Skip to content

Feature: Prompt Template Registry #334

@massi-ang

Description

@massi-ang

Description:
the current solution supports fixed prompt templates defined in the LLM adapters lambda functions. While this provide flexibility to change the prompts it does not easily enable experimentation.
We are proposing to add a separate Prompt Template Registry to store multiple versions of prompts linked to specific model adapters.
The prompt registry service needs to:

  1. store up to X versions of a prompt template set per model adapter. A prompt set is defined as 1 or multiple prompts required by the model interface to operate (idefics requires 1 prompt, langchain requires 3 prompts, etc)
  2. maintain an editable draft version
  3. OPTIONAL: create a readonly version from the current DRAFT
  4. provide backend validatation of prompts based on the interface. For example: Langchain prompt templates require specific placeholders depending on the prompt (std, qa, condense);
  5. allow users to quickly experiments with variations of prompts in a set via the UI
  6. provide validation/warning in the UI when the prompt entered does not match what required by the model: Eg Human/Assistant pattern for Claude, or [INST] pattern for LLama2 and derivatives

The current functionality needs to be modified to make use of the prompt registry and in particular the chat bot playground MUST allow the user to select version of the prompt set compatibile with the selected model. This choice MUST be persisted locally for each combination used (default is using the DRAFT prompt set).

The initial DRAFT prompt set for each model corresponds to the current prompt templates defined in the model adapters.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions