Inspiration
University educators spend a disproportionate amount of time answering the same questions — "When is Assignment 2 due?", "What's the late submission policy?", "Can I get an extension?" — questions that are already answered in the syllabus. This leaves less time for actual mentorship and teaching. We wanted to build something that genuinely gives educators their time back, which aligned perfectly with the "Build with Gratitude" theme.
What it does
TAI is an agentic RAG (Retrieval-Augmented Generation) teaching assistant for university courses. Educators upload their course materials (syllabi,
transcripts, policies) and students can ask natural language questions about anything in those documents — grading policies, deadlines, schedule details — and
receive accurate, source-cited answers.
When students need to request a deadline extension, TAI goes further: it extracts the assignment name and reason from the conversation and automatically
drafts a professional email the student can copy and send to their professor. Out-of-scope questions are actively refused, with the student redirected to
email the professor directly — ensuring the assistant never misleads.
How we built it
The stack is intentionally lean and fully serverless on AWS:
- Amazon S3 stores educator-uploaded PDFs and TXT files
- Amazon Bedrock Knowledge Base (with OpenSearch Serverless + Titan Embeddings v2) automatically indexes course materials when files are uploaded
- AWS Lambda (kb_sync_trigger) listens for S3 ObjectCreated events and triggers KB ingestion jobs
- Amazon Bedrock Agent (Claude 3.5 Sonnet) orchestrates all reasoning — routing queries to the KB or invoking tools
- AWS Lambda (email_drafter) is called by the agent as an action group to format extension request emails
- Streamlit provides the chat UI, including a sidebar for file uploads and inline rendering of email drafts
We validated correctness using pytest unit tests and Hypothesis property-based tests (100 examples each) covering file validation and email entity
preservation.
Challenges we ran into
- Bedrock Agent event format — parsing the action group payload correctly (the nested requestBody.content.application/json.properties array) required careful reading of the Bedrock docs and iterative testing.
- KB sync timing — ingestion jobs are asynchronous, so there's a delay between an upload and queryability. We handled this with polling scripts during
integration testing. - Guardrail tuning — getting the agent to confidently refuse out-of-scope questions without being overly restrictive required prompt engineering iterations.
Accomplishments that we're proud of
- A fully serverless architecture with zero custom vector database setup — Bedrock managed everything
- Property-based tests that formally verified entity preservation and email structure across hundreds of generated inputs
- Clean separation of pure logic (validator, formatter) from AWS wiring, making the core components independently testable
- An agentic tool-use flow that feels natural: students just describe their situation and get a ready-to-send email
What we learned
- Amazon Bedrock Agents abstract a lot of orchestration complexity — attaching a KB and action group replaces what would otherwise be a custom retrieval loop
- Hypothesis property testing surfaces edge cases (empty strings, unicode, dots in filenames) that hand-written unit tests routinely miss
- System prompt design is as important as any other engineering decision — the refusal behavior is a feature, not a guardrail bolted on after the fact
What's next for TAI
- Multi-course support — namespace the KB by course so multiple professors can each have their own isolated context
- Authentication — connect to UW's SSO so responses can be personalized to the logged-in student
- Persistent chat history — store sessions in DynamoDB so students can resume conversations
- Proactive notifications — trigger deadline reminders via SNS when a document mentions an upcoming due date
- Professor dashboard — surface anonymized question analytics (most common queries, unanswered questions) to help educators improve their course materials
Log in or sign up for Devpost to join the conversation.