Skip to content

BoydBLever/PriceHawk-Agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PriceHawk Agent

PriceHawk is an agentic e-commerce search engine that uses Retrieval-Augmented Generation (RAG) to answer product queries from two sources: an internal FAISS vector store (i.e. private documents) and an optional live web fallback via Tavily. The system uses a tool-calling ReAct-style loop where the LLM first retrieves relevant internal context, evaluates whether it’s sufficient, and only then invokes external web search if needed. This prevents hallucinations, keeps private data local, and ensures up-to-date answers when internal knowledge is incomplete.

An example user query is "Please find me a kindle under $100". The screenshot below demostrates the effectiveness of PriceHawk in using either an internal search or a web search to find the right products.

Demo

PriceHawk demo

Tech Stack

  • Language: Python
  • LLM: GPT-4o-mini
  • RAG / Orchestration: LangChain (1.2.0, native tool-calling)
  • Vector Store: FAISS
  • Web Search: Tavily API
  • UI: Gradio

How It Works

  1. User submits a query.
  2. The system always retrieves from the internal FAISS knowledge base first.
  3. If the internal results are insufficient, the agent optionally falls back to live web search.
  4. The LLM generates a grounded response based on retrieved context.

Running Locally

  1. Create a .env file with:
OPENAI_API_KEY=...
TAVILY_API_KEY=...
  1. Place your FAISS index files inside faiss_index/.
  2. Install dependencies:
pip install -r requirements.txt
  1. Start the app:
python agent.py

Deployment (AWS EC2)

The app is designed for deployment on AWS EC2 (e.g., Amazon Linux 2023):

  1. Provision an EC2 instance and open inbound traffic on port 7860.
  2. Clone the repo and set up a Python virtual environment.
  3. Install dependencies and run python agent.py.
  4. Access the Gradio UI via the instance’s public IP.

About

Agentic e-commerce search engine using RAG from an internal FAISS vector store and optionally from live web search to generate product recommendations

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages