A chatbot built specifically for personal journals and diary entries. You upload your journal files, and then you can ask questions about your own writing — like "how was I feeling last week?", "what did I write about work in June?", or "what goals did I set this month?"
This is not a general-purpose chatbot. It is built around journaling — it understands emotions, dates, and entry types (reflections, goals, memories, dreams, etc.) in your journal.
- Upload your journal or diary files (PDF, DOCX, DOC, TXT)
- Ask questions about your own entries in plain language
- Detects emotions in each journal entry (joy, anxiety, sadness, etc.)
- Understands time-based queries like "last week", "yesterday", "this month"
- Classifies entries by type: reflection, goal, gratitude, memory, dream, event, insight
- Supports semantic search so you can find entries by meaning, not just keywords
- You upload a document
- The system splits it into chunks and converts them into vectors
- When you ask a question, it finds the most relevant chunks
- An AI model generates an answer based on those chunks
- Python 3.9 or higher
- Ollama installed locally with the Mistral model
- Qdrant running locally or on a remote server
- Docker (to run Qdrant)
- Tesseract OCR (only needed for scanned PDFs)
-
Clone the repo:
git clone <your-repo-url> cd Chatbot -
Create and activate a virtual environment:
python -m venv venvOn Windows:
venv\Scripts\activateOn macOS or Linux:
source venv/bin/activate -
Install dependencies:
pip install -r requirements.txt -
Create a
.envfile in the root folder with these values:OLLAMA_BASE_URL=http://localhost:11434 QDRANT_URL=http://localhost:6333 -
Start Qdrant using Docker:
docker run -p 6333:6333 -p 6334:6334 qdrant/qdrant -
Pull and start the embedding model in Ollama:
ollama run nomic-embed-text -
Start the server from the project root:
uvicorn rag_chatbot.backend.main:app --reload
Open http://127.0.0.1:8000/docs in your browser to see and test all API endpoints.
Chatbot/
├── rag_chatbot/
│ └── backend/
│ ├── api/ # API endpoints (chat, upload, search, status)
│ ├── generation/ # Response generation logic
│ ├── ingestion/ # Document processing pipeline
│ ├── query_processing/ # Query preprocessing (LLM and rule-based)
│ ├── retrieval/ # Search and retrieval logic
│ └── utils/ # Helper functions
├── requirements.txt
└── setup_project.py
| Endpoint | Method | Description |
|---|---|---|
/upload/ |
POST | Upload a document |
/chat/ |
POST | Ask a question |
/search/semantic |
POST | Search by meaning |
/search/metadata |
POST | Filter by document properties |
/search/hybrid |
POST | Combine semantic and metadata search |
/health |
GET | Check if the server is running |
/database |
GET | Database stats |
/system |
GET | Full system status |
pytest