this script will take new documents and convert them into small chunks for emedding conversions or what have you
python3 -m venv .venv
source .venv/bin/activate
python install_requirements.py
Very Important, this uses openai embedding models so you will be required to use an openai api key, please create an .env file with the line
OPENAI_API_KEY=yourKeyHereWithNoQuotationMarks
- Start virtual environment (see above)
- Put new document as a txt file into newDocumentsFolder
- Run the script
python preprocess.py
- You will be asked the name of the collection/knowledge base to use, for example if you did oppenheimer you would only interact with the oppenheimer's
knowledge base, vice versa for another name
- Run the script
python testQuery.py
- You will be prompted for the collection name for example, oppenheimer (not case-sensitive, but spelling matters!)
- It will generate 2 results that the LLM will use, can be changed to more results, all with a unique chunk id