From a86641cdec83369b1f968a63bdfbbe83352f7f98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Mart=C3=ADnez?= Date: Sat, 20 May 2023 11:22:45 +0200 Subject: [PATCH] Readme small fixes following review and formatting --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 11cb2632..f2632d54 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ python ingest.py ``` It will create a `db` folder containing the local vectorstore. Will take 20-30 seconds per document, depending on the size of the document. -You can ingest as many documents as you want, and all will be accumulated in the local embeddings database. +You can ingest as many documents as you want, and all will be accumulated in the local embeddings database. If you want to start from an empty database, delete the `db` folder. Note: during the ingest process no data leaves your local environment. You could ingest without an internet connection, except for the first time you run the ingest script, when the embeddings model is downloaded. @@ -69,27 +69,27 @@ In order to ask a question, run a command like: python privateGPT.py ``` -And wait for the script to require your input. +And wait for the script to require your input. ```plaintext > Enter a query: ``` -Hit enter. You'll need to wait 20-30 seconds (depending on your machine) while the LLM model consumes the prompt and prepares the answer. Once done, it will print the answer and the 4 sources it used as context from your documents; you can then ask another question without re-running the script, just wait for the prompt again. +Hit enter. You'll need to wait 20-30 seconds (depending on your machine) while the LLM model consumes the prompt and prepares the answer. Once done, it will print the answer and the 4 sources it used as context from your documents; you can then ask another question without re-running the script, just wait for the prompt again. Note: you could turn off your internet connection, and the script inference would still work. No data gets out of your local environment. Type `exit` to finish the script. -### Script Arguments -The script also supports optional command-line arguments to modify its behavior. You can see a full list of these arguments by running the command ```python privateGPT.py --help``` in your terminal +### CLI +The script also supports optional command-line arguments to modify its behavior. You can see a full list of these arguments by running the command ```python privateGPT.py --help``` in your terminal. # How does it work? Selecting the right local models and the power of `LangChain` you can run the entire pipeline locally, without any data leaving your environment, and with reasonable performance. -- `ingest.py` uses `LangChain` tools to parse the document and create embeddings locally using `HuggingFaceEmbeddings` (`SentenceTransformers`). It then stores the result in a local vector database using `Chroma` vector store. +- `ingest.py` uses `LangChain` tools to parse the document and create embeddings locally using `HuggingFaceEmbeddings` (`SentenceTransformers`). It then stores the result in a local vector database using `Chroma` vector store. - `privateGPT.py` uses a local LLM based on `GPT4All-J` or `LlamaCpp` to understand questions and create answers. The context for the answers is extracted from the local vector store using a similarity search to locate the right piece of context from the docs. - `GPT4All-J` wrapper was introduced in LangChain 0.0.162. @@ -111,8 +111,8 @@ To install a C++ compiler on Windows 10/11, follow these steps: 3. Download the MinGW installer from the [MinGW website](https://sourceforge.net/projects/mingw/). 4. Run the installer and select the `gcc` component. -## Mac Running Intel -When running a Mac with Intel hardware (not M1), you may run into _clang: error: the clang compiler does not support '-march=native'_ during pip install. +## Mac Running Intel +When running a Mac with Intel hardware (not M1), you may run into _clang: error: the clang compiler does not support '-march=native'_ during pip install. If so set your archflags during pip install. eg: _ARCHFLAGS="-arch x86_64" pip3 install -r requirements.txt_