Documentation

Everything you need to get started with Knowledge Assistant

📝 Overview

Knowledge Assistant is a premium AI-powered internal knowledge assistant designed to help you answer questions based on your Google Drive files using Retrieval Augmented Generation (RAG).

Simply connect your Google Drive, select the files you want to index, and start asking questions. The AI will search through your documents and provide accurate answers with citations.

✨ Key Features

  • Google Drive Integration – Seamlessly connect your Drive files and build a searchable database for instant retrieval.
  • Hybrid Search – Combines Vector Search (semantic meaning) and BM25 Search (keyword matching) for maximum accuracy.
  • Intelligent OCR – Advanced document parsing with automatic Tesseract OCR fallback for scanned documents and images.
  • Real-time Chat – Interactive chat interface with streaming responses and clickable source citations.
  • Automatic Sync – Background scheduler keeps your knowledge base up-to-date with Google Drive changes.

🚀 Getting Started

1

Log In with Google

Click the Login button in the navbar. You'll be prompted to authenticate with your Google account. If you're a new user, your account will be created automatically.

2

Configure Your OpenAI API Key

After logging in, you'll be redirected to the Configure page. Enter your OpenAI API key and click "Test OpenAI Key" to validate it. The app uses gpt-4.1-mini for generating responses.

💡 Your API key is stored securely and is only used for your queries.

3

Authorize Google Drive

Click Authorize Google Drive to grant read-only access to your files. This allows the app to read and index the documents you select.

4

Select Files to Index

Use the file picker to select which Google Drive files you want to include in your knowledge base. You can select individual files or multiple documents.

5

Build the Database

Click Build Database to download your files, generate embeddings, and create your searchable vector index. A progress bar will show the indexing status.

6

Start Chatting

Once configuration is complete, navigate to the Chat page. Type your question in the input box and press Send. The AI will search your documents and provide answers with source citations.

🛠️ Self-Hosting

Knowledge Assistant can be self-hosted on your own infrastructure. You'll need the following prerequisites:

Requirements

  • Python 3.9+
  • Zilliz Cloud account – Managed Milvus for vector storage
  • Firebase project – For authentication and Firestore database
  • OpenAI API key – For the language model
  • Tesseract OCR (optional) – For scanning images and PDFs

Environment Variables

Create a .env file based on .env.template with the following key configurations:

  • FIREBASE_API_KEY, FIREBASE_AUTH_DOMAIN, etc. – Firebase client config
  • FIREBASE_ADMIN_CREDENTIALS_PATH – Path to Firebase Admin SDK JSON
  • ZILLIZ_CLOUD_URI, ZILLIZ_CLOUD_TOKEN – Zilliz Cloud connection
  • GOOGLE_PICKER_API_KEY – For Google Drive file picker
  • OPIK_API_KEY (optional) – For observability tracing

Running Locally

The easiest way to run locally is with Docker:

docker compose up --build

The app will be available at http://localhost:5001.

Alternatively, you can run directly with Python:

pip install -r requirements.txt
python app.py

⚙️ Architecture

  • Backend: Flask (Python) with Gunicorn for production
  • Frontend: HTML5, Vanilla CSS, JavaScript
  • RAG Engine: LlamaIndex with hybrid search (Vector + BM25)
  • Database: Google Cloud Firestore (managed)
  • Vector Store: Zilliz Cloud (managed Milvus)
  • Chat Model: OpenAI GPT-4.1 mini
  • OCR: Tesseract for scanned documents
  • Analytics: Opik tracing for observability

💬 Support

If you have questions or need help, reach out via arjuntheprogrammer@gmail.com.

🎥 Video Walkthrough: Watch on YouTube

Ready to get started?

Get Started