switched ollama model, added script to add pdfs to the vector store, tuned RAG parameters

This commit is contained in:
2026-02-11 15:21:26 +01:00
parent 4364ddcd71
commit 4879439f27
3 changed files with 29 additions and 7 deletions
+5
View File
@@ -1,5 +1,6 @@
#!/usr/bin/env python3
"""Add all PDFs under a folder to the RAG vector store. Run from project root."""
import shutil
from pathlib import Path
from local_rag import LocalRAG
@@ -8,6 +9,10 @@ DATA_ROOT = Path("/Users/Philipp/Desktop/workspace/python/gpt_publikationen/data
VECTORSTORE_PATH = "./vectorstore"
if __name__ == "__main__":
if Path(VECTORSTORE_PATH).exists():
shutil.rmtree(VECTORSTORE_PATH)
print(f"Cleared existing vector store: {VECTORSTORE_PATH}")
pdfs = sorted(p for p in DATA_ROOT.rglob("*") if p.suffix.lower() == ".pdf")
print(f"Found {len(pdfs)} PDF(s) under {DATA_ROOT}")
if not pdfs: