File size: 1,165 Bytes
72d7fac
2bb4a0d
 
 
 
72d7fac
2bb4a0d
72d7fac
 
 
2bb4a0d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
---
title: ARIA  Arman's Portfolio Chatbot
emoji: 🛰️
colorFrom: gray
colorTo: blue
sdk: docker
app_port: 7860
pinned: false
---

# ARIA — Arman's Resume Intelligence Assistant

Hand-coded RAG backend for [Arman Adil Mangat](https://github.com/ArmanAdilMangat)'s
portfolio chatbot. No no-code tools.

**Pipeline:** knowledge markdown → ~300-token chunks → `all-MiniLM-L6-v2`
embeddings → FAISS (cosine) top-4 retrieval → Groq `llama-3.1-8b-instant`.

**Stack:** Flask · sentence-transformers · FAISS · Groq · Docker.

## API

```
POST /chat
  body: { "message": str, "history": [{"role": "user"|"assistant", "content": str}] }
  resp: { "reply": str }

GET /health → {"status": "ok"}
```

CORS is restricted to the portfolio's GitHub Pages origin. Requests are
rate-limited (~20/min per IP).

## Secrets

One secret only: `GROQ_API_KEY` (Space → Settings → Variables and secrets).
It never appears in code.

## Note on cold starts

Free CPU Spaces sleep after ~48h of inactivity — the first request after a
sleep can take ~20–30s while the container wakes. The portfolio frontend
shows a "waking up the server" message for this case.