ContextUI is a multimodal Retrieval-Augmented Generation (RAG) assistant that lets you upload, embed, and query your own knowledge base. It supports text, image, and audio input, with semantic search powered by OpenAI embeddings and MongoDB Vector Search.
| Component | Tech Stack |
|---|---|
| Frontend | React, Vite, TailwindCSS |
| Backend | FastAPI (Python), LangChain |
| Vector Store | MongoDB Atlas with Vector Search |
| Embeddings | OpenAI text-embedding-3-small |
| OCR | AWS Textract |
| Audio | OpenAI Whisper |
- Upload
.txt, image, and audio files - Extract content via OCR or transcription
- Store embeddings with metadata in MongoDB
- Query with a dynamic system prompt and LLM choice
- Visualize document embeddings in 3D with PCA
- View and delete individual semantic chunks
- Responsive UI with mobile support
git clone https://github.com/YOUR_USERNAME/contextui.git
cd contextuicd backend
python -m venv .venv
.venv\Scripts\activate # or source .venv/bin/activate on macOS/Linux
pip install -r requirements.txt
cp .env.example .env # Then fill in API keys
uvicorn app.main:app --reloadcd ../frontend
npm install
npm run devOpen in browser: http://localhost:5173
Create a .env file in /backend with the following:
MONGO_URI=
OPENAI_API_KEY=
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
# Optional overrides
MONGO_DB_NAME=concierge
MONGO_COLLECTION_NAME=docs
MONGO_INDEX_NAME=vector_indexcontextui/
├── frontend/ # React UI (Vite + Tailwind)
├── backend/ # FastAPI + LangChain logic
├── .gitignore
├── .env.example
└── README.md
- Drag-and-drop file upload
- Real-time system prompt editing
- Query multiple LLMs (
gpt-3.5-turbo,gpt-4, etc.) - 3D embedding plot with file-based color coding
- Chunk-level view and deletion
- Whisper audio transcription and AWS Textract OCR
This project is for demo and educational use only. License terms TBD.