An application mimicking LLM-powered search engines with citations provided by AT2. Given a search query, this application
- Invokes the Tavily API to retrieve relevant web pages.
- Uses an LLM (by default, Microsoft's Phi-4-mini-instruct) to respond to the query given information from the relevant web pages.
- Provides citations, i.e., references to the part of the web pages used by the model, for any part of the response.
search_with_at2_citations.mov
Running this application requires the following:
- Node.js
- npm
- Python
- Tavily API key for search
- GPU with CUDA support for running the LLM
git clone https://github.com/MadryLab/search-with-at2-citations.git
cd search-with-at2-citations- Navigate to the backend directory:
cd backend- Install the required Python packages:
pip install -r requirements.txt- Set your Tavily API key by adding the following to your
.bashrcor equivalent:
export TAVILY_API_KEY="your_tavily_api_key_here"- Navigate to the frontend directory:
cd ../frontend- Install the required Node.js packages:
npm installYou can run both the backend and frontend with the run.sh script provided in the root directory:
./run.shThe frontend will be available at: http://localhost:3000