Ismail El Abbassi
Raglet interface

AI · Retrieval2026live

Raglet

A chatbot that answers only from the documents you hand it.

LLaMA 3.3 70B

Served through Groq

TF-IDF

Cosine-similarity retrieval

24h TTL

History in Upstash Redis

Overview

Raglet is a retrieval-augmented chatbot: upload a PDF or a text file, and it answers questions about that file rather than from the model's general knowledge. The frontend is React and TypeScript on Vite, deployed to Vercel; the API is FastAPI on Render, calling Groq's LLaMA 3.3 70B for generation.

The retrieval is deliberately classical. Rather than reach for a vector database, uploaded text is chunked at 500 words with a 50-word overlap — so an answer is never sliced in half at a boundary — then vectorised with scikit-learn's TF-IDF and ranked by cosine similarity against the question. For single-document Q&A at this size it is accurate enough, it costs nothing to run, and there is no embedding service to keep alive. Chunks and conversation history both live in Upstash Redis, keyed by document and by JWT-issued session, with a 24-hour expiry.

What it does

  • 01PDF and TXT upload, with text extracted server-side by PyPDF2
  • 02Documents split into 500-word chunks with a 50-word overlap, so context never breaks mid-answer
  • 03Retrieval by TF-IDF vectors and cosine similarity, scoped to the document you selected
  • 04Conversation history persisted per session in Upstash Redis under a 24-hour TTL
  • 05JWT-issued anonymous identity — a session belongs to a user without asking anyone to sign up
  • 06Document list, per-document delete, and a clear-chat action that resets server state too
  • 07WebGL shader background rendered with ogl