https://github.com/upstatement/hbs-faculty-rag-apps
apps exploring RAG with hbs faculty directory
https://github.com/upstatement/hbs-faculty-rag-apps
Last synced: 2 months ago
JSON representation
apps exploring RAG with hbs faculty directory
- Host: GitHub
- URL: https://github.com/upstatement/hbs-faculty-rag-apps
- Owner: Upstatement
- Created: 2024-03-06T23:35:20.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-08T12:49:12.000Z (almost 2 years ago)
- Last Synced: 2025-01-18T17:48:31.093Z (about 1 year ago)
- Language: JavaScript
- Size: 24.7 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# HBS Faculty Directory RAG Apps
These are two prototypes to explore the [HBS Faculty Directory](https://www.hbs.edu/faculty/Pages/browse.aspx?faculty=Current) using retrieval augmented generation (RAG).
The backend under `app.py` is a llamaindex chat engine that queries a vector store in `chroma_db`
The main guidance-refinement prototype is `user-query-form/` which uses a form input to build the RAG query, and then LLM-driven suggested questions for follow up responses.
`chat-app/` contains a chat app that takes the input and uses that for queries to the llamaindex chat engine, and directly displays the responses.
## Installation
Install git-lfs, which is used to store the vector DB. Then clone this repo.
Make a copy of `.env-example` to `.env` and add your OpenAI key.
Start a virtual environment with `venv`, running `python -m venv venv` and then start it with `source venv/bin/activate`.
install dependencies `pip install -r requirements.txt`
In each of the prototype directories `user-query-form` and `chat-app`, install the respective app with `npm install`.
## Running
Navigate to the frontend app in `user-query-form/` and run `npm run build`. Start the server with `python3 app.py`
If instead you are running the chat app, navigate to `chat-app/` and `npm run build`, then start the server with `python3 chat_server.py`.