DEV Community

Spliot S
Spliot S

Posted on

๐Ÿง  DocMind_KB: Ask Your Documents Anything Using MindsDB, Hugging Face (No OpenAI Needed)

What is DocMind_KB?

๐Ÿง  Lightweight Local Knowledge Base

A 100% local knowledge base that lets you upload CSV or PDF files and ask questions in natural language. Your documents are processed into searchable text chunks, stored in PostgreSQL, and indexed by MindsDB for semantic search. All AI models run locallyโ€”no API keys, no cloud, just fast, private answers on your machine.

๐Ÿ” How It Works

Simple Explanation:

  1. Upload Documents โ†’ Your files (CSV/PDF) get converted to text chunks
  2. Store in Database โ†’ Text chunks saved in PostgreSQL (your local database)
  3. Create AI Index โ†’ MindsDB reads your data and creates "smart embeddings" (mathematical understanding of meaning)
  4. Ask Questions โ†’ When you ask something, the system finds relevant chunks based on meaning (not just keywords)
  5. Generate Answers โ†’ Local AI model combines relevant information to create natural language answers

Why This Works:

  • PostgreSQL = Your filing cabinet (stores the actual documents)
  • MindsDB = Your smart librarian (understands what documents mean and finds relevant ones)
  • Local AI = Your assistant (reads relevant documents and answers your questions)

๐Ÿค– AI Models (340MB Total)

  • Embeddings: multi-qa-MiniLM-L6-cos-v1 (QA-optimized, 80MB) โ€“ Finds relevant information for your questions
  • Question Answering: distilbert-base-cased-distilled-squad (260MB) โ€“ Extracts precise answers from your documents
  • Lightweight & Fast โ€“ Runs on CPU, no GPU required

Link to https://github.com/Adii0906/DocMind_KB/tree/mainthe Project

Top comments (0)

Some comments may only be visible to logged-in visitors. Sign in to view all comments.