- Implementing pgVector as vector database on top of PostgreSQL, use it as retriever and pass it to LLM as RAG.
- Docker: To pull pgvector, postgresql and pgadmin interface images from DockerHub and run it, setup vector database and serve as retriever.
- OpenAI account: To call the LLM api.
- Memory: 12GB and above.
cdinto the project dir. Please ensure thedocker-compose.ymlis exist.- Run
docker-compose up
- Login PGadmin4 thru http://localhost:82/
- Create server group.
- Register server
- Ensure to check "IP address" of
pgvectorcontainer inspect as this is the Hostname to register server. ie"IPAddress": "172.17.0.3", - Connect to the pgvector database server.
- Ensure to check "IP address" of
- https://medium.com/@vishal.sharma./run-postgresql-and-pgadmin-using-docker-compose-34120618bcf9
- https://www.commandprompt.com/education/how-to-run-postgresql-and-pgadmin-using-docker/
- https://bugbytes.io/posts/vector-databases-pgvector-and-langchain/
- Create
docker-compose.ymlto run both container at the same time easily. - Building multimodal RAG db on PGvector.