File size: 3,270 Bytes
a308534
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
---
title: SAP Chatbot
emoji: πŸ€–
colorFrom: blue
colorTo: purple
sdk: streamlit
sdk_version: 1.28.0
app_file: app.py
pinned: false
---

# 🧩 SAP Intelligent Assistant

A free, open-source **RAG (Retrieval-Augmented Generation)** system for answering SAP-related questions using cloud LLMs and vector databases.

## ✨ Key Features

- βœ… 100% Free & Open Source
- βœ… Multi-source SAP data (Community, GitHub, StackOverflow, Dev.to, Medium)
- βœ… Production-ready: Supabase + pgvector vector database
- βœ… HuggingFace Inference API for fast responses
- βœ… Automatic data ingestion via GitHub Actions
- βœ… Beautiful Streamlit UI
- βœ… Multi-user cloud hosting
- βœ… Conversation history with source attribution

## πŸš€ How It Works

```
1. Data Collection β†’ 2. Embeddings β†’ 3. Vector Search β†’ 4. Answer Generation
   (SAP sources)       (sentence-         (Supabase        (HF Inference
                       transformers)      pgvector)        API)
```

**Supported Topics:**
- SAP Basis Administration
- SAP ABAP Development  
- SAP HANA
- SAP Fiori & UI5
- SAP Security & Authorization
- SAP BTP (Business Technology Platform)
- SAP Integration Suite
- SAP Performance Tuning
- And more!

## πŸ”§ Setup

### 1. Local Development (with Ollama)

```bash
# Clone repo
git clone https://github.com/Akshay-S-PY/sap-chatboot
cd sap-chatboot

# Create virtual environment
python -m venv .venv
source .venv/bin/activate

# Install dependencies
pip install -r requirements.txt

# Build dataset
python tools/build_dataset.py

# Run locally
streamlit run app.py
```

### 2. Production (Supabase + HF Spaces)

See [SUPABASE_SETUP.md](./SUPABASE_SETUP.md) for step-by-step cloud deployment.

## πŸ“Š Architecture

```
GitHub Repository (sap-chatboot)
        ↓
GitHub Actions Workflows:
  1. build_dataset.yml β†’ Dataset + Upload to HF Hub
  2. ingest.yml β†’ Ingest to Supabase
  3. deploy_spaces.yml β†’ Deploy to HF Spaces
        ↓
Supabase Database (pgvector + RLS)
        ↓
Streamlit App (HF Spaces)
        ↓
User Query β†’ Vector Search β†’ LLM Response + Sources
```

## πŸ“š Tech Stack

| Component | Technology | Cost |
|-----------|-----------|------|
| Vector Database | Supabase (pgvector) | Free |
| Embeddings | sentence-transformers | Free |
| LLM API | HuggingFace Inference | Free |
| App Hosting | HF Spaces | Free |
| Data Pipeline | GitHub Actions | Free |

## πŸ’‘ Use Cases

- **Quick SAP Questions**: Get instant answers about SAP config, ABAP, Basis
- **Learning**: Understand SAP concepts with cited sources
- **Team Knowledge Base**: Share with your entire team
- **Integration**: Use programmatically via Python API

## πŸ”— Resources

- πŸ“– [GitHub Repository](https://github.com/Akshay-S-PY/sap-chatboot)
- πŸ”— [Supabase](https://supabase.com)
- πŸ€— [HuggingFace](https://huggingface.co)
- πŸ’¬ [SAP Community](https://community.sap.com)

## ⚠️ Important Notes

- First run builds dataset (~5-10 min)
- Works 100% offline with Ollama
- All data sources are publicly available and respectfully scraped
- No personal data is stored

---

**Made with ❀️ for the SAP Community**

Have questions? Check the [documentation](./SUPABASE_SETUP.md) or create an [issue](https://github.com/Akshay-S-PY/sap-chatboot/issues).