Nullpointer-KK commited on
Commit
7cb0777
·
1 Parent(s): 901545d

update README

Browse files
Files changed (1) hide show
  1. README.md +12 -12
README.md CHANGED
@@ -12,7 +12,7 @@ pinned: false
12
  # Crypto_RAG_ChatBot
13
  This is a cryptocurrency-focused Retrieval-Augmented Generation (RAG) app. It retrieves from your uploaded documents and added URLs, reranks results, and generates answers with a chat LLM. It can also route "price" queries to a live price tool for major coins.
14
 
15
- 1) OPENAI API KEY (REQUIRED; PASTE-ONLY, NEVER SAVED)
16
  -----------------------------------------------------
17
  - The chat model requires an OpenAI API key.
18
  - Paste your key into the "OpenAI API Key" field in the UI.
@@ -21,7 +21,7 @@ pinned: false
21
  - Restarting or refreshing the Space clears it.
22
  - The key is used only to generate chat responses for this app.
23
 
24
- 2) QUICK COST ESTIMATE (GPT-4o-mini PRICING)
25
  --------------------------------------------
26
  Pricing used: (https://platform.openai.com/docs/pricing)
27
  - Input: $0.15 per 1,000,000 tokens
@@ -42,13 +42,13 @@ Per-query cost:
42
 
43
  Result: Approximately six-tenths of a cent ($0.0066) for the full try, well under the $0.50 budget.
44
 
45
- 3) FREE OPEN-SOURCE RETRIEVAL MODELS
46
  ------------------------------------
47
  - Embeddings: sentence-transformers/all-MiniLM-L6-v2
48
  - Reranker: cross-encoder/ms-marco-MiniLM-L-6-v2
49
  These run locally in the Space and are free (no API costs).
50
 
51
- 4) UPLOADING .PDF / .TXT / .MD FILES (FOR RAG)
52
  ----------------------------------------------
53
  - Click "Add files" and select any combination of .pdf, .txt, or .md.
54
  Sample pdf and txt files can be found at : /data/samples -> download the
@@ -57,14 +57,14 @@ These run locally in the Space and are free (no API costs).
57
  with metadata for retrieval.
58
  - After adding files, click "Build Index" so they are included in search.
59
 
60
- 5) ADDING MULTIPLE URLS (FOR RAG)
61
  ---------------------------------
62
  - Paste one URL per line in the "URLs" box and click "Add URLs".
63
  Refer to /data/samples/Links%20sample.txt for example links
64
  - The app fetches and parses the pages (static articles and PDFs work best).
65
  - After adding URLs, click "Build Index" to include them in retrieval.
66
 
67
- 6) BUILD INDEX AND RETRIEVAL OPTIONS
68
  ------------------------------------
69
  After you add files and/or URLs, click "Build Index". You can tune:
70
 
@@ -79,19 +79,19 @@ If results seem off:
79
  - Adjust alpha (higher favors keywords; lower favors semantic similarity).
80
  - Increase Rerank Top-K for stronger final ordering (slightly more CPU).
81
 
82
- 7) STREAMING RESPONSES (SELECTABLE)
83
  ---------------------------------
84
  - Streaming ON: words appear live as the model generates.
85
  - Streaming OFF: you receive a single final answer after generation finishes.
86
  Toggle this with the "Streaming" checkbox.
87
 
88
- 8) CHAT MODEL CHOICE (FIXED FOR NOW)
89
  ------------------------------------
90
  - The chat model is fixed in this version of the app for reliability and cost
91
  control. If you need a different model, it can be changed in code and
92
  redeployed; the UI currently does not expose a model selector.
93
 
94
- 9) LIVE PRICE SEARCH FOR MAJOR COINS + ROUTING
95
  ----------------------------------------------
96
  - If your question looks like a price query (for example: "BTC price",
97
  "price of ETH", "SOL price in USD"), the app routes to a tool instead of RAG:
@@ -102,14 +102,14 @@ Toggle this with the "Streaming" checkbox.
102
  ("price", "quote", "market cap", "ATH", and similar). If matched, it uses
103
  the tools route; otherwise it uses the RAG route (retrieve -> rerank -> answer).
104
 
105
- 10) QUICK START
106
  ---------------
107
  1. Initialize pipeline (if manual init is enabled).
108
  2. Paste your OpenAI API key (not saved).
109
  3. Add files and/or add URLs.
110
- Sample pdf and txt files can be found at : /data/samples -> download the
111
  files to your drive and multi select to upload
112
- Refer to /data/samples/Links%20sample.txt for example links
113
  4. Click Build Index.
