AI Note Assistant is a powerful, production-ready full-stack application built to manage your notes and chat with them using Retrieval-Augmented Generation (RAG). By combining a FastAPI backend, an SQLite database, FAISS for fast vector search, and an intuitive Streamlit frontend, this application allows you to effortlessly interact with your personal knowledge base.
- Notes Management (CRUD): Create, read, update, and delete text notes seamlessly.
- PDF Upload Support: Quickly ingest PDF documents. The system automatically reads and extracts text.
- Automated Embedding: Leveraging OpenAI's
text-embedding-3-small, all uploaded notes and PDFs are immediately tokenized, chunked, and embedded. - Semantic Text Search: Uses FAISS in-memory indexing to find the most contextually relevant information instantly.
- Context-Aware AI Chat: Talk to your notes! Under the hood, OpenAI's
gpt-4o-miniis firmly grounded by the precise context from only your documents, completely minimizing AI hallucinations. - Dynamic Math Formatting: Ensures mathematical formulas embedded in your notes are rendered properly on the frontend using KaTeX formatting.
- Backend: Python, FastAPI, SQLAlchemy, SQLite, Pydantic
- AI & RAG Engine: OpenAI API, FAISS, tiktoken, pypdf
- Frontend: Streamlit, requests
- Python 3.9+
- An OpenAI API Key
git clone https://github.com/ogulcanozturk/notes-rag-assistant.git
cd notes-rag-assistantInstall the required packages using pip:
pip install -r requirements.txtCopy the provided .env.example file and replace the placeholder with your actual OpenAI API key.
cp .env.example .envEnsure your .env contains:
OPENAI_API_KEY=your_openai_api_key_hereFor the application to function fully, you need to run both the backend and frontend simultaneously.
Run the following command in the root of the project to start the API:
uvicorn backend.main:app --reload- The backend will be available at
http://127.0.0.1:8000 - Interactive API documentation can be accessed at
http://127.0.0.1:8000/docs
Open a new terminal window/tab and run:
streamlit run frontend/app.py- The Streamlit interface will open automatically in your browser at
http://127.0.0.1:8501
Contributions are always welcome! Feel free to open an issue or submit a Pull Request.
This project is licensed under the MIT License.
Copyright (c) 2026 Oğulcan Öztürk. See the LICENSE file for more details.