Skip to content

cookbook-ms/semantic_search_llm

Repository files navigation

🍔 Semantic Food Search Demo

This project is a Streamlit app that performs semantic search over a food dataset using FAISS indexing, SVD compression, and optional GPT-based reranking.

🚀 Features

  • Search food items using vector embeddings
  • Choose between large/small embedding models
  • Apply SVD to approximate similarity
  • GPT-based reranking and optional NDCG evaluation

Example:

Streamlit app

📦 Setup

  1. Clone this repository and navigate into the folder:
git clone https://github.com/cookbook-ms/semantic_search_llm.git
cd semantic_search_llm
  1. Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows use venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt
  1. Configure api for embedding and gpt responses in 'constants.py':

  2. [Optional] Precompute the embeddings for the items and queries. See 'embedding_items.ipynb' and 'embedding_queries.ipynb' for details.

  3. Run the Streamlit app:

streamlit run main.py

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors