How sahiljain6/promptlab works
PromptLab is a Streamlit research app for comparing code-generation models across prompt techniques. Users submit a coding request or choose a preset; the app builds one shared task specification, runs provider/technique trials, evaluates generated solutions, scores and ranks results, then presents outputs and experiment history. Major supporting capabilities include emergency Gemini fallback, configurable scoring, safe evaluation modes, and SQLite-backed history and usage quotas. The graph follows the documented workflow and indexed references; where excerpts do not expose a call directly, relationships are documented or omitted.
Main entry points: app.py Streamlit app · provider.py Model provider client · pipeline.py Trial orchestration · tasks.py Task specification
Components 12
App interface
- Streamlit app
app.py
Task and generation
- Task specification
promptlab/tasks.py - Prompt techniques
promptlab/prompts.py - Trial orchestration
promptlab/pipeline.py - Model provider client
promptlab/provider.py
Evaluation and ranking
- Solution evaluation
promptlab/sandbox.py - Scoring and ranking
promptlab/scoring.py
History and quota
- Experiment history
promptlab/storage.py
Other components
- Researcher
- Groq API
- Ollama API
- Gemini backup
Connections 15
- Researcher → Streamlit app: submits task
README.md - Streamlit app → Task specification: requests specification
README.md - Task specification → Model provider client: requests generation
promptlab/tasks.py - Streamlit app → Model provider client: configures models
README.md - Streamlit app → Trial orchestration: starts comparison
app.py - Trial orchestration → Prompt techniques: builds prompts
promptlab/pipeline.py - Trial orchestration → Model provider client: generates solutions
README.md - Model provider client → Groq API: calls API
promptlab/provider.py - Model provider client → Ollama API: calls API
README.md - Model provider client → Gemini backup: fallback calls
README.md - Trial orchestration → Solution evaluation: evaluates solutions
README.md - Trial orchestration → Scoring and ranking: annotates trials
promptlab/pipeline.py - Streamlit app → Scoring and ranking: ranks results
app.py - Streamlit app → Experiment history: saves and reads
README.md - Streamlit app → Researcher: shows results
README.md