The Prompt Management section provides guidance on how to manage and configure prompts for analytics and semantic analysis tasks within Flock. Prompts guide models in generating specific outputs for tasks like content generation, summarization, and ranking. Each database is configured with its own prompt management table during the initial load.

1. Prompt Table Structure

2. Management Commands

  • Retrieve all available prompts
  • Retrieve details of a specific prompt
  • Create a new prompt
  • Modify an existing prompt
  • Remove a prompt

3. SQL Query Examples

Semantic Text Completion

Generate a description for products using a predefined prompt:

Review Summary

Generate a summary for customer reviews using a specific prompt version:

4. Global and Local Prompts

Prompt creation is database specific if you want it to be available irrespective of the database then make it a GLOBAL mode. Note that previously, the creation was specific to the running database, which is LOCAL by default and the keyword LOCAL is optional.

Create Prompts

  • Create a global prompt:
  • Create a local prompt (default if no type is specified):

Toggle Prompt State

  • Toggle a prompt’s state between global and local:
All the other queries remain the same for both global and local prompts.