mirror of
https://github.com/DCC-BS/prompt-library.git
synced 2026-08-26 10:24:27 +00:00
Read-only mirror of https://github.com/DCC-BS/prompt-library — Basel-Stadt. Issues & pull requests at the source.
- Python 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| assets | ||
| pages | ||
| .gitignore | ||
| app.py | ||
| config.yaml | ||
| config_handler.py | ||
| db_operations.py | ||
| LICENSE | ||
| readme.md | ||
| renovate.json | ||
| requirements.txt | ||
| utils.py | ||
LLM Prompt Manager
A Streamlit application for creating, managing, and testing LLM (Large Language Model) prompts with version control capabilities.
Features
-
Prompt Management
- Create and store prompts with template variables
- Version control for prompts
- Browse and search existing prompts
- Upvote useful prompts
- Copy prompts to clipboard
-
Template System
- Jinja2-based templating
- Variable validation
- Example value storage
-
Testing Capabilities
- Test prompts with multiple LLM endpoints
- Compare responses from different models
- Real-time prompt rendering preview
- Create and store test cases
- JSON-based input/output pairs
- LLM judge scoring system
- Pass/fail status tracking
- Automated scoring of test case results
- Detailed comparison reports
-
Prompt Design Assistant
- Automated prompt generation and refinement
- Test-driven prompt development
- Iterative improvement based on test results
- LLM-powered evaluation and scoring
- Version tracking of design iterations
-
Test Case Management
- Create and store test cases
- JSON-based input/output pairs
- Automated test execution
- LLM judge scoring system
- Pass/fail status tracking
Installation
- Clone the repository:
git clone https://github.com/yourusername/llm-prompt-manager.git
cd llm-prompt-manager
- Create a venv:
uv venv -p 3.11
- Activate venv:
.venv\bin\activate
- Install dependencies:
uv pip install -r requirements.txt
## Configuration
Create a `config.yaml` file in the root directory with your LLM endpoints:
```yaml
endpoints:
- name: "Llama 3.1 70n"
url: "your-endpoint-url"
model: "llama3.1:70b"
description: "Llama 3.1 70b by Meta"
- name: "Claude"
url: "your-endpoint-url"
model: "claude-v1"
description: "Anthropic Claude Model"
Usage
- Start the application:
streamlit run app.py
- Navigate to the different pages:
- Create: Create new prompts or edit existing ones
- Browse: View and manage existing prompts
- Test: Test prompts with different LLM endpoints
Creating Prompts
-
Enter prompt details:
- Name
- Author
- Template (using Jinja2 syntax)
- Example values for variables
-
Test the prompt before saving
-
Save to create a new version
Managing Versions
- Each prompt edit creates a new version
- Browse page shows latest versions by default
- Select specific versions when viewing prompts
- All versions maintain their own upvote counts
Testing Prompts
- Select a prompt from the library
- Choose the desired version
- Fill in template variables
- Select up to 5 LLM endpoints
- Run the test to compare responses
Project Structure
llm-prompt-manager/
├── app.py
├── config.yaml
├── requirements.txt
├── db_operations.py
├── config_handler.py
├── utils.py
└── pages/
├── create_page.py
├── browse_page.py
└── test_page.py
Contributing
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.