The repo contains sample App to demonstrate RAG application for property search. The repo contains example data, as well as all code to create LlamaIndex store and Vector index to search by owner name and property legal description.
The App is using basic LlamaIndex functionality to create and persist Embeddings Index and Document store.
-
Clone the repository:
git clone <repository-url> cd <repository-directory>
-
Create a virtual environment and activate it:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install the required dependencies:
pip install -r requirements.txt
-
Set up the environment variables: Create a
.env
file in the root directory and add the necessary environment variables as shown in the provided env_example file. -
Index Creation The App is using basic LlamaIndex functionality to create and persist Embeddings Index and Document store.
python app/run_build_indexes.py
-
Run the application:
python app/run_app.py
-
Run Query Test from command line"
python app/run_query_test.py
The application will run at the following URL . Public URL will be provided by Gradio, valid for 72 hours, the URL will be displayed once App has started.
Example query and history query screenshot:
The App is using FAISS Index using Embeddings calculated by HuggingFace model running locally. The Document store is LlamaInde DocStore. The App supports running local HuggingFace embedding models or using OpenAI embedding model.
The repository contains several Jupyter notebooks for different purposes:
search-playground.ipynb
: Demonstrates how to instantiate and use the document store and vector index for property search.Automerging_retriever_playground.ipynb
: Shows how to use the AutoMergingRetriever for retrieving property information.search-playground-persist.ipynb
: Example of persisting the document store and vector index.
The [data] directory contains example property data used in the application. The data_utils directory contains scripts for converting CSV data to other formats.
This project is licensed under the MIT License. See the LICENSE file for details.
This project uses the following libraries and resources: