A research/experimental repository for building RAG pipelines on top of IDEArq resources
(http://www.idearqueologia.org) using Weaviate, LangChain/LangGraph, Ollama (local LLMs), and HuggingFace embeddings.
This project explores how to apply Retrieval-Augmented Generation (RAG) to improve the analysis and querying of archaeological documentation, integrating LLMs with a vector database and an app layer.
RAG/
├── rag-idearq-langgraph-weaviate.ipynb # RAG notebook + evaluation
├── rag-indexacion-weaviate.ipynb # Indexing notebook
├── results.pdf # Evaluation results
├── RAG-idearq/ # Weaviate Docker setup
│ ├── weaviate_data/ # Local vector DB storage
│ └── docker-compose.yml # Docker Compose for Weaviate
├── streamlit/ # Streamlit application
│ ├── app_streamlit.py # Streamlit UI
│ └── backend_flask.py # Flask API backend
├── requirements.txt # Python dependencies
└── README.md # Documentation
- Python 3.12.x (tested on 3.12.11)
- Docker + Docker Compose
- (Recommended) Conda environment
- Ollama installed locally (for local LLM inference)
git clone https://github.com/aguayoe/RAG.git
cd RAG
pip install -r requirements.txtcd RAG-idearq
docker compose upTerminal 1 (Flask API):
python3 streamlit/backend_flask.pyTerminal 2 (Streamlit app):
streamlit run streamlit/app_streamlit.pyMake sure Ollama is running first, then:
ollama run hf.co/MaziyarPanahi/Phi-3.5-mini-instruct-GGUF:Q6_Krag-indexacion-weaviate.ipynb: ingest/index data into Weaviaterag-idearq-langgraph-weaviate.ipynb: run the RAG pipeline and evaluation
- Weaviate (Docker Compose)
- Flask API backend
- Streamlit UI
- Ollama model
- Streamlit:
http://localhost:8501 - Flask API: often
http://localhost:5000 - Weaviate: commonly
http://localhost:8080
If you get a “port already in use” error, stop the process using that port or change the port in the corresponding config/script.
- Docker containers:
docker ps
- Weaviate logs:
(Run inside
docker compose logs -f
RAG-idearq/.)
- Make sure Docker is running and you have permissions.
- From
RAG-idearq/try:docker compose down docker compose up --build
If pip install -r requirements.txt fails, create an isolated environment and retry:
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt- Confirm Ollama is installed and running.
- List local models:
ollama list
- If the model name differs, replace it in the
ollama run ...command.
CC0-1.0 license.
