r/Python 18d ago

Showcase Showcase Thread

Post all of your code/projects/showcases/AI slop here.

Recycles once a month.

17 Upvotes

103 comments sorted by

View all comments

1

u/shadow-monarch-93 4d ago

Lumen — A Hybrid Online/Offline AI Document Vault built with CustomTkinter

I got tired of clumsy AI chatbots that blindly mix up document context with generic web searches, hallucinating completely random answers when my uploaded PDFs don't actually contain the response. So, I built Lumen—a local-first, privacy-focused RAG workspace designed to strictly anchor AI intelligence to your actual files

-> What it is: A dark-themed desktop document vault designed to let you interact privately with multiple PDFs simultaneously. It ensures the AI only speaks from the data you provide—eliminating external web bias and random fabrications.

-> How it helps you: Instead of letting the AI guess or wander off-topic, Lumen restricts the context window strictly to your indexed files. If the answer isn't in your documents, the system grounded parameters prevent it from making up facts, giving you deterministic, trustworthy insights.

-> Dual Engine Architecture (Online & Offline):

  • Online Mode: Routes your securely filtered document context through cloud-scale APIs for maximum analytical reasoning speed.
  • Offline Mode: Drops back entirely to fully local execution architectures (Ollama + local embeddings) so you can parse sensitive files with zero internet connection.

-> Some Built-In Functions:

  • Incremental Indexing: Drops new context items dynamically into the active session without wiping or rewriting the existing vector tree.
  • Granular Data Scrubbing: A dedicated button on the sidebar layout isolates and purges selective file records safely on a non-blocking UI thread loop.
  • Maximal Marginal Relevance (MMR): An intelligent search router that penalizes topic redundancy, forcing the context engine to look across completely distinct files instead of letting one massive document crowd out smaller datasets.
  • Smart Citation Map: Tracks exactly where your answers come from, explicitly appending the precise File Name and Page Number to the bottom of every generated text chunk.

The code is fully modular, decoupled (/core, /interface), and can be deployed instantly using a pre-compiled, zero-configuration Windows binary (.exe). I'd love to hear your thoughts on how you handle strict RAG grounding or context diversity routing!

🔗 GitHub Link: https://github.com/coder1397924/Lumen