YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

⚑ Nexus AI β€” Smart Document Analyzer

A production-grade RAG (Retrieval-Augmented Generation) system for intelligent PDF Q&A with real semantic search, page-level citations, and multi-document support.


πŸš€ Features

Feature Description
Real Semantic Search Uses sentence-transformers + cosine similarity β€” not keyword matching
Multi-PDF Support Upload and query across multiple documents simultaneously
Page Citations Every answer shows exact source page + relevance score
Auto Summary Document is summarized automatically on upload
Dual API Switch between Groq (Llama 3.1) and Google Gemini with one click
Conversation Memory Follow-up questions retain context from previous turns
Export Chat Download your full Q&A session as a text file

πŸ›  Setup (Local)

1. Clone & install

git clone <your-repo>
cd nexus-ai
pip install -r requirements.txt

2. Get API keys (both free)

3. Run

streamlit run app.py

Enter your API key(s) in the sidebar when the app opens.


☁️ Deploy to Streamlit Community Cloud (Recommended)

  1. Push your code to a public GitHub repo
  2. Go to share.streamlit.io
  3. Connect your GitHub β†’ Select app.py
  4. Add secrets in Settings β†’ Secrets:
GROQ_API_KEY = "gsk_..."
GEMINI_API_KEY = "AIza..."
  1. Click Deploy β€” done in ~2 minutes βœ…

πŸ— Architecture

PDF Upload
    β”‚
    β–Ό
Page-by-Page Text Extraction (pypdf)
    β”‚
    β–Ό
Semantic Chunking (280 words, 55 overlap)
    β”‚
    β–Ό
Embedding Generation (all-MiniLM-L6-v2)
    β”‚
    β–Ό
In-memory Vector Store (numpy arrays)
    β”‚
  Query
    β”‚
    β–Ό
Semantic Search (cosine similarity, top-5)
    β”‚
    β–Ό
Context + Citations β†’ LLM (Groq / Gemini)
    β”‚
    β–Ό
Answer with Page Citations + Relevance Scores

πŸ“ Project Structure

nexus-ai/
β”œβ”€β”€ app.py              # Main application
β”œβ”€β”€ requirements.txt    # Dependencies
└── README.md           # This file

πŸ”‘ Key Technical Concepts Demonstrated

  • RAG Pipeline β€” Full retrieval-augmented generation from scratch
  • Semantic Embeddings β€” Sentence transformers for meaning-based search
  • Vector Similarity β€” Cosine similarity for chunk retrieval
  • LLM Integration β€” Multi-provider API abstraction
  • Context Window Management β€” Conversation history with truncation
  • PDF Processing β€” Page-level text extraction and chunking

🏷 Tech Stack

Python Streamlit sentence-transformers scikit-learn pypdf Groq API Google Gemini API NumPy

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support