This is a AUTOSAR documents specific retriever based on LLM and RAG.
- Operation System
- Linux/MacOS (recommend)
- Windwons
- Docker
- Python: 3.9.6 (compatibility issue may occur if version too hign)
1. Install ollama and pull models
Pull the llama3:
ollama pull llama3Pull the Embeddings model:
ollama pull nomic-embed-textpython3 -m venv ~/.venvs/aienv
source ~/.venvs/aienv/bin/activatepip install -r cookbook/requirements.txtInstall docker according to this doc Docker
- Run using a helper script
./cookbook/run_pgvector.sh- OR run using the docker run command
docker run -d \
-e POSTGRES_DB=ai \
-e POSTGRES_USER=ai \
-e POSTGRES_PASSWORD=ai \
-e PGDATA=/var/lib/postgresql/data/pgdata \
-v pgvolume:/var/lib/postgresql/data \
-p 5532:5432 \
--name pgvector \
phidata/pgvector:16- Run using a helper script
./cookbook/run_qdrant.sh- OR run using the docker run command
docker run -itd --name=qdrant \
-p 6333:6333 \
-p 6334:6334 \
-e "QDRANT__SERVICE__API_KEY=123456" \
-e "QDRANT__SERVICE__JWT_RBAC=true" \
-v /home/qdrant_storage:/qdrant/storage:z \
qdrant/qdrantNOTE:
If following error occured in the step 5 or step 6, please try to change the mirror of docker
docker: error pulling image configuration: download failed after attempts=6: dial tcp 199.16.156.11:443: connect: connection refused.
streamlit run app.py-
Open localhost:8501 to view your local RAG app.
-
Add PDFs or ask question directly
-
Example PDF: ./cookbook/data/AUTOSAR/AUTOSAR_CP_SWS_DiagnosticCommunicationManager-54-78.pdf