Prompt Management
The Prompt Management section provides guidance on how to manage and configure prompts for analytics and semantic analysis tasks within FlockMTL. 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
Column Name | Description |
---|---|
prompt_name | Unique identifier for the prompt |
prompt | Instruction content for the model |
updated_at | Timestamp of the last update |
version | Version number of the prompt |
2. Management Commands
- Retrieve all available prompts
GET PROMPTS;
- Retrieve details of a specific prompt
GET PROMPT 'prompt_name';
- Create a new prompt
CREATE PROMPT('prompt_name', 'prompt');
- Modify an existing prompt
UPDATE PROMPT('prompt_name', 'prompt');
- Remove a prompt
DELETE PROMPT 'prompt_name';
3. SQL Query Examples
Semantic Text Completion
Generate a description for products using a predefined prompt:
SELECT llm_complete(
{'model_name': 'gpt-4'},
{'prompt_name': 'product-description'},
{'input_text': product_description}
) AS generated_description
FROM products;