basantyahya commited on
Commit
0ebbd28
Β·
verified Β·
1 Parent(s): a52fb30

Update Readme.md

Browse files
Files changed (1) hide show
  1. Readme.md +6 -104
Readme.md CHANGED
@@ -1,109 +1,11 @@
1
- title: Explainable Recommendation System
2
- emoji: πŸ€–
 
3
  colorFrom: blue
4
- colorTo: green
5
  sdk: gradio
6
- sdk_version: "4.36.0"
7
  python_version: "3.10"
8
  app_file: app.py
9
  pinned: false
10
- Explainable Recommendation System Using Large Language Models
11
- Group 15 β€” CSAI 801
12
- MemberRoleBassant YehiaDeveloperMennaalla AhmedDeveloperMariem BastarousDeveloper
13
- Supervisor: Dr. Rahatara Ferdousi Β |Β  TA: Eng. Salman Rakin
14
-
15
- Project Overview
16
- A content-based recommendation system that uses an LLM (DeepSeek-R1) to generate
17
- personalised recommendations with natural-language explanations, addressing:
18
-
19
- Cold-start problem β€” no user history needed; relies purely on semantic content
20
- Lack of transparency β€” every recommendation includes a structured WHY
21
-
22
-
23
- Architecture
24
- PDF Knowledge Base
25
- β”‚
26
- β–Ό
27
- PyMuPDFLoader β†’ RecursiveCharacterTextSplitter
28
- β”‚
29
- β–Ό (1000-char chunks, 200 overlap)
30
- OllamaEmbeddings (nomic-embed-text)
31
- β”‚ [parallel via ThreadPoolExecutor]
32
- β–Ό
33
- ChromaDB Vector Store
34
- β”‚
35
- β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
36
- β”‚ Semantic retrieval (Top-K chunks)
37
- β–Ό
38
- ChatPromptTemplate (System + Human)
39
- β”‚
40
- β–Ό
41
- ChatOllama (DeepSeek-R1, temp=0.5)
42
- β”‚
43
- β–Ό
44
- StrOutputParser β†’ Explainable Recommendation
45
- β”‚
46
- β”Œβ”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”
47
- β–Ό β–Ό
48
- Gradio UI FastAPI Endpoint
49
-
50
- Quick Start
51
- 1. Prerequisites
52
- bash# Install Ollama (https://ollama.ai)
53
- ollama pull nomic-embed-text
54
- ollama pull deepseek-r1
55
-
56
- # Install Python dependencies
57
- pip install -r requirements.txt
58
- 2. Place your PDF
59
- Put your Foundational_LLM.pdf in the project root directory.
60
- 3a. Run the Gradio UI
61
- bashpython app.py
62
- Opens at http://localhost:7860 (or the public share URL printed in the terminal).
63
- 3b. Run the FastAPI server
64
- bashuvicorn api:app --host 0.0.0.0 --port 8000 --reload
65
- Interactive API docs at http://localhost:8000/docs
66
-
67
- API Endpoints
68
- MethodPathDescriptionGET/healthHealth checkGET/infoProject & system metadataPOST/recommendSingle recommendation queryPOST/recommend/batchBatch queries (up to 10)
69
- Example β€” Single Query
70
- bashcurl -X POST http://localhost:8000/recommend \
71
- -H "Content-Type: application/json" \
72
- -d '{"question": "What techniques improve LLM reasoning?", "top_k": 5}'
73
- Example β€” Batch Query
74
- bashcurl -X POST http://localhost:8000/recommend/batch \
75
- -H "Content-Type: application/json" \
76
- -d '{
77
- "questions": [
78
- "What is prompt engineering?",
79
- "How does RAG work?"
80
- ],
81
- "top_k": 5
82
- }'
83
-
84
- Features vs. Traditional Systems
85
- FeatureTraditional RSThis System (FM-based)Cold startWeakStrong (content-based)ExplainabilityLowHigh (structured WHY)ConversationalNoYesSetup speedSlowFastReasoningStatisticalSemantic
86
-
87
- Project Scope (30 Hours)
88
- Included βœ…
89
-
90
- Content-based recommendations
91
- Embeddings + LLM explanations
92
- API-only implementation (FastAPI)
93
- Gradio prototype UI
94
-
95
- Excluded ❌
96
-
97
- Large-scale data
98
- Collaborative filtering
99
- Production frontend UI
100
- Production deployment
101
-
102
-
103
- File Structure
104
- recommendation_system/
105
- β”œβ”€β”€ app.py ← Gradio UI + full RAG pipeline
106
- β”œβ”€β”€ api.py ← FastAPI REST endpoint
107
- β”œβ”€β”€ requirements.txt ← Python dependencies
108
- β”œβ”€β”€ README.md ← This file
109
- └── Foundational_LLM.pdf ← Knowledge base (add manually)
 
1
+ ---
2
+ title: Explainable LLaMA Recommendation System
3
+ emoji: πŸ“š
4
  colorFrom: blue
5
+ colorTo: purple
6
  sdk: gradio
7
+ sdk_version: "4.44.0"
8
  python_version: "3.10"
9
  app_file: app.py
10
  pinned: false
11
+ ---