A production-quality Retrieval-Augmented Generation (RAG) application that lets you chat with your documents using Hugging Face models. Upload PDFs, text files, and more β then ask questions and get AI-powered answers with source citations.
- π Document Upload - Drag & drop PDFs, DOCX, TXT, Markdown, and more
- π Smart Chunking - Automatically splits documents into searchable chunks
- π§ RAG Pipeline - Retrieves relevant context before generating answers
- π¬ Chat Interface - Natural conversation with source citations
- π Document Search - Search your knowledge base directly
- β‘ Fast & Local - In-memory vector store for quick responses
- π¨ Modern UI - Beautiful React interface with Tailwind CSS
- FastAPI - Modern Python web framework
- LangChain - LLM application framework
- Hugging Face Inference API - Cloud-based model inference
- PyPDF2 & python-docx - Document parsing
- NumPy - Vector similarity search
- React 18 - UI framework
- Vite - Build tool
- Tailwind CSS - Styling
- Zustand - State management
- Lucide Icons - Beautiful icons
- Python 3.11+
- Node.js 18+
- Hugging Face Account - Get your API token
git clone https://github.com/yourusername/no-code-rag.git
cd no-code-ragcd backend
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Start the server
uvicorn main:app --reload --port 8000The API will be available at http://localhost:8000
cd frontend
# Install dependencies
npm install
# Start the dev server
npm run devThe app will be available at http://localhost:5173
- Open
http://localhost:5173in your browser - Click the Settings icon (βοΈ)
- Enter your Hugging Face API token
- Select your preferred models:
- Generation:
mistralai/Mistral-7B-Instruct-v0.3(recommended) - Embeddings:
sentence-transformers/all-MiniLM-L6-v2(recommended)
- Generation:
- Click Save Settings
- Drag and drop files into the upload zone, or click to browse
- Supported formats: PDF, DOCX, TXT, MD, CSV, JSON, and code files
- Click "Index All Documents" to embed them into the knowledge base
- Type your question in the chat input
- The AI will search your documents for relevant context
- Get answers with source citations showing which documents were used
- Use the search bar to find specific content
- Results show matching text chunks with relevance scores
- Click on results to see the source document
| Endpoint | Method | Description |
|---|---|---|
/health |
GET | Health check |
/api/documents/upload |
POST | Upload and embed a file |
/api/documents |
POST | Upload documents (JSON) |
/api/documents |
DELETE | Clear all documents |
/api/documents/status |
GET | Get document count |
/api/documents/search |
POST | Search documents |
/api/rag/query |
POST | RAG query (chat) |
/api/embeddings |
POST | Generate embeddings |
/api/generate |
POST | Text generation |
/api/models |
GET | List recommended models |
no-code-rag/
βββ backend/
β βββ api/
β β βββ routes/ # API endpoints
β β βββ schemas.py # Pydantic models
β βββ services/
β β βββ hf_client.py # Hugging Face client
β β βββ vectorstore.py # In-memory vector store
β β βββ rag_chain.py # RAG pipeline
β β βββ document_parser.py # PDF/DOCX parsing
β βββ core/
β β βββ dependencies.py # Dependency injection
β βββ main.py # FastAPI app
β βββ requirements.txt
βββ frontend/
β βββ src/
β β βββ components/ # React components
β β βββ api/ # API client
β β βββ state/ # Zustand store
β β βββ types/ # TypeScript types
β βββ package.json
β βββ vite.config.ts
βββ screenshots/ # App screenshots
βββ README.md
| Model | Description |
|---|---|
mistralai/Mistral-7B-Instruct-v0.3 |
Fast, high-quality responses |
microsoft/Phi-3-mini-4k-instruct |
Compact and efficient |
HuggingFaceH4/zephyr-7b-beta |
Great for conversations |
google/gemma-2-2b-it |
Lightweight option |
| Model | Description |
|---|---|
sentence-transformers/all-MiniLM-L6-v2 |
Fast, good quality |
BAAI/bge-small-en-v1.5 |
High quality embeddings |
sentence-transformers/all-mpnet-base-v2 |
Best quality, slower |
- In-memory storage: Documents are lost when the server restarts
- No authentication: Designed for local use
- Rate limits: Subject to Hugging Face API rate limits
- Persistent vector database (ChromaDB/Pinecone)
- User authentication
- Multiple chat sessions
- Document preview
- Export chat history
- Docker deployment
MIT License - feel free to use this project for learning and building!
Contributions are welcome! Please feel free to submit a Pull Request.
Built with β€οΈ using FastAPI, React, and Hugging Face



