- This project is hosted on GitHub. For the most recent code, go to:
https://github.com/Qhwelah/RAG_Local_Project
- Create
.envfile:
# Postgres
POSTGRES_USER = postgres
POSTGRES_PASSWORD = devpassword
# URL to pull information from in the Web Scraper
SCRAPE_URL = "https://harrisburg.psu.edu/counseling-psychological-services"
# LLM Model to pull in Ollama for RAG generation
LLM_MODEL = mistral-
cd into project directory
-
Run docker compose startup command:
docker compose up --build
-
To stop the docker environment and delete the containers, do:
CTRL+Cto cancel the docker rundocker compose downto delete the containers
-
The client container
rag-cli's main running script,app.py, is configured to allow parameters to be fed in for specific behaviors.-ior--do-ingestion, if present, will tell the script to take the cached web scraping data, and chunk, embed, and push the data to the RAG database (which will also be cleared beforehand)-sor--scrape-urlwith a string url likehttps://harrisburg.psu.edu/counseling-psychological-serviceswill tell the program to scrape data from the website specified and all subdomains, and also run the ingestion process described above with the new data.- Currently the only way to feed in these flags is from inside the
rag-clicontainer, but that will be resolved later on in development. - Note: Not all of the variables and controls are currently available from the
.envor the main variables declaration inapp.py.- Support for this will be added later on.
- Inside of the pgvector container, do:
psql -U your_username -d your_database- The database name for this network is
rag
- The database name for this network is
- You could also do
psql -U your_usernameand use the following commands in the psql terminal:\q: Quit the psql session and return to the Linux shell.\?: Display help information about all available psql internal commands.\l: List all available databases.\dt: List tables in the current database.SELECT version();: Execute an SQL query (must end with a semicolon ;) to check the PostgreSQL version.