An AI powered documentation assistant built with RAG (Retrieval Augmented Generation). Upload your documentation files, ask questions in natural language, and get accurate answers with source citations, powered entirely by free-tier APIs.
| Layer | Technology |
|---|---|
| Backend | NestJS (TypeScript) |
| Frontend | React + Vite + TailwindCSS |
| Vector DB / Cache / Storage | Redis Stack |
| LLM | Groq (llama-3.3-70b-versatile) with Google AI (Gemini) fallback |
| Embeddings | Jina AI (jina-embeddings-v3, 1024 dimensions) |
| Package Manager | pnpm |
- upload
.mdor.txtdocumentation files - split content into chunks by markdown headers and word count
- generate 1024-dim embeddings via Jina AI
- store chunks + embeddings in Redis vector index (
idx:docs) - deduplicate via SHA-256 content hash
- embed the user question via Jina AI (
retrieval.querytask) - check semantic cache (
idx:cache) for a similar previously answered question - if cache miss, run KNN vector search to find top 5 relevant chunks
- build prompt with retrieved context and send to Groq LLM
- return answer with source file citations
- cache Q&A pair for future similar questions
- Groq : LLM (free tier: 14k requests/day)
- Jina AI : Embeddings (free tier: 1M tokens)
- Google AI Studio : Fallback LLM (free tier: 1M tokens/day)
cd server
cp .env.example .env
# Fill in your API keys in .envdocker-compose -f docker/docker-compose.yml up -dcd server
pnpm install
pnpm run start:devcd client
pnpm install
pnpm run devApp runs at http://localhost:5173, backend at http://localhost:3000.
| Endpoint | Method | Description |
|---|---|---|
/api/ingest |
POST | Upload documentation files (multipart) |
/api/ask |
POST | Ask a question { question: string } |
/api/documents |
GET | List all uploaded documents |
/api/documents/:id |
DELETE | Delete a document and its chunks |
| Key Pattern | Type | Description |
|---|---|---|
file:<hash> |
Hash | Document metadata (fileName, chunks, createdAt) |
doc:<hash>:<i> |
Hash | Document chunk with embedding vector |
cache:<id> |
Hash | Cached Q&A pair with embedding vector |
idx:docs |
Index | Vector index for document chunk search |
idx:cache |
Index | Vector index for semantic cache lookup |
MIT