Project Info
Inspiration
Generative AI is now a default study tool. The issue is not use vs. no use, but alignment: general-purpose chatbots do not know a courseβs syllabus, policies, or pedagogical intent, and they often optimize for answer completion rather than conceptual understanding. We built pigeonhole to make AI support instruction by design, with instructor control and learning-first interaction.
What it does
pigeonhole is a course-aligned AI TA that provides scaffolded help rather than direct solutions. For students, it guides problem solving through questions, hints, and stepwise decomposition. After a session, it produces a structured recap (what was confusing, how understanding changed, what to review) and enables quick review through a lightweight quiz. For instructors, it offers configurable guardrails (what help is allowed, what topics are off-limits) and aggregated insight into common misconceptions and friction points.
How we built it
We implemented a web app with distinct student and instructor workflows: Instructor configuration: course context, policy constraints, and approved hint scaffolds. Student chat: a guided dialogue loop that prioritizes questioning, partial hints, and checking student work before progressing. Learning artifacts: automatic session summaries and exportable PDFs for later study or forum posting. Analytics: aggregation of anonymized interaction signals to surface high-level confusion patterns.
Challenges we ran into
Defining βhelpful but not too helpfulβ in a way that is consistent across topics and student behaviors. Preventing accidental answer leakage while still allowing students to make progress under time pressure. Translating open-ended chat transcripts into concise, accurate recaps without introducing new errors. Designing instructor controls that are powerful but simple enough to set up quickly.
Accomplishments we're proud of
Built an end-to-end experience that serves both students and instructors, not just a chatbot. Implemented policy-aware scaffolding that reliably pushes for student work and reasoning before hints escalate. Produced reusable learning artifacts (recaps + PDF export) that turn chat into study material.
What we learned
Guardrails are most effective when they are explicit, instructor-configurable, and enforced at the interaction level, not just as a disclaimer. Students respond well to structured guidance when it reduces cognitive load (first step, plan, checkpoints). Instructor trust depends on transparency, control, and clear evidence of learning alignment.
What's next
Richer instructor tooling: assignment-specific rubrics, granular hint templates, and per-topic constraints. Stronger analytics: confusion clustering by concept, time-to-first-progress, and pre/post understanding signals. Personalized study support: adaptive review plans before exams, spaced repetition prompts, and targeted practice sets. Multimodal outputs: short personalized explanation videos based on what a student struggled with. Deeper integration: LMS and course content connections to make setup and compliance seamless.
π Pascal β AI Teaching Assistant
AI isn't going anywhere. Students are already using ChatGPT, Claude, and Copilot to do their homework β often getting complete solutions with zero learning. Banning AI tools doesn't work. The answer isn't prohibition; it's giving teachers control.
Pascal is a course-aware AI TA that puts instructors in the loop. Teachers configure exactly how much help the bot gives, what it can and can't reveal, and which materials it draws from. Students get real-time scaffolded help that builds understanding β not an answer machine.
π‘ Why Pascal?
Most AI tools treat education as an afterthought. Students paste a homework problem into ChatGPT and get a full solution. They learn nothing. Teachers have no visibility or control.
Pascal flips this:
- π§βπ« Teacher in the loop. Instructors set the rules β help level, allowed artifacts, topic restrictions, staff notes β and the bot follows them. The teacher decides whether students get Socratic questioning, guided hints, or full tutoring. Not the AI.
- π Integrity first. The default is restrictive. No answers, no full code, attempt required first. Teachers opt in to more permissive modes when appropriate. The bot enforces academic integrity by design, not as an afterthought.
- π Scoped to real course materials. Pascal only knows what the teacher gives it β syllabi, lecture notes, problem sets. It doesn't hallucinate references to materials that don't exist. When general chat is enabled, it's limited to teacher-selected documents.
- π Assignment-aware. Each assignment can have its own help level, anchor document, staff notes, and annotated hints. When a student asks about "question 4," the bot knows exactly which document to look in.
β¨ Features
π For Instructors
- Course creation with join codes for student enrollment
- Three help levels per assignment: Strict (confirmation only), Guided (Socratic hints), Full Support (complete tutoring after effort shown)
- Policy guardrails β toggle final answers, full code, require-attempt-first, allowed/disallowed artifacts
- Topic gating β mark topics as "not yet taught," "allowed," or "warn" to prevent the bot from spoiling upcoming material
- Staff notes β private per-assignment instructions the bot follows but never reveals to students
- Anchor documents β designate one material as THE assignment doc so the bot knows where to look for question numbers
- PDF annotations β highlight specific passages in uploaded PDFs with private hints for the bot
- General chat control β disabled by default; teachers enable it and select exactly which materials (e.g. syllabus) the bot can reference
- Course materials β upload PDFs, text files, and markdown; extracted text is chunked and embedded for RAG retrieval
- Usage insights β see which assignments get the most questions, top topics, common misconceptions (LLM-summarized)
- Announcements β post messages visible to enrolled students
- Roster management β view enrolled students
- Student view preview β see exactly what students see
π For Students
- Assignment-aware chat β select an assignment and get help scoped to that specific problem set and its materials
- Concept check quizzes β inline multiple-choice questions after explanations to reinforce learning (toggleable)
- Clickable source citations β bot responses link back to specific pages/sections of course materials
- Save and bookmark helpful messages during a session
- Export to PDF β save threads or snippets for offline review or forum sharing
- Session history β resume past conversations per assignment
- Feedback β rate responses as helpful, not helpful, or too revealing
- LaTeX and Markdown rendering for math-heavy courses
βοΈ Under the Hood
- RAG retrieval β course materials are chunked, embedded, and searched via vector similarity so the bot references real content, not hallucinations
- Anchor boosting β chunks from the designated assignment document get a similarity boost and a guaranteed secondary search fallback
- Anti-hallucination prompting β the bot is explicitly forbidden from inventing lecture names, chapter titles, or any references not present in its provided materials
- Per-assignment policy overrides β each assignment can override the course-level help policy
- Streaming responses via SSE for real-time chat
- Question hint matching β the bot detects when students reference specific questions and applies instructor-provided hints
π§± Tech Stack
- Next.js (App Router) + TypeScript
- TailwindCSS
- Supabase (Postgres + Auth + Storage)
- OpenAI API (GPT-4o-mini for chat, text-embedding-3-small for RAG)
π Getting Started
- Clone the repo
- Copy
.env.exampleto.env.localand fill in Supabase + OpenAI keys - Run migrations:
supabase db push - Install dependencies:
npm install - Start dev server:
npm run dev
π Project Structure
src/
app/
admin/ # Instructor dashboard + course config
student/ # Student dashboard + chat
api/ # API routes (chat, assignments, bot-config, etc.)
components/
admin/ # AssignmentEditor, MaterialsPanel, PdfAnnotator, etc.
assignments/ # AssignmentSelect
chat/ # ChatWindow, ChatMessage, ChatComposer
courses/ # CourseCard
layout/ # AppShell (nav)
pdf/ # ExportButton
lib/
prompt.ts # System prompt builders (full-text + RAG)
policy.ts # Guardrail logic, topic gating
embeddings.ts # Vector embedding generation
types.ts # Shared TypeScript types
supabase/
migrations/ # SQL migrations
Analysis
View
Metric
- 16
- 3
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- CSSIn code
- Next.jsIn code
- OpenAIIn code
- ReactIn code
- SQLIn code
- SupabaseIn code
- Tailwind CSSIn code
- TypeScriptIn code
- Node.jsClaimed
8 of 9 appear in the indexed code. 1 claimed on Devpost could not be matched to code, which may simply mean the tool leaves no trace in the repository.
AI coding agents
No AI coding agent signals were found in this repository.
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
290 KB
Source files
83
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
danielmargento/pigeonhole
97 files Β· 1.3 MB Β· @ 5f33455
Structure
Interface
33 files Β· 34%Screens, components and styles rendered to the user.
API & routing
19 files Β· 20%Request entry points: routes, handlers and controllers.
Application logic
13 files Β· 13%Domain rules, services and shared utilities.
Data & schema
14 files Β· 14%Schema definitions, migrations and data access.
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here β open the file browser to check anything the diagram implies.
Languages
- TypeScript93%
- Markdown4%
- SQL3%
- CSS0%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
package.json
npm Β· 22- @supabase/ssr
- @supabase/supabase-js
- @tailwindcss/typography
- katex
- marked
- next
- openai
- pdf-parse
- react
- react-dom
- react-markdown
- rehype-katex
- remark-gfm
- remark-math
- +8 more
Declared in the repositoryβs manifests at the indexed commit. A declared package is not proof it is used, and runtime dependencies are listed first.
This projectβs features have not been analysed yet.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.