How ikueisou/mllm-rag works
Project type and purpose
• This is a full-stack AI-powered document processing, embedding, search and visualization platform.
• The Python “core” directory implements a FastAPI-style backend with modules for parsing, embeddings, caching, vector storage, document/graph services, and background workers.
• The “ee/ui-component” directory is a Next.js/React frontend providing UI components for chat, document upload, graph visualization, search, and theme management.
File structure
• Top-level:
• start_server.py, quick_setup.py, init.sql, pyproject.toml, requirements.txt – server bootstrap, DB initialization, dependencies.
• core/ – backend packages (api, config, logging, models, services, database, vector_store, cache, embedding, completion, parser, reranker, storage, workers).
• ee/ui-component/ – frontend app, components, hooks, styles, build/config files.
• Architectural clues:
• “api.py” exposes HTTP endpoints.
• “workers/ingestion_worker.py” runs asynchronous ingestion pipelines.
• “vector_store” + “database” modules implement persistent Postgres + pgvector storage.
• “cache” and “completion” modules wrap ML model calls with factories.
• “services” layer orchestrates domain logic (documents, graph, rules, user, telemetry).
README for additional insights
• Backend relies on PostgreSQL with pgvector, plus system libs (poppler, tesseract).
• Quick-setup and start scripts spin up environment and server.
• Frontend runs via npm in “ee/ui-component”.
Elements
• Blue for user-facing components (UI)
• Green for API/Services
• Orange for data stores
• Purple for ML components & caches
• Grey for external dependencies (S3, LLM APIs)
Detail without overthinking
• Both synchronous flows (UI→API→DB) and asynchronous processes (Worker→Parser→Vector Store).
• Update and refine as you discover more internal interactions or third-party calls.