Project Info
This project did not submit a demo video on Devpost.
Inspiration
With the Berkeley enrollment time just around the corner, everyone is stressed about what classes to take. Recently, we had a conversation with one of our friends who was especially stressed about taking CS 162 next semester, with her main concern being that the course has so much content and it will be hard for her to process and digest all the information before midterms. We got the idea to create SecondSearch, where her and all other students in any class can quickly and efficiently review class material by searching through lectures directly.
What it does
SecondSearch answers any question about a course with a direct link to the lecture which explains the question. It performs a vector similarity search to determine which portion of lecture is most likely to answer your question and then displays that video.
How we built it
We built SecondSearch on the Milvus open-source vector database, using OpenAI to help with the search, then completed the product with a companion React frontend built with Chakra UI component library. We implemented the backend using FastAPI and populated the Milvus docker containers with Jupyter Notebook.
Challenges we ran into
We had trouble setting up Milvus and Docker at first, but were quickly able to find thorough documentation for the setup process. Working with React and frontend in general for the first time, we took a couple hours ramping up. It was smooth sailing after the difficult ramp up process :)
Accomplishments we're proud of
We're proud of getting a full stack product working in the short span of the hackathon: the client, server, and Milvus docker instance.
What we learned
We learned how to use Docker, FastAPI, and React, as well as the basics (struggles) of full stack development.
What's next
After creating the minimum viable product, we wanted to make the UI more friendly by using OpenAI to summarize the caption display from the video segments. However, we quickly realized that adding this change would slow the search time down from its current ~1 second to ~20 seconds. As we ran out of time to speed up this feature, we decided to temporarily remove it. However, we will be reimplementing it more efficiently as soon as possible. As for the big picture and the more distant future, currently our product works with lecture series uploaded to Youtube - we want to expand to lecture videos uploaded to other platforms, as some Berkeley classes upload recordings to bCourses, and other institutions use different platforms. After we expand the project further, some reaching goals for the far future include advertising the completed product to all university students, as lectures are often recorded and uploaded in some form. We also want to add new features on future patches such as saving previous searches, and more.
Inspiration
With the Berkeley enrollment time just around the corner, everyone is stressed about what classes to take. Recently, we had a conversation with one of our friends who was especially stressed about taking CS 162 next semester, with her main concern being that the course has so much content and it will be hard for her to process and digest all the information before midterms. We got the idea to create SecondSearch, where her and all other students in any class can quickly and efficiently review class material by searching through lectures directly.
What it does
SecondSearch answers any question about a course with a direct link to the lecture which explains the question. It performs a vector similarity search to determine which portion of lecture is most likely to answer your question and then displays that video.
How we built it
We built SecondSearch on the Milvus open-source vector database, using OpenAI to help with the search, then completed the product with a companion React frontend built with Chakra UI component library. The backend was made using FastAPI and the Milvus docker containers were populated using Jupyter notebooks.
Challenges we ran into
We had trouble setting up Milvus and Docker at first. We also were new to React so had some difficulties getting that to work.
Accomplishments that we're proud of
We're proud of getting a full stack product working: the client, server, and Milvus docker instance.
What we learned
We learned how to use Docker, FastAPI, and React
What's next for SecondSearch
After creating the minimum viable product, we wanted to make the UI more friendly by using OpenAI to summarize the caption display from the video segments. However, we quickly realized that adding this change would slow the search time down from its current ~1 second to ~20 seconds. As we ran out of time to speed up this feature, we decided to temporarily remove it. However, we will be reimplementing it more efficiently as soon as possible. As for the big picture and the more distant future, currently our product works with lecture series uploaded to Youtube - we want to expand to lecture videos uploaded to other platforms, as some Berkeley classes upload recordings to bCourses, and other institutions use different platforms. After we expand the project further, some reaching goals for the far future include advertising the completed product to all university students, as lectures are often recorded and uploaded in some form. We also want to add new features on future patches such as saving previous searches, and more.
Built With Milvus Open Source Vector Database FastAPI Python React
Analysis
View
Metric
- 11
- 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
- FastAPIIn code
- HTMLIn code
- JavaScriptIn code
- OpenAIIn code
- PythonIn code
- ReactIn code
6 of 6 appear in the indexed code.
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
34 KB
Source files
23
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
KanishkGar/calhacks
93 files · 35.2 MB · @ c917ca8
Structure
API & routing
4 files · 4%Request entry points: routes, handlers and controllers.
Application logic
42 files · 45%Domain rules, services and shared utilities.
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
- JavaScript54%
- Python19%
- Markdown16%
- Shell5%
- HTML5%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
server/requirements.txt
pypi · 42- aiohttp
- aiosignal
- annotated-types
- anyio
- async-timeout
- attrs
- certifi
- charset-normalizer
- click
- environs
- exceptiongroup
- fastapi
- frozenlist
- grpcio
- h11
- idna
- marshmallow
- milvus
- +24 more
my-app/package.json
npm · 13- @chakra-ui/icons
- @chakra-ui/react
- @emotion/react
- @emotion/styled
- @testing-library/jest-dom
- @testing-library/react
- @testing-library/user-event
- framer-motion
- react
- react-dom
- react-icons
- react-scripts
- web-vitals
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.
Feature verification
Direct link to the answering lecture segment with timestampVerified
Answers any question about a course with a direct link to the lecture which explains the question
Claimed on Devposthigh confidenceserver/src/util/util_function.py:47— process_key_tuple builds a YouTube URL with a start-time query param plus formatted start/end times from the Milvus hit idmy-app/src/Boxes.js:21— Frontend embeds the returned URL directly in an iframe video player alongside the timestamp range
FastAPI backendVerified
Backend implemented using FastAPI
Claimed on readmehigh confidenceserver/src/api.py:8— FastAPI app is instantiated and exposes the query endpoint with CORS middleware
Milvus docker instance populated via Jupyter NotebookVerified
Populated the Milvus docker containers with Jupyter Notebook
Claimed on readmehigh confidencescrape_process/imdb_search_milvus_client.ipynb:296— Notebook cell builds embeddings and calls collection.insert(ins) to populate the Milvus collectionscrape_process/process_text.ipynb— Companion notebook processes scraped lecture text/pickles (e.g. scrape_process/cs162_pickle) feeding the insertion notebook
Milvus vector database backendVerified
Built on the Milvus open-source vector database
Claimed on readmehigh confidenceserver/src/util/milvus_model.py:24— Connects to Milvus, defines a collection schema with a FLOAT_VECTOR embedding field, creates an IVF_FLAT index, and loads itserver/requirements.txt:18— milvus and pymilvus are declared as backend dependencies
OpenAI embeddings powering the searchVerified
Using OpenAI to help with the search
Claimed on readmehigh confidenceserver/src/util/milvus_model.py:54— embed() calls openai.Embedding.create with the text-embedding-ada-002 engine to produce the vector used in the Milvus search
React frontend with Chakra UIVerified
Companion React frontend built with Chakra UI component library
Claimed on readmehigh confidencemy-app/package.json:7— @chakra-ui/react is a declared dependencymy-app/src/SearchBar.js:36— Components import and render Chakra UI primitives (Input, IconButton, Flex) for the search UI
Vector similarity search over lecture contentVerified
Performs a vector similarity search to determine which portion of lecture is most likely to answer your question
Claimed on Devposthigh confidenceserver/src/util/milvus_model.py:71— MilvusModel.search embeds the query text and runs collection.search against the embedding field with L2 metricserver/src/api.py:34— The /api/v1/query endpoint calls MilvusModel.search(question) to serve the search request
OpenAI caption summarization (temporarily disabled)Code-supported
Wanted to make the UI more friendly by using OpenAI to summarize the caption display, but removed it due to slowdown
Claimed on readmehigh confidenceserver/src/util/milvus_model.py:59— get_completion contains an OpenAI ChatCompletion summarization call, but it returns summarize_caption immediately on line 60 before reaching that code, matching the readme's claim that the feature was pulled out
An AI agent derived these features from the project’s Devpost page and readme, then searched the code for each one. Verified features are backed by cited code; claimed-only features had no supporting code, which is not by itself proof a feature is missing.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.