Skip to content

SmartSearchAI is a live semantic search engine powered by Streamlit for the UI, SerpAPI for real-time web search, and SentenceTransformers with FAISS for fast semantic similarity matching. It allows users to ask natural language queries and get intelligent, web-sourced answers without relying on a static dataset.

Notifications You must be signed in to change notification settings

TR-3N/smartsearch-ai

Repository files navigation

🔍 SmartSearchAI

SmartSearchAI is a live semantic search engine that lets users ask natural language questions and retrieves intelligent answers sourced directly from the internet — no static dataset required.

It uses:


✨ Features

  • 🔎 Real-time search via SerpAPI (Google Search API)
  • 🧠 Semantic understanding of user queries (not just keyword matching)
  • ⚡ Fast similarity matching using FAISS
  • 📄 Clean, responsive web UI built with Streamlit
  • 🔐 API key stored securely via .env file

📸 Demo Screenshot


🚀 Getting Started

1. Clone the Repo

git clone https://github.com/yourusername/smartsearchai.git
cd smartsearchai
2. Create and Activate a Virtual Environment

python -m venv smartsearch_env
smartsearch_env\Scripts\activate   # On Windows
# OR
source smartsearch_env/bin/activate  # On Mac/Linux
3. Install Dependencies

pip install -r requirements.txt
🔑 SerpAPI Setup
Go to https://serpapi.com/ and sign up (free plan available).

Get your API key.

Create a .env file in the root of the project:


SERPAPI_API_KEY=your_serpapi_key_here
✅ Important: Never push your .env file to GitHub. It is ignored via .gitignore.

🧪 Run the App

streamlit run streamlit_app.py
Then open http://localhost:8501 in your browser.

🧠 How It Works
User enters a natural language question.

App fetches real-time web results from SerpAPI.

Text from results is embedded using a SentenceTransformer model.

FAISS indexes and finds the most semantically similar snippet to the query.

The best match is returned and shown to the user.

📁 Project Structure

.
├── app.py
├── generate_embeddings.py
├── search_engine.py
├── streamlit_app.py
├── utils.py
├── requirements.txt
├── .env              # contains SerpAPI key (not committed)
├── .gitignore
└── README.md
📌 To-Do
 Add OpenAI/GPT summarization of results (optional)

 Add multi-page result interface

 Cache frequent queries

🛡️ License
This project is open-source and available under the MIT License.

🙋‍♂️ Author
Shahil Sinha

Feel free to reach out on LinkedIn or contribute to this repo!

About

SmartSearchAI is a live semantic search engine powered by Streamlit for the UI, SerpAPI for real-time web search, and SentenceTransformers with FAISS for fast semantic similarity matching. It allows users to ask natural language queries and get intelligent, web-sourced answers without relying on a static dataset.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages