Portfolio

Project #1

pondit_moshAI

Laravel + Python document RAG application with: 

  • Authenticated users private document storage queued PDF ingestion
  • Qdrant-backed retrieval filtered by user_id Ollama chat with streamed responses persisted chat sessions with UUID-based URLs
pondit_moshAI

The project is split into two parts:

  • Laravel app:
    • authentication
    • dashboard and document management
    • private file serving and download
    • queued ingestion trigger
    • chat UI and streamed chat responses
  • Python pipeline in scripts/:
    • PDF loading
    • chunking
    • Hugging Face embeddings using all-MiniLM-L6-v2
    • Qdrant retrieval and storage

Current RAG flow:

  1. A logged-in user uploads a PDF from the dashboard.
  2. Laravel stores the original file in private storage and records it in the documents table.
  3. A queued job copies the file into scripts/data/<category>/ and runs the Python ingest command with the current user_id.
  4. The Python script embeds chunks and stores them in Qdrant with metadata.user_id and metadata.category.
  5. In chat, Laravel asks the Python script for top matching chunks for the current user.
  6. Laravel injects those chunks into a system prompt and streams the final answer from Ollama.
Main Features
  • Document uploads are stored for reference. Originals are not deleted after ingestion.
  • Documents are tracked in the database with ingestion status.
  • Users can only read and download their own stored files.
  • Categories are centrally maintained in config/category.php.
  • Chat sessions are persisted in chat_sessions and chat_messages.
  • Chat session URLs use UUIDs, for example /chat?session=<uuid>.
  • Last 20 messages are loaded into model memory per chat session.
  • Chat uses normal streamed HTTP responses. No WebSocket server is required.
Requirements
  • PHP 8.2+
  • Composer
  • Node.js / npm
  • Python 3.x
  • Ollama
  • Qdrant Cloud account or compatible Qdrant endpoint


 

Home
Chat
Settings