Three practical retrieval projects spanning vector similarity, local Ollama RAG, and a document-chat API with a Streamlit client.
This repository is a collection of independent Retrieval-Augmented Generation experiments, not one installable package. Each directory has its own dependencies, runtime assumptions, and data path.
The projects cover a notebook-driven book recommender, a local Llama 3 assistant backed by PostgreSQL/pgvector, and a FastAPI + Chroma document-chat service with a Streamlit UI.
| Project | Interface | Retrieval / model path | Evidence in the repository |
|---|---|---|---|
book-recommender-vector-similarity/ |
Jupyter notebooks | Tagged descriptions and vector similarity over the included book data | Two notebooks, dataset files, and a captured Python environment |
rag-llama3-ollama-webapp/ |
Streamlit | Ollama Llama 3 + Ollama embeddings + PostgreSQL/pgvector | App, assistant configuration, and setup notes |
rag-streamlit-fastapi/ |
FastAPI and Streamlit | Local Hugging Face embeddings + Chroma + Groq chat model | API, client, sample PDF, persisted Chroma data, API PDF, and screenshots |
The image below is the checked-in Streamlit client for rag-streamlit-fastapi after processing a document and starting a chat.
cd book-recommender-vector-similarity
python -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements.txt
jupyter labOpen data-explore.ipynb first, then vector-search.ipynb. The requirements file is a broad captured environment rather than a minimal dependency set.
Prerequisites: Python, Docker, and Ollama with the llama3 model available.
cd rag-llama3-ollama-webapp
python -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements.txt
ollama pull llama3Start the database expected by assistant.py:
docker run -d \
--name pgvector \
-e POSTGRES_DB=ai \
-e POSTGRES_USER=ai \
-e POSTGRES_PASSWORD=ai \
-p 5532:5432 \
phidata/pgvector:16Then run:
streamlit run app.pycd rag-streamlit-fastapi
python -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements.txtCreate .env with a Groq key:
GROQ_API_KEY=your_key_hereRun the API and UI in separate terminals:
python main.pystreamlit run streamlit.pyThe API documentation is served at http://localhost:8000/docs. The Dockerfile runs the API only; the Streamlit client is a separate process.
- The projects are independent experiments with no root dependency lock or shared runner.
rag-streamlit-fastapiaccepts server-local file paths, keeps chat sessions in memory, enables wildcard CORS, and includes a persisted Chroma database; review these choices before using untrusted data or exposing it publicly.- Its Streamlit client deletes the temporary upload immediately after the API call and loses chat state on reload.
- The local Ollama project uses the older
phipackage API and a hard-coded PostgreSQL URL. - The book recommender environment is large and not guaranteed to reproduce across platforms.
- No repository-wide license, CI configuration, or automated test suite is present.
