ZENLLC commited on
Commit
00011fa
·
verified ·
1 Parent(s): 8aea936

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +39 -6
README.md CHANGED
@@ -1,13 +1,46 @@
1
  ---
2
- title: RAGmod4
3
- emoji: 😻
4
- colorFrom: yellow
5
- colorTo: yellow
6
  sdk: gradio
7
  sdk_version: 5.49.1
8
  app_file: app.py
9
  pinned: false
10
- short_description: RAGmod4
11
  ---
12
 
13
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ title: "RAG Chatbot — GPT-5.1 + URLs / Files / Text"
3
+ emoji: 🧠
4
+ colorFrom: indigo
5
+ colorTo: blue
6
  sdk: gradio
7
  sdk_version: 5.49.1
8
  app_file: app.py
9
  pinned: false
10
+ short_description: GPT-5.1 RAG chatbot for URLs, files, and text sources
11
  ---
12
 
13
+ # 🔍 RAG Chatbot GPT-5.1 + URLs / Files / Text
14
+
15
+ A universal Retrieval-Augmented Generation (RAG) chatbot powered by **OpenAI GPT-5.1** and **Gradio 5.49.1**, enabling users to inject their own knowledge in real time — via **URLs**, **uploaded files**, or **raw text blocks** — and query it conversationally.
16
+
17
+ ---
18
+
19
+ ## 🚀 Features
20
+
21
+ - **OpenAI API key input** stored per session (no backend storage)
22
+ - **GPT-5.1** model for chat; **text-embedding-3-large** for vector retrieval
23
+ - Accepts:
24
+ - Live **URLs** (auto-fetched text)
25
+ - Uploaded **files** (`.txt`, `.md`, `.csv`, `.json`)
26
+ - Custom **text areas** for notes or raw data
27
+ - Interactive **presets** that auto-fill working examples (ZEN sites, policy QA, etc.)
28
+ - **Retrieval debugging info** displayed transparently for testing relevance
29
+ - **No external DB** — fully in-memory RAG layer for portability
30
+ - Works in **Hugging Face Space**, **Google Colab**, or **local Python**
31
+
32
+ ---
33
+
34
+ ## 🧩 How It Works
35
+
36
+ 1. Enter your **OpenAI API key** and click **Save**.
37
+ 2. Add knowledge sources (URLs, uploads, or text).
38
+ 3. Click **Build / Refresh Knowledge Base**.
39
+ - Text is chunked → embedded via `text-embedding-3-large`.
40
+ - Stored in memory as a lightweight vector index.
41
+ 4. Ask questions — the system retrieves relevant chunks and constrains GPT-5.1 to answer **only from those** and your **system instructions**.
42
+
43
+ ---
44
+
45
+ ## 🧱 File Structure
46
+