After Hours Help: an AI assistant for the Gavilan College Library

Overview

The Digital Transformation Hub (DxHub) at California Polytechnic State University (Cal Poly) in San Luis Obispo, powered by Amazon Web Services (AWS) and part of the AWS Cloud Innovation Centers (CIC) program, partnered with Gavilan College Library to build an AI-powered chatbot that provides students with instant, reliable answers to everyday library questions, even when no librarian is on duty. 

The chatbot handles the operational questions students would normally ask at the front desk: library hours, laptop checkout and returns, textbook availability, research database access, citation help, and directions to campus resources. It searches the library’s own website and live book catalog in real time, responds in English and Spanish, and hands off to a human librarian whenever a question goes beyond its scope. The result is a lightweight, scalable solution that extends the library’s reach without replacing the people who run it. 

Problem

Community college students juggle classes, jobs, and family obligations, and many of their questions about library services come up during evenings, weekends, and breaks, exactly when librarians are unavailable. A student working a late shift who needs to know if the library is open tomorrow, whether a textbook is on course reserve, or how to access a research database has no one to ask. The questions themselves are straightforward, but without a timely answer, students may miss deadlines, overlook resources they are entitled to, or simply give up. 

At the same time, when librarians are on duty, a significant share of their time goes to answering the same recurring questions (hours, policies, how to check out a laptop, where to find a database) over and over. That repetitive workload leaves less room for the high-value work librarians are trained to do: guiding students through research strategies, teaching information literacy, and providing one-on-one academic support. 

Gavilan College Library also faces a challenge common across California Community Colleges: library webpages and digital content have accumulated over years, and some are difficult to navigate or fall short of modern accessibility standards. Students using assistive technologies or navigating on mobile devices can struggle to find the information they need, even when it exists on the site. The library recognized that AI could play a role not only in answering questions but also in helping surface and organize existing content more effectively. 

Innovation In Action

The Gavilan Library Chatbot was designed around a simple but deliberate principle: it is a library desk assistant, not an AI research librarian. Its scope is limited to the operational questions a student would ask at the front desk, and it knows when to step back. When a student asks a research question or anything beyond its operational scope, the chatbot routes them to a human librarian rather than attempting an answer it is not qualified to give. Under the hood, the chatbot uses Retrieval-Augmented Generation (RAG) to ground every response in the library’s own content. A scraper automatically pulls pages from the Gavilan College Library website on a tiered schedule: pages that change frequently, like hours and closures, are refreshed daily, while a full sweep of the site runs every five days. The scraped content is chunked, embedded, and stored in a vector database so the chatbot can search it semantically when a student asks a question. This means the chatbot’s knowledge stays current without any manual updates from library staff. 

Beyond the library’s website content, the chatbot connects directly to the college’s Ex Libris Primo discovery system, the live book and course reserves catalog. When a student asks whether a specific textbook is available or what’s on reserve for their biology class, the chatbot queries the catalog in real time and returns actual availability, not a cached or stale answer. This live catalog integration is the only external dependency; it is designed to fail gracefully so that a slow or unresponsive catalog system never blocks the chatbot from answering other questions. 

Since Gavilan College serves a Hispanic and Latino student population, the chatbot’s interface is fully bilingual in English and Spanish, switchable with a single click, so language is never a barrier to getting help. 

Technical Solution

The solution is built entirely on AWS services and deployed as a single AWS Cloud Development Kit (CDK) stack, where one command provisions the complete system with no manual infrastructure setup required. 

Retrieval-Augmented Generation (RAG) forms the core of the chatbot’s intelligence. An AWS Lambda function scrapes curated library and campus pages into clean markdown in an Amazon S3 bucket, the data source for an Amazon Bedrock Knowledge Base, which chunks and embeds with Amazon Titan Text Embeddings V2 and stores the vectors in Amazon S3 Vectors. Two Amazon EventBridge schedules answer the question the library actually asked, which was: we changed our hours, when does the bot know? A fast tier re-reads the three pages carrying hours and closures daily, and a full tier re-reads everything every five days. Every step downstream is gated on real file change to keep scraping costs extremely small. Each stored page carries a content fingerprint in its S3 metadata, and re-indexing starts only when the bucket is genuinely newer than the last ingestion job. 

Query path. A public POST /query on an Amazon API Gateway HTTP API invokes a Lambda running a Bedrock Converse tool-use loop with Claude Sonnet 4.6. The model gets four tools and chooses among them: knowledge base retrieval, the research-database catalog, the general catalog, and course reserves. The two catalog tools call the Ex Libris Primo API directly, the only non-AWS dependency in the path. 

The query path uses an agentic tool-use loop powered by Amazon Bedrock’s Converse API with Anthropic’s Claude as the generation model. When a student sends a message, the system screens it with a Bedrock Guardrail for prompt injection, then enters a loop where the model decides which source database it should use. The loop continues until the model has the information it needs to compose a complete answer. 

The frontend is a dependency-free, self-injecting JavaScript widget that library staff embed on their website with a single <script> tag. It runs inside a Shadow DOM so it cannot conflict with the host site’s styling. A hosted settings editor lets librarians customize the highlight color, font, and starter questions at runtime, with no code changes or redeployment needed.

Next Steps

The Gavilan Library Chatbot is designed to be adopted and adapted by other institutions. The entire solution is open source, and the single-stack CDK deployment means another community college library could stand up its own instance by pointing the scraper at its own website and configuring its own catalog API credentials. The modular architecture, where scraper, knowledge base, catalog tools, and widget are all independent components, means institutions can adopt the pieces that fit their needs. 

Student Spotlight

Kyle Morgan

Software Developer

Supporting Documents

Source CodeAll of the code and assets developed during the course of creating the prototype.
System ArchitectureA diagram that describes the technical components needed to implement the solution.

About the DxHub

The Cal Poly Digital Transformation Hub (DxHub) is a strategic relationship with Amazon Web Services (AWS) and is the world’s first cloud innovation center supported by AWS on a University campus. The primary goal of the DxHub is to provide students with real-world problem-solving experiences by immersing them in the application of proven innovation methods in combination with the latest technologies to solve important challenges in the public sector. The challenges being addressed cover a wide variety of topics including homelessness, evidence-based policing, digital literacy, virtual cybersecurity laboratories and many others. The DxHub leverages the deep subject matter expertise of government, education, and non-profit organizations to clearly understand the customers affected by public sector challenges and develop solutions that meet the customer needs.