Spaces:
Running
Running
File size: 1,048 Bytes
f47082c 6dbd1b0 f47082c 6dbd1b0 f47082c 6dbd1b0 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ---
title: RAG Document Q&A
emoji: π
colorFrom: blue
colorTo: indigo
sdk: static
pinned: true
license: mit
short_description: "In-browser RAG: ask questions about your own PDFs"
tags: [rag, retrieval, question-answering, transformers.js, semantic-search]
---
# π RAG Document Q&A
Retrieval-Augmented Generation pipeline that runs entirely in the browser: document loading (PDF via pdf.js, TXT, pasted text), chunking with overlap, sentence embeddings (Xenova/all-MiniLM-L6-v2), cosine-similarity vector search and extractive answering (Xenova/distilbert-base-cased-distilled-squad). Retrieved passages are shown with similarity scores so every answer is traceable. Documents never leave the user's device.
Runs fully client-side with [Transformers.js](https://huggingface.co/docs/transformers.js) (ONNX Runtime Web) β no server, no API keys.
**Author:** [Alexandru Cojocari](https://www.linkedin.com/in/alexdataanalyst/) Β· [GitHub](https://github.com/DatadrivenAlex) β Junior AI Developer (Generative AI, RAG, Agentic AI, Secure AI)
|