Build better prompts. Unlock deeper learning.
π https://promptbeaver.streamlit.app/
PromptBeaver is a prompt engineering tool designed for undergraduate students studying Computer Science (CS), Data Science (DS), and/or Artificial Intelligence (AI).
It does not generate answers or solve homework problems. Instead, it helps users build, analyze, and refine prompts that guide LLMs toward clear, structured, conceptual explanations.
PromptBeaver supports two core workflows:
- Build a Prompt β Generate a structured, high-quality prompt from guided inputs
- Analyze My Prompt β Evaluate and improve an existing prompt with real model behavior
In both workflows, the studentβs question is always automatically included inside the final prompt, ensuring the LLM responds directly to the intended question.
PromptBeaver helps students:
- Formulate precise prompts that clearly express conceptual questions
- Guide LLMs toward teaching and explanation, not solution generation
- Avoid prompts that lead to answer leakage or homework completion
- Evaluate prompts using LLM-based scoring and behavior previews
- Iteratively improve prompts through suggested edits and revision tools
The result is a refined prompt (not an answer) that enables students to engage with LLMs in a way similar to TA or professor office hours.
PromptBeaver is aligned with core undergraduate CS/DS/AI coursework:
- CS 180 β Object-Oriented Programming
- CS 182 β Foundations of Computer Science
- CS 251 / CS 253 β Data Structures & Algorithms
- CS 373 β Data Mining & Machine Learning
These courses guide both concept selection and prompt structure, ensuring prompts remain focused on conceptual mastery rather than solution generation.
Users can either build a new prompt or analyze an existing one.
| Mode | Description |
|---|---|
| Build a Prompt | Generate a structured prompt using guided selections |
| Analyze My Prompt | Paste an existing prompt and evaluate how it behaves |
In both modes:
- The studentβs question is automatically appended
- The system evaluates how well the prompt guides model behavior
| Input | Description | Options |
|---|---|---|
| Interaction Mode | Determines how the LLM teaches and responds | Socratic Coach, Guided Tutor, Expert Explainer, Simulated Novice Learner |
| Question Intent | Defines the goal of the explanation | Clarify a Concept, Walk Through an Example, Check My Reasoning |
| General Concept | Broad subject area (based on course) | e.g. Data Structures & Algorithms (CS 251/253) |
| Specific Concept | Targeted subtopic within the domain | e.g. Hash Tables, Graphs |
| User Question | Conceptual question (β€150 words) | e.g. βWhy is hash table lookup O(1) on average?β |
| Input | Description |
|---|---|
| Supporting Materials | Lecture slides, personal notes, textbook excerpts to ensure the desired conceptual context and relevancy. |
PromptBeaver outputs a fully structured prompt, along with:
- β Behavior preview (first-turn model response)
- β Evaluation scores (alignment, clarity, constraints, accuracy)
- β Concrete suggested edits to improve the prompt
- β Automatic or customizable revision options
- β Manual prompt editing with re-evaluation
Users can:
- Apply all suggested edits
- Customize edits before applying
- Manually rewrite the full prompt
- Re-run evaluation instantly
- Track improvements using score deltas (β / β / β)
Prompts are evaluated using an LLM-based verifier across four dimensions:
- Alignment β Matches selected mode, intent, and concept
- Clarity β Clear and easy for the model to follow
- Constraint Adherence β Enforces rules (e.g., no direct answers)
- Accuracy β Response is instructionally correct
Each metric is scored from 1β5, and revisions track:
- β Improvement (green)
- β Decrease (red)
- β No change (neutral)
-
Prompt Construction
- Build mode: structured prompt generated from selections
- Analyze mode: user prompt + question automatically combined
-
LLM Behavior Preview
- Simulates a single-turn response
-
Evaluation (LLM-as-Judge)
- Scores prompt + response across key metrics
-
Feedback + Suggested Edits
- Returns structured issues and exact prompt edits
-
Revision Engine
- Applies edits directly or allows customization
-
Re-evaluation + Delta Tracking
- Displays score improvements (β) or decreases (β)
PromptBeaver is deployed as a live web application using Streamlit Cloud, with all LLM interactions powered through Purdue GenAI Studio.
- Primary Model:
gpt-oss-120b - Backup Model:
llama4:latest
-
The primary model (
gpt-oss-120b) is used for:- Behavior preview (simulated response)
- Prompt evaluation (LLM-as-judge)
-
The backup model (
llama4:latest) is used when:- The primary model is unavailable
- A generation request fails or times out
- Frontend + Application Layer: Streamlit (hosted via Streamlit Cloud)
- LLM Infrastructure: Purdue GenAI Studio API
- Pipeline Execution: Python-based prompt construction, evaluation, and revision loop
All model calls are integrated directly into the prompt β response β evaluation β revision loop described above.
PromptBeaver/
βββ app.py # Main Streamlit application
βββ prompt_builder.py # Prompt construction logic
βββ verifier.py # LLM-as-judge evaluation + scoring
βββ assets/
β βββ prompt_beaver_mascot.png
β βββ analyze_prompt_interface.png
βββ build_prompt_interface.png
β βββ mermaid-diagram.png
βββ requirements.txt
βββ README.md
Gemini 3 and ChatGPT 5.3 were used only for:
- Boilerplate code generation
- Debugging assistance
- UI refinement
- Initial documentation generation
- Mascot image generation
Human-driven:
- Project design
- Evaluation metrics
- System pipeline
- Final edits



