Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lecture Navigator

LLM-powered assistant for querying lecture slides through a lightweight Streamlit interface.

Features

  • Smart lecture search: Accepts natural-language questions and returns grounded answers with slide-level citations.
  • Built-in slide loader: Scans and preprocesses all PDFs in the data/ folder into searchable document chunks.
  • Retrieval-augmented generation: Uses vector similarity search with OpenAI embeddings and a language model to generate context-aware responses.
  • Streamlit interface: Minimal UI for running local semantic search and viewing citations in real time.

Project Structure

.
├── app
│   ├── __pycache__
│   └── main.py               # Streamlit app to run the Lecture Navigator UI
│   
├── backend                   # Core logic for PDF loading, splitting, embedding, and QA
│   ├── __init__.py    
│   ├── data_loader.py        # Loads PDFs from the data folder
│   ├── splitter.py           # Splits documents into smaller chunks
│   ├── vectorstore.py        # Embeds chunks and stores them in FAISS
│   ├── qa_chain.py           # Builds the LangChain QA chain
│   └── pipeline.py           # Initializes the full pipeline 
│   
├── data                      #Folder containing lecture PDF slides
│   └── *.pdf
├── env
│   └── .env                  # Your OpenAI API key goes here
├── notebooks
│   └── test_questions.ipynb  # Notebook for asking questions and interacting with results
│   
├── preview                   # UI preview images
│   ├── question_answer.png
│   └── slide_preview.png
├── README.md
└── requirements.txt

Installation

  1. Clone the repository
git clone https://github.com/your-username/lecture-navigator.git
cd lecture-navigator
  1. Create and activate a virtual environment
conda create -n lecture-navigator python=3.11 -y
conda activate lecture-navigator
  1. Install dependencies
pip install -r requirements.txt
  1. Set up your OpenAI API key

Create a file named .env inside the env/ directory
Add your OpenAI API key like this:

OPENAI_API_KEY=your_openai_api_key_here

Make sure not to share this key publicly. It gives access to your usage and billing on the OpenAI platform.

  1. Add your PDF lecture slides Create the data/ folder if it doesn't already exist:
mkdir data

Place all your lecture slides (as .pdf files) into the data/ folder.

Run the app with Streamlit

To launch the interactive app in your browser, run the following command from the root directory:

python -m streamlit run app/main.py

This will open a local Streamlit interface where you can:

  • Ask natural-language questions about your lecture slides
  • Get answers with source citations (slide numbers and file names)

User Interface Preview

Here’s what the app looks like in action:

Question with Source-Cited Answer

Q&A Screenshot

Slide Snippet and Reference Details

Slide Preview Screenshot

Run in Notebook (Optional)

  • Open notebooks/test_questions.ipynb to explore the system in a code-first environment.
  • The notebook includes preconfigured environment loading, pipeline initialization, and sample questions.
  • Modify the list of questions to reflect content from the PDFs stored in the data/ folder.

Useful for testing, debugging, and custom evaluation without launching the Streamlit interface.

Collaborators

License

This project is licensed under the MIT License.

Acknowledgments

This project was developed as part of The Knowledge House's Innovation Fellowship.
Special thanks to the TKH team for their support and guidance.

About

Smart lecture search: ask a question and get the exact slide with citations

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages