Files

23 lines
1.0 KiB
Markdown

# Paket Lab P-10 (RAG Part 1)
## Persiapan (sekali saja)
```
python -m venv .venv
.venv\Scripts\activate # Windows (Mac/Linux: source .venv/bin/activate)
pip install -r requirements.txt # unduhan besar (PyTorch); bila berat, pakai Google Colab
```
Letakkan 2-3 PDF berbasis teks (bukan scan) di folder `dokumen/`.
## Urutan pengerjaan
| Lab | Perintah | Hasil |
|---|---|---|
| 1 | `python lab1_chunking.py dokumen/NAMA.pdf` | tabel jumlah chunk + contoh chunk -> `hasil_lab1.txt` |
| 2 | `python indeks.py 500 1000 1500` | koleksi pedoman_500/1000/1500 di `chroma_db/` |
| 2 | `python cari.py 1000` lalu ajukan 5 pertanyaan biasa + 2 parafrase | cek manual: chunk teratas relevan? |
| 3 | `python bantu_buat_uji.py` -> isi `uji.py` (15 pasangan) | |
| 3 | `python evaluasi_retrieval.py 500 1000 1500` | tabel Hit@1/3/5 + MRR -> `hasil_lab3.txt/.csv` |
| 3 | isi `KESIMPULAN_LAB3.md` | kesimpulan 3-4 kalimat |
Jangan hapus folder `chroma_db/` - dipakai di P-11.
Pertama kali dijalankan, model embedding diunduh (ratusan MB), jadi `indeks.py` terasa lama.