114
  5. Ask questions. E.g. "what is Ethereum vs Solana?", "What is bitcoin strength and weakness?"
115
  6. For prices, try queries like "ETH price", "SOL quote", "XRP price in USD".
 
12
  # Crypto_RAG_ChatBot
13
  This is a cryptocurrency-focused Retrieval-Augmented Generation (RAG) app. It retrieves from your uploaded documents and added URLs, reranks results, and generates answers with a chat LLM. It can also route "price" queries to a live price tool for major coins.
14
 
15
+ 1) **OPENAI API KEY (REQUIRED; PASTE-ONLY, NEVER SAVED)**
16
  -----------------------------------------------------
17
  - The chat model requires an OpenAI API key.
18
  - Paste your key into the "OpenAI API Key" field in the UI.
 
21
  - Restarting or refreshing the Space clears it.
22
  - The key is used only to generate chat responses for this app.
23
 
24
+ 2) **QUICK COST ESTIMATE (GPT-4o-mini PRICING)**
25
  --------------------------------------------
26
  Pricing used: (https://platform.openai.com/docs/pricing)
27
  - Input: $0.15 per 1,000,000 tokens
 
42
 
43
  Result: Approximately six-tenths of a cent ($0.0066) for the full try, well under the $0.50 budget.
44
 
45
+ 3) **FREE OPEN-SOURCE RETRIEVAL MODELS**
46
  ------------------------------------
47
  - Embeddings: sentence-transformers/all-MiniLM-L6-v2
48
  - Reranker: cross-encoder/ms-marco-MiniLM-L-6-v2
49
  These run locally in the Space and are free (no API costs).
50
 
51
+ 4) **UPLOADING .PDF / .TXT / .MD FILES (FOR RAG)**
52
  ----------------------------------------------
53
  - Click "Add files" and select any combination of .pdf, .txt, or .md.
54
  Sample pdf and txt files can be found at : /data/samples -> download the
 
57
  with metadata for retrieval.
58
  - After adding files, click "Build Index" so they are included in search.
59
 
60
+ 5) **ADDING MULTIPLE URLS (FOR RAG)**
61
  ---------------------------------
62
  - Paste one URL per line in the "URLs" box and click "Add URLs".
63
  Refer to /data/samples/Links%20sample.txt for example links
64
  - The app fetches and parses the pages (static articles and PDFs work best).
65
  - After adding URLs, click "Build Index" to include them in retrieval.
66
 
67
+ 6) **BUILD INDEX AND RETRIEVAL OPTIONS**
68
  ------------------------------------
69
  After you add files and/or URLs, click "Build Index". You can tune:
70
 
 
79
  - Adjust alpha (higher favors keywords; lower favors semantic similarity).
80
  - Increase Rerank Top-K for stronger final ordering (slightly more CPU).
81
 
82
+ 7) **STREAMING RESPONSES (SELECTABLE)**
83
  ---------------------------------
84
  - Streaming ON: words appear live as the model generates.
85
  - Streaming OFF: you receive a single final answer after generation finishes.
86
  Toggle this with the "Streaming" checkbox.
87
 
88
+ 8) **CHAT MODEL CHOICE (FIXED FOR NOW)**
89
  ------------------------------------
90
  - The chat model is fixed in this version of the app for reliability and cost
91
  control. If you need a different model, it can be changed in code and
92
  redeployed; the UI currently does not expose a model selector.
93
 
94
+ 9) **LIVE PRICE SEARCH FOR MAJOR COINS + ROUTING**
95
  ----------------------------------------------
96
  - If your question looks like a price query (for example: "BTC price",
97
  "price of ETH", "SOL price in USD"), the app routes to a tool instead of RAG:
 
102
  ("price", "quote", "market cap", "ATH", and similar). If matched, it uses
103
  the tools route; otherwise it uses the RAG route (retrieve -> rerank -> answer).
104
 
105
+ 10) **QUICK START**
106
  ---------------
107
  1. Initialize pipeline (if manual init is enabled).
108
  2. Paste your OpenAI API key (not saved).
109
  3. Add files and/or add URLs.
110
+ - Sample pdf and txt files can be found at : /data/samples -> download the
111
  files to your drive and multi select to upload
112
+ - Refer to /data/samples/Links%20sample.txt for example links
113
  4. Click Build Index.
114
  5. Ask questions. E.g. "what is Ethereum vs Solana?", "What is bitcoin strength and weakness?"
115
  6. For prices, try queries like "ETH price", "SOL quote", "XRP price in USD".